AMGX
AMGX copied to clipboard
How to call AMGX using Fortran?
Hi, I want to use AMGX to build a module in Fortran to solve the Poisson equation. How can I use AMGX in Fortran? Is there any example for reference?
You'll have to either build an interface for each AMGX function or build a singular wrapper that calls all the C functions. An example of such a wrapper can be found in ElmerCSC/elmerfem:
- wrapper: https://github.com/ElmerCSC/elmerfem/blob/4f69f075e81e01a061b7b0042f7c14a3d4a438d3/fem/src/amgx.c#L12
- interface to the wrapper: https://github.com/ElmerCSC/elmerfem/blob/4f69f075e81e01a061b7b0042f7c14a3d4a438d3/fem/src/SolverUtils.F90#L15161