tobiashuste / amgx-c-wrapper

This project is a C wrapper for AmgXWrapper which can also be used with Fortran.
MIT License
0 stars 1 forks source link

IS there any example codes? #2

Open lj-cug opened 4 years ago

lj-cug commented 4 years ago

Is there any example code to teach me how to use it? Thank you very much!

CeliaLaurent commented 4 years ago

You can use this source file as an example: https://github.com/CeliaLaurent/shyfem/blob/AmgXWrapper/fem3d/mod_system_petsc.f

lj-cug commented 11 months ago

The FORTRAN 2003 has Object-oriented Programming functions, but I cannot use the similar ways of Amgx-wrapper-C APIs in C code. I include a C header contains as following:

struct CAmgXSolver amgx; 
void camgx_initialize(amgx *, MPI_Fint *, char *, char *,  PetscErrorCode *);
......

But when I compiled the code, it told me "error: unknown type name 'CAmgXSolver'" How can I use your "Wrapper-C" in C code? Thanks! Li Jian