ebarbero
Joined: 01 Aug 2012 Posts: 20
|
Posted: Wed Aug 01, 2012 10:41 pm Post subject: ASSEMBLY_INTERFACE generated subroutines & input names |
|
|
When I try to use in C# a Fortran subroutine I have two options:
Use the all caps subroutine or the subroutine defined by the assembly_interface statement.
The all caps subroutine has the problem that If there is a matrix as input or output I have to pass the size information.
The subroutine defined by the assembly_interface statement loses the input names!
Example:
Matrices subroutine (just an example)
Code: |
subroutine Matrices(f, A)
implicit none
ASSEMBLY_INTERFACE(Name='Matrices')
double precision, intent(in) :: f
double precision, intent(out):: A(:,:)
A = 0.d0
A(1,1) = f
A(1,2) = f**2.d0
endsubroutine
|
_________________ http://www.cadec-online.com/ |
|