Actual source code: dmregall.c

petsc-3.8.4 2018-03-24
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);

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

 78:   Not Collective

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

 83:   Level: advanced

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

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

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

106: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Polynomial(PetscSpace);
107: PETSC_EXTERN PetscErrorCode PetscSpaceCreate_Point(PetscSpace);

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

112:   Not Collective

114:   Input parameter:
115: . path - The dynamic library path

117:   Level: advanced

119: .keywords: PetscSpace, register, all
120: .seealso:  PetscSpaceRegister(), PetscSpaceRegisterDestroy()
121: @*/
122: PetscErrorCode PetscSpaceRegisterAll(void)
123: {

127:   if (PetscSpaceRegisterAllCalled) return(0);
128:   PetscSpaceRegisterAllCalled = PETSC_TRUE;

130:   PetscSpaceRegister(PETSCSPACEPOLYNOMIAL, PetscSpaceCreate_Polynomial);
131:   PetscSpaceRegister(PETSCSPACEPOINT,      PetscSpaceCreate_Point);
132:   return(0);
133: }

135: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Lagrange(PetscDualSpace);
136: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Simple(PetscDualSpace);

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

141:   Not Collective

143:   Input parameter:
144: . path - The dynamic library path

146:   Level: advanced

148: .keywords: PetscDualSpace, register, all
149: .seealso:  PetscDualSpaceRegister(), PetscDualSpaceRegisterDestroy()
150: @*/
151: PetscErrorCode PetscDualSpaceRegisterAll(void)
152: {

156:   if (PetscDualSpaceRegisterAllCalled) return(0);
157:   PetscDualSpaceRegisterAllCalled = PETSC_TRUE;

159:   PetscDualSpaceRegister(PETSCDUALSPACELAGRANGE, PetscDualSpaceCreate_Lagrange);
160:   PetscDualSpaceRegister(PETSCDUALSPACESIMPLE,   PetscDualSpaceCreate_Simple);
161:   return(0);
162: }

164: PETSC_EXTERN PetscErrorCode PetscFECreate_Basic(PetscFE);
165: PETSC_EXTERN PetscErrorCode PetscFECreate_Nonaffine(PetscFE);
166: PETSC_EXTERN PetscErrorCode PetscFECreate_Composite(PetscFE);
167: #ifdef PETSC_HAVE_OPENCL
168: PETSC_EXTERN PetscErrorCode PetscFECreate_OpenCL(PetscFE);
169: #endif

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

174:   Not Collective

176:   Input parameter:
177: . path - The dynamic library path

179:   Level: advanced

181: .keywords: PetscFE, register, all
182: .seealso:  PetscFERegister(), PetscFERegisterDestroy()
183: @*/
184: PetscErrorCode PetscFERegisterAll(void)
185: {

189:   if (PetscFERegisterAllCalled) return(0);
190:   PetscFERegisterAllCalled = PETSC_TRUE;

192:   PetscFERegister(PETSCFEBASIC,     PetscFECreate_Basic);
193:   PetscFERegister(PETSCFENONAFFINE, PetscFECreate_Nonaffine);
194:   PetscFERegister(PETSCFECOMPOSITE, PetscFECreate_Composite);
195: #ifdef PETSC_HAVE_OPENCL
196:   PetscFERegister(PETSCFEOPENCL, PetscFECreate_OpenCL);
197: #endif
198:   return(0);
199: }
200:  #include <petscfv.h>

202: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Sin(PetscLimiter);
203: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Zero(PetscLimiter);
204: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_None(PetscLimiter);
205: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Minmod(PetscLimiter);
206: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_VanLeer(PetscLimiter);
207: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_VanAlbada(PetscLimiter);
208: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_Superbee(PetscLimiter);
209: PETSC_EXTERN PetscErrorCode PetscLimiterCreate_MC(PetscLimiter);

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

214:   Not Collective

216:   Input parameter:
217: . path - The dynamic library path

219:   Level: advanced

221: .keywords: PetscLimiter, register, all
222: .seealso:  PetscLimiterRegister(), PetscLimiterRegisterDestroy()
223: @*/
224: PetscErrorCode PetscLimiterRegisterAll(void)
225: {

229:   if (PetscLimiterRegisterAllCalled) return(0);
230:   PetscLimiterRegisterAllCalled = PETSC_TRUE;

232:   PetscLimiterRegister(PETSCLIMITERSIN,       PetscLimiterCreate_Sin);
233:   PetscLimiterRegister(PETSCLIMITERZERO,      PetscLimiterCreate_Zero);
234:   PetscLimiterRegister(PETSCLIMITERNONE,      PetscLimiterCreate_None);
235:   PetscLimiterRegister(PETSCLIMITERMINMOD,    PetscLimiterCreate_Minmod);
236:   PetscLimiterRegister(PETSCLIMITERVANLEER,   PetscLimiterCreate_VanLeer);
237:   PetscLimiterRegister(PETSCLIMITERVANALBADA, PetscLimiterCreate_VanAlbada);
238:   PetscLimiterRegister(PETSCLIMITERSUPERBEE,  PetscLimiterCreate_Superbee);
239:   PetscLimiterRegister(PETSCLIMITERMC,        PetscLimiterCreate_MC);
240:   return(0);
241: }

243: PETSC_EXTERN PetscErrorCode PetscFVCreate_Upwind(PetscFV);
244: PETSC_EXTERN PetscErrorCode PetscFVCreate_LeastSquares(PetscFV);

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

249:   Not Collective

251:   Input parameter:
252: . path - The dynamic library path

254:   Level: advanced

256: .keywords: PetscFV, register, all
257: .seealso:  PetscFVRegister(), PetscFVRegisterDestroy()
258: @*/
259: PetscErrorCode PetscFVRegisterAll(void)
260: {

264:   if (PetscFVRegisterAllCalled) return(0);
265:   PetscFVRegisterAllCalled = PETSC_TRUE;

267:   PetscFVRegister(PETSCFVUPWIND,       PetscFVCreate_Upwind);
268:   PetscFVRegister(PETSCFVLEASTSQUARES, PetscFVCreate_LeastSquares);
269:   return(0);
270: }
271:  #include <petscds.h>

273: PETSC_EXTERN PetscErrorCode PetscDSCreate_Basic(PetscDS);

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

278:   Not Collective

280:   Input parameter:
281: . path - The dynamic library path

283:   Level: advanced

285: .keywords: PetscDS, register, all
286: .seealso:  PetscDSRegister(), PetscDSRegisterDestroy()
287: @*/
288: PetscErrorCode PetscDSRegisterAll(void)
289: {

293:   if (PetscDSRegisterAllCalled) return(0);
294:   PetscDSRegisterAllCalled = PETSC_TRUE;

296:   PetscDSRegister(PETSCDSBASIC, PetscDSCreate_Basic);
297:   return(0);
298: }