Actual source code: dmregall.c

petsc-master 2019-11-16
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);
 68:   return(0);
 69: }

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

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

 82:   Not Collective

 84:   Input parameter:
 85: . path - The dynamic library path

 87:   Level: advanced

 89: .seealso:  PetscPartitionerRegister(), PetscPartitionerRegisterDestroy()
 90: @*/
 91: PetscErrorCode PetscPartitionerRegisterAll(void)
 92: {

 96:   if (PetscPartitionerRegisterAllCalled) return(0);
 97:   PetscPartitionerRegisterAllCalled = PETSC_TRUE;

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

110: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Polynomial(PetscSpace);
111: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Tensor(PetscSpace);
112: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Point(PetscSpace);
113: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Subspace(PetscSpace);

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

118:   Not Collective

120:   Input parameter:
121: . path - The dynamic library path

123:   Level: advanced

125: .seealso:  PetscSpaceRegister(), PetscSpaceRegisterDestroy()
126: @*/
127: PetscErrorCode PetscSpaceRegisterAll(void)
128: {

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

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

142: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Lagrange(PetscDualSpace);
143: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_BDM(PetscDualSpace);
144: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Simple(PetscDualSpace);

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

149:   Not Collective

151:   Input parameter:
152: . path - The dynamic library path

154:   Level: advanced

156: .seealso:  PetscDualSpaceRegister(), PetscDualSpaceRegisterDestroy()
157: @*/
158: PetscErrorCode PetscDualSpaceRegisterAll(void)
159: {

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

166:   PetscDualSpaceRegister(PETSCDUALSPACELAGRANGE, PetscDualSpaceCreate_Lagrange);
167:   PetscDualSpaceRegister(PETSCDUALSPACEBDM,      PetscDualSpaceCreate_BDM);
168:   PetscDualSpaceRegister(PETSCDUALSPACESIMPLE,   PetscDualSpaceCreate_Simple);
169:   return(0);
170: }

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

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

182:   Not Collective

184:   Input parameter:
185: . path - The dynamic library path

187:   Level: advanced

189: .seealso:  PetscFERegister(), PetscFERegisterDestroy()
190: @*/
191: PetscErrorCode PetscFERegisterAll(void)
192: {

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

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

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

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

220:   Not Collective

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

225:   Level: advanced

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: .seealso:  PetscFVRegister(), PetscFVRegisterDestroy()
262: @*/
263: PetscErrorCode PetscFVRegisterAll(void)
264: {

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

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

277: PETSC_EXTERN PetscErrorCode PetscDSCreate_Basic(PetscDS);

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

282:   Not Collective

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

287:   Level: advanced

289: .seealso:  PetscDSRegister(), PetscDSRegisterDestroy()
290: @*/
291: PetscErrorCode PetscDSRegisterAll(void)
292: {

296:   if (PetscDSRegisterAllCalled) return(0);
297:   PetscDSRegisterAllCalled = PETSC_TRUE;

299:   PetscDSRegister(PETSCDSBASIC, PetscDSCreate_Basic);
300:   return(0);
301: }