Actual source code: dmregall.c

petsc-3.10.3 2018-12-18
Report Typos and Errors

  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

 27: /*@C
 28:   DMRegisterAll - Registers all of the DM components in the DM package.

 30:   Not Collective

 32:   Input parameter:
 33: . path - The dynamic library path

 35:   Level: advanced

 37: .keywords: DM, register, all
 38: .seealso:  DMRegister(), DMRegisterDestroy()
 39: @*/
 40: PetscErrorCode  DMRegisterAll(void)
 41: {

 45:   if (DMRegisterAllCalled) return(0);
 46:   DMRegisterAllCalled = PETSC_TRUE;

 48:   DMRegister(DMDA,         DMCreate_DA);
 49:   DMRegister(DMCOMPOSITE,  DMCreate_Composite);
 50:   DMRegister(DMSLICED,     DMCreate_Sliced);
 51:   DMRegister(DMSHELL,      DMCreate_Shell);
 52:   DMRegister(DMREDUNDANT,  DMCreate_Redundant);
 53:   DMRegister(DMPLEX,       DMCreate_Plex);
 54:   DMRegister(DMPATCH,      DMCreate_Patch);
 55:   DMRegister(DMSWARM,      DMCreate_Swarm);
 56: #if defined(PETSC_HAVE_MOAB)
 57:   DMRegister(DMMOAB,       DMCreate_Moab);
 58: #endif
 59:   DMRegister(DMNETWORK,    DMCreate_Network);
 60:   DMRegister(DMFOREST,     DMCreate_Forest);
 61: #if defined(PETSC_HAVE_P4EST)
 62:   DMRegister(DMP4EST,      DMCreate_p4est);
 63:   DMRegister(DMP8EST,      DMCreate_p8est);
 64: #endif
 65:   return(0);
 66: }

 68: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Chaco(PetscPartitioner);
 69: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_ParMetis(PetscPartitioner);
 70: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_PTScotch(PetscPartitioner);
 71: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Shell(PetscPartitioner);
 72: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Simple(PetscPartitioner);
 73: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Gather(PetscPartitioner);
 74: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_MatPartitioning(PetscPartitioner);

 76: /*@C
 77:   PetscPartitionerRegisterAll - Registers all of the PetscPartitioner components in the DM package.

 79:   Not Collective

 81:   Input parameter:
 82: . path - The dynamic library path

 84:   Level: advanced

 86: .keywords: PetscPartitioner, register, all
 87: .seealso:  PetscPartitionerRegister(), PetscPartitionerRegisterDestroy()
 88: @*/
 89: PetscErrorCode PetscPartitionerRegisterAll(void)
 90: {

 94:   if (PetscPartitionerRegisterAllCalled) return(0);
 95:   PetscPartitionerRegisterAllCalled = PETSC_TRUE;

 97:   PetscPartitionerRegister(PETSCPARTITIONERCHACO,    PetscPartitionerCreate_Chaco);
 98:   PetscPartitionerRegister(PETSCPARTITIONERPARMETIS, PetscPartitionerCreate_ParMetis);
 99:   PetscPartitionerRegister(PETSCPARTITIONERPTSCOTCH, PetscPartitionerCreate_PTScotch);
100:   PetscPartitionerRegister(PETSCPARTITIONERSHELL,    PetscPartitionerCreate_Shell);
101:   PetscPartitionerRegister(PETSCPARTITIONERSIMPLE,   PetscPartitionerCreate_Simple);
102:   PetscPartitionerRegister(PETSCPARTITIONERGATHER,   PetscPartitionerCreate_Gather);
103:   PetscPartitionerRegister(PETSCPARTITIONERMATPARTITIONING, PetscPartitionerCreate_MatPartitioning);
104:   return(0);
105: }
106:  #include <petscfe.h>

108: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Polynomial(PetscSpace);
109: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Tensor(PetscSpace);
110: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Point(PetscSpace);
111: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Subspace(PetscSpace);

113: /*@C
114:   PetscSpaceRegisterAll - Registers all of the PetscSpace components in the PetscFE package.

116:   Not Collective

118:   Input parameter:
119: . path - The dynamic library path

121:   Level: advanced

123: .keywords: PetscSpace, register, all
124: .seealso:  PetscSpaceRegister(), PetscSpaceRegisterDestroy()
125: @*/
126: PetscErrorCode PetscSpaceRegisterAll(void)
127: {

131:   if (PetscSpaceRegisterAllCalled) return(0);
132:   PetscSpaceRegisterAllCalled = PETSC_TRUE;

134:   PetscSpaceRegister(PETSCSPACEPOLYNOMIAL, PetscSpaceCreate_Polynomial);
135:   PetscSpaceRegister(PETSCSPACETENSOR,     PetscSpaceCreate_Tensor);
136:   PetscSpaceRegister(PETSCSPACEPOINT,      PetscSpaceCreate_Point);
137:   PetscSpaceRegister(PETSCSPACESUBSPACE,   PetscSpaceCreate_Subspace);
138:   return(0);
139: }

141: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Lagrange(PetscDualSpace);
142: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Simple(PetscDualSpace);

144: /*@C
145:   PetscDualSpaceRegisterAll - Registers all of the PetscDualSpace components in the PetscFE package.

147:   Not Collective

149:   Input parameter:
150: . path - The dynamic library path

152:   Level: advanced

154: .keywords: PetscDualSpace, register, all
155: .seealso:  PetscDualSpaceRegister(), PetscDualSpaceRegisterDestroy()
156: @*/
157: PetscErrorCode PetscDualSpaceRegisterAll(void)
158: {

162:   if (PetscDualSpaceRegisterAllCalled) return(0);
163:   PetscDualSpaceRegisterAllCalled = PETSC_TRUE;

165:   PetscDualSpaceRegister(PETSCDUALSPACELAGRANGE, PetscDualSpaceCreate_Lagrange);
166:   PetscDualSpaceRegister(PETSCDUALSPACESIMPLE,   PetscDualSpaceCreate_Simple);
167:   return(0);
168: }

