mathpaqs_20230121.0.0_773568e5/numerics/demo_fek.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- At the moment empty (only shows how to instanciate);
-- will be one day a very nice Finite Elements demo!
-- (I have working code; contact me if in need!).

with Ada.Numerics.Generic_Elementary_Functions;

with G_FEK, G_Matrices;

procedure Demo_FEK is

  subtype F is Long_Float;
  type Vector is array (Integer range <>) of F;
  type Matrix is array (Integer range <>, Integer range <>) of F;

  package FEK is new G_FEK(Long_Float, Vector, Matrix);

  package FEF is new Ada.Numerics.Generic_Elementary_Functions(F);

  package Matrices is new
    G_Matrices(F, 0.0,1.0, "-", FEF.Sqrt,"+","-","*","/", Vector, Matrix);

begin
  null;
end Demo_FEK;