Actual source code: dmregall.c

petsc-master 2020-01-15
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
 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);

 69:   PetscPartitionerRegisterAll();
 70:   return(0);
 71: }

 73: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Chaco(PetscPartitioner);
 74: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_ParMetis(PetscPartitioner);
 75: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_PTScotch(PetscPartitioner);
 76: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Shell(PetscPartitioner);
 77: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Simple(PetscPartitioner);
 78: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_Gather(PetscPartitioner);
 79: PETSC_EXTERN PetscErrorCode PetscPartitionerCreate_MatPartitioning(PetscPartitioner);

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

 84:   Not Collective

 86:   Input parameter:
 87: . path - The dynamic library path

 89:   Level: advanced

 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: .seealso:  PetscSpaceRegister(), PetscSpaceRegisterDestroy()
128: @*/
129: PetscErrorCode PetscSpaceRegisterAll(void)
130: {

134:   if (PetscSpaceRegisterAllCalled) return(0);
135:   PetscSpaceRegisterAllCalled = PETSC_TRUE;

137:   PetscSpaceRegister(PETSCSPACEPOLYNOMIAL, PetscSpaceCreate_Polynomial);
138:   PetscSpaceRegister(PETSCSPACETENSOR,     PetscSpaceCreate_Tensor);
139:   PetscSpaceRegister(PETSCSPACEPOINT,      PetscSpaceCreate_Point);
140:   PetscSpaceRegister(PETSCSPACESUBSPACE,   PetscSpaceCreate_Subspace);
141:   return(0);
142: }

144: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Lagrange(PetscDualSpace);
145: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_BDM(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: .seealso:  PetscDualSpaceRegister(), PetscDualSpaceRegisterDestroy()
159: @*/
160: PetscErrorCode PetscDualSpaceRegisterAll(void)
161: {

165:   if (PetscDualSpaceRegisterAllCalled) return(0);
166:   PetscDualSpaceRegisterAllCalled = PETSC_TRUE;

168:   PetscDualSpaceRegister(PETSCDUALSPACELAGRANGE, PetscDualSpaceCreate_Lagrange);
169:   PetscDualSpaceRegister(PETSCDUALSPACEBDM,      PetscDualSpaceCreate_BDM);
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: .seealso:  PetscFERegister(), PetscFERegisterDestroy()
192: @*/
193: PetscErrorCode PetscFERegisterAll(void)
194: {

198:   if (PetscFERegisterAllCalled) return(0);
199:   PetscFERegisterAllCalled = PETSC_TRUE;

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

210: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Sin(PetscLimiter);
211: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Zero(PetscLimiter);
212: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_None(PetscLimiter);
213: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Minmod(PetscLimiter);
214: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_VanLeer(PetscLimiter);
215: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_VanAlbada(PetscLimiter);
216: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Superbee(PetscLimiter);
217: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_MC(PetscLimiter);

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

222:   Not Collective

224:   Input parameter:
225: . path - The dynamic library path

227:   Level: advanced

229: .seealso:  PetscLimiterRegister(), PetscLimiterRegisterDestroy()
230: @*/
231: PetscErrorCode PetscLimiterRegisterAll(void)
232: {

236:   if (PetscLimiterRegisterAllCalled) return(0);
237:   PetscLimiterRegisterAllCalled = PETSC_TRUE;

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

250: PETSC_EXTERN PetscErrorCode PetscFVCreate_Upwind(PetscFV);
251: PETSC_EXTERN PetscErrorCode PetscFVCreate_LeastSquares(PetscFV);

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

256:   Not Collective

258:   Input parameter:
259: . path - The dynamic library path

261:   Level: advanced

263: .seealso:  PetscFVRegister(), PetscFVRegisterDestroy()
264: @*/
265: PetscErrorCode PetscFVRegisterAll(void)
266: {

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

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

279: PETSC_EXTERN PetscErrorCode PetscDSCreate_Basic(PetscDS);

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

284:   Not Collective

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

289:   Level: advanced

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: }