Actual source code: dmregall.c
petsc-3.11.4 2019-09-28
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: .keywords: DM, register, all
40: .seealso: DMRegister(), DMRegisterDestroy()
41: @*/
42: PetscErrorCode DMRegisterAll(void)
43: {
47: if (DMRegisterAllCalled) return(0);
48: DMRegisterAllCalled = PETSC_TRUE;
50: DMRegister(DMDA, DMCreate_DA);
51: DMRegister(DMCOMPOSITE, DMCreate_Composite);
52: DMRegister(DMSLICED, DMCreate_Sliced);
53: DMRegister(DMSHELL, DMCreate_Shell);
54: DMRegister(DMREDUNDANT, DMCreate_Redundant);
55: DMRegister(DMPLEX, DMCreate_Plex);
56: DMRegister(DMPATCH, DMCreate_Patch);
57: DMRegister(DMSWARM, DMCreate_Swarm);
58: #if defined(PETSC_HAVE_MOAB)
59: DMRegister(DMMOAB, DMCreate_Moab);
60: #endif
61: DMRegister(DMNETWORK, DMCreate_Network);
62: DMRegister(DMFOREST, DMCreate_Forest);
63: #if defined(PETSC_HAVE_P4EST)
64: DMRegister(DMP4EST, DMCreate_p4est);
65: DMRegister(DMP8EST, DMCreate_p8est);
66: #endif
67: DMRegister(DMPRODUCT, DMCreate_Product);
68: DMRegister(DMSTAG, DMCreate_Stag);
69: return(0);
70: }
72: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Chaco(PetscPartitioner);
73: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_ParMetis(PetscPartitioner);
74: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_PTScotch(PetscPartitioner);
75: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Shell(PetscPartitioner);
76: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Simple(PetscPartitioner);
77: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Gather(PetscPartitioner);
78: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_MatPartitioning(PetscPartitioner);
80: /*@C
81: PetscPartitionerRegisterAll - Registers all of the PetscPartitioner components in the DM package.
83: Not Collective
85: Input parameter:
86: . path - The dynamic library path
88: Level: advanced
90: .keywords: PetscPartitioner, register, all
91: .seealso: PetscPartitionerRegister(), PetscPartitionerRegisterDestroy()
92: @*/
93: PetscErrorCode PetscPartitionerRegisterAll(void)
94: {
98: if (PetscPartitionerRegisterAllCalled) return(0);
99: PetscPartitionerRegisterAllCalled = PETSC_TRUE;
101: PetscPartitionerRegister(PETSCPARTITIONERCHACO, PetscPartitionerCreate_Chaco);
102: PetscPartitionerRegister(PETSCPARTITIONERPARMETIS, PetscPartitionerCreate_ParMetis);
103: PetscPartitionerRegister(PETSCPARTITIONERPTSCOTCH, PetscPartitionerCreate_PTScotch);
104: PetscPartitionerRegister(PETSCPARTITIONERSHELL, PetscPartitionerCreate_Shell);
105: PetscPartitionerRegister(PETSCPARTITIONERSIMPLE, PetscPartitionerCreate_Simple);
106: PetscPartitionerRegister(PETSCPARTITIONERGATHER, PetscPartitionerCreate_Gather);
107: PetscPartitionerRegister(PETSCPARTITIONERMATPARTITIONING, PetscPartitionerCreate_MatPartitioning);
108: return(0);
109: }
110: #include <petscfe.h>
112: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Polynomial(PetscSpace);
113: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Tensor(PetscSpace);
114: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Point(PetscSpace);
115: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Subspace(PetscSpace);
117: /*@C
118: PetscSpaceRegisterAll - Registers all of the PetscSpace components in the PetscFE package.
120: Not Collective
122: Input parameter:
123: . path - The dynamic library path
125: Level: advanced
127: .keywords: PetscSpace, register, all
128: .seealso: PetscSpaceRegister(), PetscSpaceRegisterDestroy()
129: @*/
130: PetscErrorCode PetscSpaceRegisterAll(void)
131: {
135: if (PetscSpaceRegisterAllCalled) return(0);
136: PetscSpaceRegisterAllCalled = PETSC_TRUE;
138: PetscSpaceRegister(PETSCSPACEPOLYNOMIAL, PetscSpaceCreate_Polynomial);
139: PetscSpaceRegister(PETSCSPACETENSOR, PetscSpaceCreate_Tensor);
140: PetscSpaceRegister(PETSCSPACEPOINT, PetscSpaceCreate_Point);
141: PetscSpaceRegister(PETSCSPACESUBSPACE, PetscSpaceCreate_Subspace);
142: return(0);
143: }
145: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Lagrange(PetscDualSpace);
146: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Simple(PetscDualSpace);
148: /*@C
149: PetscDualSpaceRegisterAll - Registers all of the PetscDualSpace components in the PetscFE package.
151: Not Collective
153: Input parameter:
154: . path - The dynamic library path
156: Level: advanced
158: .keywords: PetscDualSpace, register, all
159: .seealso: PetscDualSpaceRegister(), PetscDualSpaceRegisterDestroy()
160: @*/
161: PetscErrorCode PetscDualSpaceRegisterAll(void)
162: {
166: if (PetscDualSpaceRegisterAllCalled) return(0);
167: PetscDualSpaceRegisterAllCalled = PETSC_TRUE;
169: PetscDualSpaceRegister(PETSCDUALSPACELAGRANGE, PetscDualSpaceCreate_Lagrange);
170: PetscDualSpaceRegister(PETSCDUALSPACESIMPLE, PetscDualSpaceCreate_Simple);
171: return(0);
172: }
174: PETSC_EXTERN PetscErrorCode PetscFECreate_Basic(PetscFE);
175: PETSC_EXTERN PetscErrorCode PetscFECreate_Nonaffine(PetscFE);
176: PETSC_EXTERN PetscErrorCode PetscFECreate_Composite(PetscFE);
177: #if defined(PETSC_HAVE_OPENCL)
178: PETSC_EXTERN PetscErrorCode PetscFECreate_OpenCL(PetscFE);
179: #endif
181: /*@C
182: PetscFERegisterAll - Registers all of the PetscFE components in the PetscFE package.
184: Not Collective
186: Input parameter:
187: . path - The dynamic library path
189: Level: advanced
191: .keywords: PetscFE, register, all
192: .seealso: PetscFERegister(), PetscFERegisterDestroy()
193: @*/
194: PetscErrorCode PetscFERegisterAll(void)
195: {
199: if (PetscFERegisterAllCalled) return(0);
200: PetscFERegisterAllCalled = PETSC_TRUE;
202: PetscFERegister(PETSCFEBASIC, PetscFECreate_Basic);
203: PetscFERegister(PETSCFECOMPOSITE, PetscFECreate_Composite);
204: #if defined(PETSC_HAVE_OPENCL)
205: PetscFERegister(PETSCFEOPENCL, PetscFECreate_OpenCL);
206: #endif
207: return(0);
208: }
209: #include <petscfv.h>
211: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Sin(PetscLimiter);
212: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Zero(PetscLimiter);
213: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_None(PetscLimiter);
214: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Minmod(PetscLimiter);
215: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_VanLeer(PetscLimiter);
216: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_VanAlbada(PetscLimiter);
217: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Superbee(PetscLimiter);
218: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_MC(PetscLimiter);
220: /*@C
221: PetscLimiterRegisterAll - Registers all of the PetscLimiter components in the PetscFV package.
223: Not Collective
225: Input parameter:
226: . path - The dynamic library path
228: Level: advanced
230: .keywords: PetscLimiter, register, all
231: .seealso: PetscLimiterRegister(), PetscLimiterRegisterDestroy()
232: @*/
233: PetscErrorCode PetscLimiterRegisterAll(void)
234: {
238: if (PetscLimiterRegisterAllCalled) return(0);
239: PetscLimiterRegisterAllCalled = PETSC_TRUE;
241: PetscLimiterRegister(PETSCLIMITERSIN, PetscLimiterCreate_Sin);
242: PetscLimiterRegister(PETSCLIMITERZERO, PetscLimiterCreate_Zero);
243: PetscLimiterRegister(PETSCLIMITERNONE, PetscLimiterCreate_None);
244: PetscLimiterRegister(PETSCLIMITERMINMOD, PetscLimiterCreate_Minmod);
245: PetscLimiterRegister(PETSCLIMITERVANLEER, PetscLimiterCreate_VanLeer);
246: PetscLimiterRegister(PETSCLIMITERVANALBADA, PetscLimiterCreate_VanAlbada);
247: PetscLimiterRegister(PETSCLIMITERSUPERBEE, PetscLimiterCreate_Superbee);
248: PetscLimiterRegister(PETSCLIMITERMC, PetscLimiterCreate_MC);
249: return(0);
250: }
252: PETSC_EXTERN PetscErrorCode PetscFVCreate_Upwind(PetscFV);
253: PETSC_EXTERN PetscErrorCode PetscFVCreate_LeastSquares(PetscFV);
255: /*@C
256: PetscFVRegisterAll - Registers all of the PetscFV components in the PetscFV package.
258: Not Collective
260: Input parameter:
261: . path - The dynamic library path
263: Level: advanced
265: .keywords: PetscFV, register, all
266: .seealso: PetscFVRegister(), PetscFVRegisterDestroy()
267: @*/
268: PetscErrorCode PetscFVRegisterAll(void)
269: {
273: if (PetscFVRegisterAllCalled) return(0);
274: PetscFVRegisterAllCalled = PETSC_TRUE;
276: PetscFVRegister(PETSCFVUPWIND, PetscFVCreate_Upwind);
277: PetscFVRegister(PETSCFVLEASTSQUARES, PetscFVCreate_LeastSquares);
278: return(0);
279: }
280: #include <petscds.h>
282: PETSC_EXTERN PetscErrorCode PetscDSCreate_Basic(PetscDS);
284: /*@C
285: PetscDSRegisterAll - Registers all of the PetscDS components in the PetscDS package.
287: Not Collective
289: Input parameter:
290: . path - The dynamic library path
292: Level: advanced
294: .keywords: PetscDS, register, all
295: .seealso: PetscDSRegister(), PetscDSRegisterDestroy()
296: @*/
297: PetscErrorCode PetscDSRegisterAll(void)
298: {
302: if (PetscDSRegisterAllCalled) return(0);
303: PetscDSRegisterAllCalled = PETSC_TRUE;
305: PetscDSRegister(PETSCDSBASIC, PetscDSCreate_Basic);
306: return(0);
307: }