#include "mesh.h" #undef __FUNCT__ #define __FUNCT__ "MeshRegister" int MeshRegister(const char sname[], const char path[], const char name[], int (*function)(Mesh))
MeshRegister(char *name, char *path, char *func_name, int (*create_func)(Mesh))
Not Collective
name | - The name of a new user-defined creation routine | |
path | - The path (either absolute or relative) of the library containing this routine | |
func_name | - The name of the creation routine | |
create_func | - The creation routine itself |
If dynamic libraries are used, then the fourth input argument (create_func) is ignored.
MeshRegisterDynamic("my_mesh", "/home/username/my_lib/lib/libO/solaris/libmy.a", "MyMeshCreate", MyMeshCreate);
Then, your mesh type can be chosen with the procedural interface via
MeshCreate(MPI_Comm, Mesh *); MeshSetType(vec, "my_mesh")or at runtime via the option
-mesh_type my_mesh
Note: $PETSC_ARCH and $BOPT occuring in pathname will be replaced with appropriate values.
Level:advanced
Location:src/mesh/interface/meshreg.c
Index of all Mesh routines
Table of Contents for all manual pages
Index of all manual pages