170: PETSC_EXTERN PetscErrorCode PetscFECreate_Basic(PetscFE);
171: PETSC_EXTERN PetscErrorCode PetscFECreate_Nonaffine(PetscFE);
172: PETSC_EXTERN PetscErrorCode PetscFECreate_Composite(PetscFE);
173: #if defined(PETSC_HAVE_OPENCL)
174: PETSC_EXTERN PetscErrorCode PetscFECreate_OpenCL(PetscFE);
175: #endif

177: /*@C
178:   PetscFERegisterAll - Registers all of the PetscFE components in the PetscFE package.

180:   Not Collective

182:   Input parameter:
183: . path - The dynamic library path

185:   Level: advanced

187: .keywords: PetscFE, register, all
188: .seealso:  PetscFERegister(), PetscFERegisterDestroy()
189: @*/
190: PetscErrorCode PetscFERegisterAll(void)
191: {

195:   if (PetscFERegisterAllCalled) return(0);
196:   PetscFERegisterAllCalled = PETSC_TRUE;

198:   PetscFERegister(PETSCFEBASIC,     PetscFECreate_Basic);
199:   PetscFERegister(PETSCFECOMPOSITE, PetscFECreate_Composite);
200: #if defined(PETSC_HAVE_OPENCL)
201:   PetscFERegister(PETSCFEOPENCL, PetscFECreate_OpenCL);
202: #endif
203:   return(0);
204: }
205:  #include <petscfv.h>

207: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Sin(PetscLimiter);
208: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Zero(PetscLimiter);
209: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_None(PetscLimiter);
210: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Minmod(PetscLimiter);
211: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_VanLeer(PetscLimiter);
212: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_VanAlbada(PetscLimiter);
213: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Superbee(PetscLimiter);
214: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_MC(PetscLimiter);

216: /*@C
217:   PetscLimiterRegisterAll - Registers all of the PetscLimiter components in the PetscFV package.

219:   Not Collective

221:   Input parameter:
222: . path - The dynamic library path

224:   Level: advanced

226: .keywords: PetscLimiter, register, all
227: .seealso:  PetscLimiterRegister(), PetscLimiterRegisterDestroy()
228: @*/
229: PetscErrorCode PetscLimiterRegisterAll(void)
230: {

234:   if (PetscLimiterRegisterAllCalled) return(0);
235:   PetscLimiterRegisterAllCalled = PETSC_TRUE;

237:   PetscLimiterRegister(PETSCLIMITERSIN,       PetscLimiterCreate_Sin);
238:   PetscLimiterRegister(PETSCLIMITERZERO,      PetscLimiterCreate_Zero);
239:   PetscLimiterRegister(PETSCLIMITERNONE,      PetscLimiterCreate_None);
240:   PetscLimiterRegister(PETSCLIMITERMINMOD,    PetscLimiterCreate_Minmod);
241:   PetscLimiterRegister(PETSCLIMITERVANLEER,   PetscLimiterCreate_VanLeer);
242:   PetscLimiterRegister(PETSCLIMITERVANALBADA, PetscLimiterCreate_VanAlbada);
243:   PetscLimiterRegister(PETSCLIMITERSUPERBEE,  PetscLimiterCreate_Superbee);
244:   PetscLimiterRegister(PETSCLIMITERMC,        PetscLimiterCreate_MC);
245:   return(0);
246: }

248: PETSC_EXTERN PetscErrorCode PetscFVCreate_Upwind(PetscFV);
249: PETSC_EXTERN PetscErrorCode PetscFVCreate_LeastSquares(PetscFV);

251: /*@C
252:   PetscFVRegisterAll - Registers all of the PetscFV components in the PetscFV package.

254:   Not Collective

256:   Input parameter:
257: . path - The dynamic library path

259:   Level: advanced

261: .keywords: PetscFV, register, all
262: .seealso:  PetscFVRegister(), PetscFVRegisterDestroy()
263: @*/
264: PetscErrorCode PetscFVRegisterAll(void)
265: {

269:   if (PetscFVRegisterAllCalled) return(0);
270:   PetscFVRegisterAllCalled = PETSC_TRUE;

272:   PetscFVRegister(PETSCFVUPWIND,       PetscFVCreate_Upwind);
273:   PetscFVRegister(PETSCFVLEASTSQUARES, PetscFVCreate_LeastSquares);
274:   return(0);
275: }
276:  #include <petscds.h>

278: PETSC_EXTERN PetscErrorCode PetscDSCreate_Basic(PetscDS);

280: /*@C
281:   PetscDSRegisterAll - Registers all of the PetscDS components in the PetscDS package.

283:   Not Collective

285:   Input parameter:
286: . path - The dynamic library path

288:   Level: advanced

290: .keywords: PetscDS, register, all
291: .seealso:  PetscDSRegister(), PetscDSRegisterDestroy()
292: @*/
293: PetscErrorCode PetscDSRegisterAll(void)
294: {

298:   if (PetscDSRegisterAllCalled) return(0);
299:   PetscDSRegisterAllCalled = PETSC_TRUE;

301:   PetscDSRegister(PETSCDSBASIC, PetscDSCreate_Basic);
302:   return(0);
303: }