$extrastylesheet
petscdmlibmesh.h
Go to the documentation of this file.
00001 #ifndef PETSCDMLIBMESH_H
00002 #define PETSCDMLIBMESH_H
00003 // This is intended as a kind of public header for DMlibMesh
00004 // (does it get installed?  should it? is this public, but
00005 // developer-facing only?)
00006 
00007 #include "libmesh/petsc_macro.h"
00008 // This only works with petsc-3.3 and above.
00009 #if !PETSC_VERSION_LESS_THAN(3,3,0)
00010 
00011 #include <petscdm.h>
00012 #include "libmesh/nonlinear_implicit_system.h"
00013 
00014 /*
00015   Any functional implementation of the DMlibMesh API must compose the following functions with the DM object.
00016   (See PETSc documentation on PetscObjectComposeFunction(), a polymorphism mechanism.)
00017   The following functions are called in PetscNonlinear Solver (others can be called by users):
00018     DMlibMeshSetSystem(), DMlibMeshGetSystem()
00019 
00020   Any implementation needs to register its creation routine, DMCreate_libMesh, with PETSc using DMRegister().
00021 */
00022 
00023 PETSC_EXTERN PetscErrorCode DMlibMeshSetSystem(DM,libMesh::NonlinearImplicitSystem&);
00024 PETSC_EXTERN PetscErrorCode DMlibMeshGetSystem(DM,libMesh::NonlinearImplicitSystem*&);
00025 
00026 
00027 #define DMLIBMESH "libmesh"
00028 EXTERN_C_BEGIN
00029 PETSC_EXTERN PetscErrorCode DMCreate_libMesh(DM);
00030 EXTERN_C_END
00031 
00032 #endif // #if !PETSC_VERSION_LESS_THAN(3,3,0)
00033 #endif // #ifdef PETSCDMLIBEMSH_H