Actual source code: dmregall.c
petsc-3.14.6 2021-03-30
2: #include <petscdm.h>
3: #include <petscdmplex.h>
4: #include <petsc/private/dmimpl.h>
5: #include <petsc/private/dmpleximpl.h>
6: #include <petsc/private/petscfeimpl.h>
7: #include <petsc/private/petscfvimpl.h>
8: #include <petsc/private/petscdsimpl.h>
9: PETSC_EXTERN PetscErrorCode DMCreate_DA(DM);
10: PETSC_EXTERN PetscErrorCode DMCreate_Composite(DM);
11: PETSC_EXTERN PetscErrorCode DMCreate_Sliced(DM);
12: PETSC_EXTERN PetscErrorCode DMCreate_Shell(DM);
13: PETSC_EXTERN PetscErrorCode DMCreate_Redundant(DM);
14: PETSC_EXTERN PetscErrorCode DMCreate_Plex(DM);
15: PETSC_EXTERN PetscErrorCode DMCreate_Patch(DM);
16: PETSC_EXTERN PetscErrorCode DMCreate_Swarm(DM);
17: #if defined(PETSC_HAVE_MOAB)
18: PETSC_EXTERN PetscErrorCode DMCreate_Moab(DM);
19: #endif
20: PETSC_EXTERN PetscErrorCode DMCreate_Network(DM);
21: PETSC_EXTERN PetscErrorCode DMCreate_Forest(DM);
22: #if defined(PETSC_HAVE_P4EST)
23: PETSC_EXTERN PetscErrorCode DMCreate_p4est(DM);
24: PETSC_EXTERN PetscErrorCode DMCreate_p8est(DM);
25: #endif
26: PETSC_EXTERN PetscErrorCode DMCreate_Product(DM);
27: PETSC_EXTERN PetscErrorCode DMCreate_Stag(DM);
29: /*@C
30: DMRegisterAll - Registers all of the DM components in the DM package.
32: Not Collective
34: Input parameter:
35: . path - The dynamic library path
37: Level: advanced
39: .seealso: DMRegister(), DMRegisterDestroy()
40: @*/
41: PetscErrorCode DMRegisterAll(void)
42: {
46: if (DMRegisterAllCalled) return(0);
47: DMRegisterAllCalled = PETSC_TRUE;
49: DMRegister(DMDA, DMCreate_DA);
50: DMRegister(DMCOMPOSITE,DMCreate_Composite);
51: DMRegister(DMSLICED, DMCreate_Sliced);
52: DMRegister(DMSHELL, DMCreate_Shell);
53: DMRegister(DMREDUNDANT,DMCreate_Redundant);
54: DMRegister(DMPLEX, DMCreate_Plex);
55: DMRegister(DMPATCH, DMCreate_Patch);
56: DMRegister(DMSWARM, DMCreate_Swarm);
57: #if defined(PETSC_HAVE_MOAB)
58: DMRegister(DMMOAB, DMCreate_Moab);
59: #endif
60: DMRegister(DMNETWORK, DMCreate_Network);
61: DMRegister(DMFOREST, DMCreate_Forest);
62: #if defined(PETSC_HAVE_P4EST)
63: DMRegister(DMP4EST, DMCreate_p4est);
64: DMRegister(DMP8EST, DMCreate_p8est);
65: #endif
66: DMRegister(DMPRODUCT, DMCreate_Product);
67: DMRegister(DMSTAG, DMCreate_Stag);
68: return(0);
69: }
71: #include <petscfe.h>
73: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Polynomial(PetscSpace);
74: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Tensor(PetscSpace);
75: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Sum(PetscSpace);
76: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Point(PetscSpace);
77: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Subspace(PetscSpace);
79: /*@C
80: PetscSpaceRegisterAll - Registers all of the PetscSpace components in the PetscFE package.
82: Not Collective
84: Input parameter:
85: . path - The dynamic library path
87: Level: advanced
89: .seealso: PetscSpaceRegister(), PetscSpaceRegisterDestroy()
90: @*/
91: PetscErrorCode PetscSpaceRegisterAll(void)
92: {
96: if (PetscSpaceRegisterAllCalled) return(0);
97: PetscSpaceRegisterAllCalled = PETSC_TRUE;
99: PetscSpaceRegister(PETSCSPACEPOLYNOMIAL, PetscSpaceCreate_Polynomial);
100: PetscSpaceRegister(PETSCSPACETENSOR, PetscSpaceCreate_Tensor);
101: PetscSpaceRegister(PETSCSPACESUM, PetscSpaceCreate_Sum);
102: PetscSpaceRegister(PETSCSPACEPOINT, PetscSpaceCreate_Point);
103: PetscSpaceRegister(PETSCSPACESUBSPACE, PetscSpaceCreate_Subspace);
104: return(0);
105: }
107: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Lagrange(PetscDualSpace);
108: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Lagrange_BDM(PetscDualSpace);
109: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Simple(PetscDualSpace);
110: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Refined(PetscDualSpace);
112: /*@C
113: PetscDualSpaceRegisterAll - Registers all of the PetscDualSpace components in the PetscFE package.
115: Not Collective
117: Input parameter:
118: . path - The dynamic library path
120: Level: advanced
122: .seealso: PetscDualSpaceRegister(), PetscDualSpaceRegisterDestroy()
123: @*/
124: PetscErrorCode PetscDualSpaceRegisterAll(void)
125: {
129: if (PetscDualSpaceRegisterAllCalled) return(0);
130: PetscDualSpaceRegisterAllCalled = PETSC_TRUE;
132: PetscDualSpaceRegister(PETSCDUALSPACELAGRANGE, PetscDualSpaceCreate_Lagrange);
133: PetscDualSpaceRegister(PETSCDUALSPACEBDM, PetscDualSpaceCreate_Lagrange);
134: PetscDualSpaceRegister(PETSCDUALSPACESIMPLE, PetscDualSpaceCreate_Simple);
135: PetscDualSpaceRegister(PETSCDUALSPACEREFINED, PetscDualSpaceCreate_Refined);
136: return(0);
137: }
139: PETSC_EXTERN PetscErrorCode PetscFECreate_Basic(PetscFE);
140: PETSC_EXTERN PetscErrorCode PetscFECreate_Nonaffine(PetscFE);
141: PETSC_EXTERN PetscErrorCode PetscFECreate_Composite(PetscFE);
142: #if defined(PETSC_HAVE_OPENCL)
143: PETSC_EXTERN PetscErrorCode PetscFECreate_OpenCL(PetscFE);
144: #endif
146: /*@C
147: PetscFERegisterAll - Registers all of the PetscFE components in the PetscFE package.
149: Not Collective
151: Input parameter:
152: . path - The dynamic library path
154: Level: advanced
156: .seealso: PetscFERegister(), PetscFERegisterDestroy()
157: @*/
158: PetscErrorCode PetscFERegisterAll(void)
159: {
163: if (PetscFERegisterAllCalled) return(0);
164: PetscFERegisterAllCalled = PETSC_TRUE;
166: PetscFERegister(PETSCFEBASIC, PetscFECreate_Basic);
167: PetscFERegister(PETSCFECOMPOSITE, PetscFECreate_Composite);
168: #if defined(PETSC_HAVE_OPENCL)
169: PetscFERegister(PETSCFEOPENCL, PetscFECreate_OpenCL);
170: #endif
171: return(0);
172: }
173: #include <petscfv.h>
175: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Sin(PetscLimiter);
176: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Zero(PetscLimiter);
177: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_None(PetscLimiter);
178: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Minmod(PetscLimiter);
179: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_VanLeer(PetscLimiter);
180: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_VanAlbada(PetscLimiter);
181: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Superbee(PetscLimiter);
182: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_MC(PetscLimiter);
184: /*@C
185: PetscLimiterRegisterAll - Registers all of the PetscLimiter components in the PetscFV package.
187: Not Collective
189: Input parameter:
190: . path - The dynamic library path
192: Level: advanced
194: .seealso: PetscLimiterRegister(), PetscLimiterRegisterDestroy()
195: @*/
196: PetscErrorCode PetscLimiterRegisterAll(void)
197: {
201: if (PetscLimiterRegisterAllCalled) return(0);
202: PetscLimiterRegisterAllCalled = PETSC_TRUE;
204: PetscLimiterRegister(PETSCLIMITERSIN, PetscLimiterCreate_Sin);
205: PetscLimiterRegister(PETSCLIMITERZERO, PetscLimiterCreate_Zero);
206: PetscLimiterRegister(PETSCLIMITERNONE, PetscLimiterCreate_None);
207: PetscLimiterRegister(PETSCLIMITERMINMOD, PetscLimiterCreate_Minmod);
208: PetscLimiterRegister(PETSCLIMITERVANLEER, PetscLimiterCreate_VanLeer);
209: PetscLimiterRegister(PETSCLIMITERVANALBADA, PetscLimiterCreate_VanAlbada);
210: PetscLimiterRegister(PETSCLIMITERSUPERBEE, PetscLimiterCreate_Superbee);
211: PetscLimiterRegister(PETSCLIMITERMC, PetscLimiterCreate_MC);
212: return(0);
213: }
215: PETSC_EXTERN PetscErrorCode PetscFVCreate_Upwind(PetscFV);
216: PETSC_EXTERN PetscErrorCode PetscFVCreate_LeastSquares(PetscFV);
218: /*@C
219: PetscFVRegisterAll - Registers all of the PetscFV components in the PetscFV package.
221: Not Collective
223: Input parameter:
224: . path - The dynamic library path
226: Level: advanced
228: .seealso: PetscFVRegister(), PetscFVRegisterDestroy()
229: @*/
230: PetscErrorCode PetscFVRegisterAll(void)
231: {
235: if (PetscFVRegisterAllCalled) return(0);
236: PetscFVRegisterAllCalled = PETSC_TRUE;
238: PetscFVRegister(PETSCFVUPWIND, PetscFVCreate_Upwind);
239: PetscFVRegister(PETSCFVLEASTSQUARES, PetscFVCreate_LeastSquares);
240: return(0);
241: }
242: #include <petscds.h>
244: PETSC_EXTERN PetscErrorCode PetscDSCreate_Basic(PetscDS);
246: /*@C
247: PetscDSRegisterAll - Registers all of the PetscDS components in the PetscDS package.
249: Not Collective
251: Input parameter:
252: . path - The dynamic library path
254: Level: advanced
256: .seealso: PetscDSRegister(), PetscDSRegisterDestroy()
257: @*/
258: PetscErrorCode PetscDSRegisterAll(void)
259: {
263: if (PetscDSRegisterAllCalled) return(0);
264: PetscDSRegisterAllCalled = PETSC_TRUE;
266: PetscDSRegister(PETSCDSBASIC, PetscDSCreate_Basic);
267: return(0);
268: }