www.mooseframework.org
PetscDMMoose.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef PETSCDMMOOSE_H
16 #define PETSCDMMOOSE_H
17 
18 // This only works with petsc-3.3 and above.
19 #include "libmesh/petsc_macro.h"
20 
21 #if defined(LIBMESH_HAVE_PETSC) && !PETSC_VERSION_LESS_THAN(3, 3, 0)
22 
23 // PETSc includes
24 #include <petscdm.h>
25 #define DMMOOSE "moose"
26 
27 // C++ includes
28 #include <vector>
29 #include <set>
30 #include <string>
31 
32 // Forward declarations
34 
35 extern PetscErrorCode DMMooseRegisterAll();
36 extern PetscErrorCode DMCreateMoose(MPI_Comm, NonlinearSystemBase &, DM *);
37 extern PetscErrorCode DMMooseReset(DM);
38 extern PetscErrorCode DMMooseSetNonlinearSystem(DM, NonlinearSystemBase &);
39 extern PetscErrorCode DMMooseGetNonlinearSystem(DM, NonlinearSystemBase *&);
40 extern PetscErrorCode DMMooseGetBlocks(DM, std::vector<std::string> &);
41 extern PetscErrorCode DMMooseGetVariables(DM, std::vector<std::string> &);
42 extern PetscErrorCode DMMooseGetSides(DM, std::set<std::string> &);
43 extern PetscErrorCode DMMooseGetUnSides(DM, std::set<std::string> &);
44 extern PetscErrorCode
45 DMMooseGetContacts(DM, std::vector<std::pair<std::string, std::string>> &, std::vector<bool> &);
46 extern PetscErrorCode
47 DMMooseGetUnContacts(DM, std::vector<std::pair<std::string, std::string>> &, std::vector<bool> &);
48 extern PetscErrorCode DMMooseSetBlocks(DM, const std::vector<std::string> &);
49 extern PetscErrorCode DMMooseSetVariables(DM, const std::vector<std::string> &);
50 extern PetscErrorCode DMMooseSetSides(DM, const std::set<std::string> &);
51 extern PetscErrorCode DMMooseSetUnSides(DM, const std::set<std::string> &);
52 extern PetscErrorCode DMMooseSetContacts(DM,
53  const std::vector<std::pair<std::string, std::string>> &,
54  const std::vector<bool> &);
55 extern PetscErrorCode DMMooseSetUnContacts(DM,
56  const std::vector<std::pair<std::string, std::string>> &,
57  const std::vector<bool> &);
58 extern PetscErrorCode DMMooseSetSplitNames(DM, const std::vector<std::string> &);
59 extern PetscErrorCode DMMooseGetSplitNames(DM, const std::vector<std::string> &);
60 extern PetscErrorCode DMMooseSetSplitVars(DM, const std::string &, const std::set<std::string> &);
61 extern PetscErrorCode DMMooseGetSplitVars(DM, const std::string &, std::set<std::string> &);
62 extern PetscErrorCode DMMooseSetSplitBlocks(DM, const std::string &, const std::set<std::string> &);
63 extern PetscErrorCode DMMooseGetSplitBlocks(DM, const std::string &, std::set<std::string> &);
64 extern PetscErrorCode DMMooseSetSplitSides(DM, const std::string &, const std::set<std::string> &);
65 extern PetscErrorCode DMMooseGetSplitSides(DM, const std::string &, std::set<std::string> &);
66 extern PetscErrorCode SNESUpdateDMMoose(SNES snes, PetscInt iteration);
67 
68 #endif // #if defined(LIBMESH_HAVE_PETSC) && !PETSC_VERSION_LESS_THAN(3,3,0)
69 #endif // #ifdef PETSCDMMOOSE_H
PetscErrorCode DMMooseSetBlocks(DM, const std::vector< std::string > &)
PetscErrorCode DMMooseSetUnSides(DM, const std::set< std::string > &)
Definition: PetscDMMoose.C:358
PetscErrorCode DMMooseGetSplitSides(DM, const std::string &, std::set< std::string > &)
PetscErrorCode DMMooseGetNonlinearSystem(DM, NonlinearSystemBase *&)
Definition: PetscDMMoose.C:467
PetscErrorCode DMCreateMoose(MPI_Comm, NonlinearSystemBase &, DM *)
PetscErrorCode DMMooseSetSplitVars(DM, const std::string &, const std::set< std::string > &)
PetscErrorCode DMMooseSetSplitSides(DM, const std::string &, const std::set< std::string > &)
Nonlinear system to be solved.
PetscErrorCode DMMooseSetSides(DM, const std::set< std::string > &)
Definition: PetscDMMoose.C:331
PetscErrorCode DMMooseGetSplitBlocks(DM, const std::string &, std::set< std::string > &)
PetscErrorCode DMMooseSetVariables(DM, const std::vector< std::string > &)
PetscErrorCode DMMooseGetSplitVars(DM, const std::string &, std::set< std::string > &)
PetscErrorCode SNESUpdateDMMoose(SNES snes, PetscInt iteration)
PetscErrorCode DMMooseSetSplitBlocks(DM, const std::string &, const std::set< std::string > &)
PetscErrorCode DMMooseSetSplitNames(DM, const std::vector< std::string > &)
Definition: PetscDMMoose.C:490
PetscErrorCode DMMooseGetUnContacts(DM, std::vector< std::pair< std::string, std::string >> &, std::vector< bool > &)
PetscErrorCode DMMooseGetUnSides(DM, std::set< std::string > &)
PetscErrorCode DMMooseReset(DM)
PetscErrorCode DMMooseGetContacts(DM, std::vector< std::pair< std::string, std::string >> &, std::vector< bool > &)
PetscErrorCode DMMooseGetSides(DM, std::set< std::string > &)
PetscErrorCode DMMooseGetSplitNames(DM, const std::vector< std::string > &)
PetscErrorCode DMMooseSetNonlinearSystem(DM, NonlinearSystemBase &)
Definition: PetscDMMoose.C:250
PetscErrorCode DMMooseGetVariables(DM, std::vector< std::string > &)
Definition: PetscDMMoose.C:226
PetscErrorCode DMMooseSetUnContacts(DM, const std::vector< std::pair< std::string, std::string >> &, const std::vector< bool > &)
PetscErrorCode DMMooseRegisterAll()
PetscErrorCode DMMooseSetContacts(DM, const std::vector< std::pair< std::string, std::string >> &, const std::vector< bool > &)
PetscErrorCode DMMooseGetBlocks(DM, std::vector< std::string > &)
Definition: PetscDMMoose.C:202