Actual source code: dmregall.c

petsc-3.9.4 2018-09-11
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_Point(PetscSpace);

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

114:   Not Collective

116:   Input parameter:
117: . path - The dynamic library path

119:   Level: advanced

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

129:   if (PetscSpaceRegisterAllCalled) return(0);
130:   PetscSpaceRegisterAllCalled = PETSC_TRUE;

132:   PetscSpaceRegister(PETSCSPACEPOLYNOMIAL, PetscSpaceCreate_Polynomial);
133:   PetscSpaceRegister(PETSCSPACEPOINT,      PetscSpaceCreate_Point);
134:   return(0);
135: }

137: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Lagrange(PetscDualSpace);
138: PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Simple(PetscDualSpace);

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

143:   Not Collective

145:   Input parameter:
146: . path - The dynamic library path

148:   Level: advanced

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

158:   if (PetscDualSpaceRegisterAllCalled) return(0);
159:   PetscDualSpaceRegisterAllCalled = PETSC_TRUE;

161:   PetscDualSpaceRegister(PETSCDUALSPACELAGRANGE, PetscDualSpaceCreate_Lagrange);
162:   PetscDualSpaceRegister(PETSCDUALSPACESIMPLE,   PetscDualSpaceCreate_Simple);
163:   return(0);
164: }

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

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

176:   Not Collective

178:   Input parameter:
179: . path - The dynamic library path

181:   Level: advanced

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

191:   if (PetscFERegisterAllCalled) return(0);
192:   PetscFERegisterAllCalled = PETSC_TRUE;

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

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

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

216:   Not Collective

218:   Input parameter:
219: . path - The dynamic library path

221:   Level: advanced

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

231:   if (PetscLimiterRegisterAllCalled) return(0);
232:   PetscLimiterRegisterAllCalled = PETSC_TRUE;

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

245: PETSC_EXTERN PetscErrorCode PetscFVCreate_Upwind(PetscFV);
246: PETSC_EXTERN PetscErrorCode PetscFVCreate_LeastSquares(PetscFV);

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

251:   Not Collective

253:   Input parameter:
254: . path - The dynamic library path

256:   Level: advanced

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

266:   if (PetscFVRegisterAllCalled) return(0);
267:   PetscFVRegisterAllCalled = PETSC_TRUE;

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

275: PETSC_EXTERN PetscErrorCode PetscDSCreate_Basic(PetscDS);

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

280:   Not Collective

282:   Input parameter:
283: . path - The dynamic library path

285:   Level: advanced

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

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

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