Actual source code: ex1.c
petsc-3.8.4 2018-03-24
1: static char help[] = "Run C version of TetGen to construct and refine a mesh\n\n";
3: #include <petscdmplex.h>
5: typedef enum {BOX, CYLINDER} DomainShape;
6: enum {STAGE_LOAD, STAGE_DISTRIBUTE, STAGE_REFINE, STAGE_OVERLAP};
8: typedef struct {
9: DM dm; /* REQUIRED in order to use SNES evaluation functions */
10: PetscInt debug; /* The debugging level */
11: PetscLogEvent createMeshEvent;
12: PetscLogStage stages[4];
13: /* Domain and mesh definition */
14: PetscInt dim; /* The topological mesh dimension */
15: PetscBool interpolate; /* Generate intermediate mesh elements */
16: PetscReal refinementLimit; /* The largest allowable cell volume */
17: PetscBool cellSimplex; /* Use simplices or hexes */
18: PetscBool cellWedge; /* Use wedges */
19: PetscBool simplex2tensor; /* Refine simplicials in hexes */
20: DomainShape domainShape; /* Shep of the region to be meshed */
21: DMBoundaryType periodicity[3]; /* The domain periodicity */
22: char filename[PETSC_MAX_PATH_LEN]; /* Import mesh from file */
23: char bdfilename[PETSC_MAX_PATH_LEN]; /* Import mesh boundary from file */
24: PetscBool testPartition; /* Use a fixed partitioning for testing */
25: PetscInt overlap; /* The cell overlap to use during partitioning */
26: PetscBool testShape; /* Test the cell shape quality */
27: } AppCtx;
29: PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *options)
30: {
31: const char *dShapes[2] = {"box", "cylinder"};
32: PetscInt shape, bd;
36: options->debug = 0;
37: options->dim = 2;
38: options->interpolate = PETSC_FALSE;
39: options->refinementLimit = 0.0;
40: options->cellSimplex = PETSC_TRUE;
41: options->cellWedge = PETSC_FALSE;
42: options->domainShape = BOX;
43: options->periodicity[0] = DM_BOUNDARY_NONE;
44: options->periodicity[1] = DM_BOUNDARY_NONE;
45: options->periodicity[2] = DM_BOUNDARY_NONE;
46: options->filename[0] = '\0';
47: options->bdfilename[0] = '\0';
48: options->testPartition = PETSC_FALSE;
49: options->overlap = PETSC_FALSE;
50: options->testShape = PETSC_FALSE;
51: options->simplex2tensor = PETSC_FALSE;
53: PetscOptionsBegin(comm, "", "Meshing Problem Options", "DMPLEX");
54: PetscOptionsInt("-debug", "The debugging level", "ex1.c", options->debug, &options->debug, NULL);
55: PetscOptionsInt("-dim", "The topological mesh dimension", "ex1.c", options->dim, &options->dim, NULL);
56: PetscOptionsBool("-interpolate", "Generate intermediate mesh elements", "ex1.c", options->interpolate, &options->interpolate, NULL);
57: PetscOptionsReal("-refinement_limit", "The largest allowable cell volume", "ex1.c", options->refinementLimit, &options->refinementLimit, NULL);
58: PetscOptionsBool("-cell_simplex", "Use simplices if true, otherwise hexes", "ex1.c", options->cellSimplex, &options->cellSimplex, NULL);
59: PetscOptionsBool("-cell_wedge", "Use wedges if true", "ex1.c", options->cellWedge, &options->cellWedge, NULL);
60: PetscOptionsBool("-simplex2tensor", "Refine simplicial cells in tensor product cells", "ex1.c", options->simplex2tensor, &options->simplex2tensor, NULL);
61: if (options->simplex2tensor) options->interpolate = PETSC_TRUE;
62: shape = options->domainShape;
63: PetscOptionsEList("-domain_shape","The shape of the domain","ex1.c", dShapes, 2, dShapes[options->domainShape], &shape, NULL);
64: options->domainShape = (DomainShape) shape;
65: bd = options->periodicity[0];
66: PetscOptionsEList("-x_periodicity", "The x-boundary periodicity", "ex1.c", DMBoundaryTypes, 5, DMBoundaryTypes[options->periodicity[0]], &bd, NULL);
67: options->periodicity[0] = (DMBoundaryType) bd;
68: bd = options->periodicity[1];
69: PetscOptionsEList("-y_periodicity", "The y-boundary periodicity", "ex1.c", DMBoundaryTypes, 5, DMBoundaryTypes[options->periodicity[1]], &bd, NULL);
70: options->periodicity[1] = (DMBoundaryType) bd;
71: bd = options->periodicity[2];
72: PetscOptionsEList("-z_periodicity", "The z-boundary periodicity", "ex1.c", DMBoundaryTypes, 5, DMBoundaryTypes[options->periodicity[2]], &bd, NULL);
73: options->periodicity[2] = (DMBoundaryType) bd;
74: PetscOptionsString("-filename", "The mesh file", "ex1.c", options->filename, options->filename, PETSC_MAX_PATH_LEN, NULL);
75: PetscOptionsString("-bd_filename", "The mesh boundary file", "ex1.c", options->bdfilename, options->bdfilename, PETSC_MAX_PATH_LEN, NULL);
76: PetscOptionsBool("-test_partition", "Use a fixed partition for testing", "ex1.c", options->testPartition, &options->testPartition, NULL);
77: PetscOptionsInt("-overlap", "The cell overlap for partitioning", "ex1.c", options->overlap, &options->overlap, NULL);
78: PetscOptionsBool("-test_shape", "Report cell shape qualities (Jacobian condition numbers)", "ex1.c", options->testShape, &options->testShape, NULL);
79: PetscOptionsEnd();
81: PetscLogEventRegister("CreateMesh", DM_CLASSID, &options->createMeshEvent);
82: PetscLogStageRegister("MeshLoad", &options->stages[STAGE_LOAD]);
83: PetscLogStageRegister("MeshDistribute", &options->stages[STAGE_DISTRIBUTE]);
84: PetscLogStageRegister("MeshRefine", &options->stages[STAGE_REFINE]);
85: PetscLogStageRegister("MeshOverlap", &options->stages[STAGE_OVERLAP]);
86: return(0);
87: }
89: PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *user, DM *dm)
90: {
91: PetscInt dim = user->dim;
92: PetscBool interpolate = user->interpolate;
93: PetscReal refinementLimit = user->refinementLimit;
94: PetscBool cellSimplex = user->cellSimplex;
95: PetscBool cellWedge = user->cellWedge;
96: PetscBool simplex2tensor = user->simplex2tensor;
97: const char *filename = user->filename;
98: const char *bdfilename = user->bdfilename;
99: PetscInt triSizes_n2[2] = {4, 4};
100: PetscInt triPoints_n2[8] = {3, 5, 6, 7, 0, 1, 2, 4};
101: PetscInt triSizes_n8[8] = {1, 1, 1, 1, 1, 1, 1, 1};
102: PetscInt triPoints_n8[8] = {0, 1, 2, 3, 4, 5, 6, 7};
103: PetscInt quadSizes[2] = {2, 2};
104: PetscInt quadPoints[4] = {2, 3, 0, 1};
105: PetscInt gmshSizes_n3[3] = {14, 14, 14};
106: PetscInt gmshPoints_n3[42] = {1, 2, 4, 5, 9, 10, 11, 15, 16, 20, 21, 27, 28, 29,
107: 3, 8, 12, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
108: 0, 6, 7, 13, 14, 17, 18, 19, 22, 23, 24, 25, 26, 41};
109: PetscInt fluentSizes_n3[3] = {50, 50, 50};
110: PetscInt fluentPoints_n3[150] = { 5, 6, 7, 8, 12, 14, 16, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 50, 51, 80, 81, 89,
111: 91, 93, 94, 95, 96, 97, 98, 99, 100, 101, 104, 121, 122, 124, 125, 126, 127, 128, 129, 131, 133, 143, 144, 145, 147,
112: 1, 3, 4, 9, 10, 17, 18, 19, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 47, 61, 71, 72, 73, 74,
113: 75, 76, 77, 78, 79, 86, 87, 88, 90, 92, 113, 115, 116, 117, 118, 119, 120, 123, 138, 140, 141, 142, 146, 148, 149,
114: 0, 2, 11, 13, 15, 20, 21, 22, 23, 49, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67,
115: 68, 69, 70, 82, 83, 84, 85, 102, 103, 105, 106, 107, 108, 109, 110, 111, 112, 114, 130, 132, 134, 135, 136, 137, 139};
116: const PetscInt cells[3] = {2, 2, 2};
117: size_t len, bdlen;
118: PetscMPIInt rank, size;
122: PetscLogEventBegin(user->createMeshEvent,0,0,0,0);
123: MPI_Comm_rank(comm, &rank);
124: MPI_Comm_size(comm, &size);
125: PetscStrlen(filename, &len);
126: PetscStrlen(bdfilename, &bdlen);
127: PetscLogStagePush(user->stages[STAGE_LOAD]);
128: if (len) {
129: DMPlexCreateFromFile(comm, filename, interpolate, dm);
130: } else if (bdlen) {
131: DM boundary;
133: DMPlexCreateFromFile(comm, bdfilename, interpolate, &boundary);
134: DMPlexGenerate(boundary, NULL, interpolate, dm);
135: DMDestroy(&boundary);
136: } else {
137: switch (user->domainShape) {
138: case BOX:
139: if (cellSimplex) {DMPlexCreateBoxMesh(comm, dim, dim == 2 ? 2 : 1, interpolate, dm);}
140: else {DMPlexCreateHexBoxMesh(comm, dim, cells, user->periodicity[0], user->periodicity[1], user->periodicity[2], dm);}
141: break;
142: case CYLINDER:
143: if (cellSimplex) SETERRQ(comm, PETSC_ERR_ARG_WRONG, "Cannot mesh a cylinder with simplices");
144: if (dim != 3) SETERRQ1(comm, PETSC_ERR_ARG_WRONG, "Dimension must be 3 for a cylinder mesh, not %D", dim);
145: if (cellWedge) {
146: DMPlexCreateWedgeCylinderMesh(comm, 6, PETSC_FALSE, dm);
147: } else {
148: DMPlexCreateHexCylinderMesh(comm, 3, user->periodicity[2], dm);
149: DMLocalizeCoordinates(*dm);
150: }
151: break;
152: default: SETERRQ1(comm, PETSC_ERR_ARG_WRONG, "Unknown domain shape %D", user->domainShape);
153: }
154: }
155: PetscLogStagePop();
156: {
157: DM refinedMesh = NULL;
158: DM distributedMesh = NULL;
160: if (user->testPartition) {
161: const PetscInt *sizes = NULL;
162: const PetscInt *points = NULL;
163: PetscPartitioner part;
165: if (!rank) {
166: if (dim == 2 && cellSimplex && size == 2) {
167: sizes = triSizes_n2; points = triPoints_n2;
168: } else if (dim == 2 && cellSimplex && size == 8) {
169: sizes = triSizes_n8; points = triPoints_n8;
170: } else if (dim == 2 && !cellSimplex && size == 2) {
171: sizes = quadSizes; points = quadPoints;
172: } else if (dim == 2 && size == 3) {
173: PetscInt Nc;
175: DMPlexGetHeightStratum(*dm, 0, NULL, &Nc);
176: if (Nc == 42) { /* Gmsh 3 & 4 */
177: sizes = gmshSizes_n3; points = gmshPoints_n3;
178: } else if (Nc == 150) { /* Fluent 1 */
179: sizes = fluentSizes_n3; points = fluentPoints_n3;
180: } else if (Nc == 42) { /* Med 1 */
181: } else if (Nc == 161) { /* Med 3 */
182: }
183: }
184: }
185: DMPlexGetPartitioner(*dm, &part);
186: PetscPartitionerSetType(part, PETSCPARTITIONERSHELL);
187: PetscPartitionerShellSetPartition(part, size, sizes, points);
188: } else {
189: PetscPartitioner part;
191: DMPlexGetPartitioner(*dm,&part);
192: PetscPartitionerSetFromOptions(part);
193: }
194: /* Distribute mesh over processes */
195: PetscLogStagePush(user->stages[STAGE_DISTRIBUTE]);
196: DMPlexDistribute(*dm, 0, NULL, &distributedMesh);
197: if (distributedMesh) {
198: DMDestroy(dm);
199: *dm = distributedMesh;
200: }
201: PetscLogStagePop();
202: /* Refine mesh using a volume constraint */
203: PetscLogStagePush(user->stages[STAGE_REFINE]);
204: DMPlexSetRefinementUniform(*dm, PETSC_FALSE);
205: DMPlexSetRefinementLimit(*dm, refinementLimit);
206: DMRefine(*dm, comm, &refinedMesh);
207: if (refinedMesh) {
208: DMDestroy(dm);
209: *dm = refinedMesh;
210: }
211: PetscLogStagePop();
212: }
213: PetscLogStagePush(user->stages[STAGE_REFINE]);
214: DMSetFromOptions(*dm);
215: PetscLogStagePop();
216: if (user->overlap) {
217: DM overlapMesh = NULL;
218: /* Add the level-1 overlap to refined mesh */
219: PetscLogStagePush(user->stages[STAGE_OVERLAP]);
220: DMPlexDistributeOverlap(*dm, 1, NULL, &overlapMesh);
221: if (overlapMesh) {
222: DMView(overlapMesh, PETSC_VIEWER_STDOUT_WORLD);
223: DMDestroy(dm);
224: *dm = overlapMesh;
225: }
226: PetscLogStagePop();
227: }
228: if (simplex2tensor) {
229: DM rdm = NULL;
230: DMPlexSetRefinementUniform(*dm, PETSC_TRUE);
231: DMPlexRefineSimplexToTensor(*dm, &rdm);
232: if (rdm) {
233: DMDestroy(dm);
234: *dm = rdm;
235: }
236: }
237: PetscObjectSetName((PetscObject) *dm, "Simplicial Mesh");
238: DMViewFromOptions(*dm, NULL, "-dm_view");
239: PetscLogEventEnd(user->createMeshEvent,0,0,0,0);
240: user->dm = *dm;
241: return(0);
242: }
244: typedef struct ex1_stats
245: {
246: PetscReal min, max, sum, squaresum;
247: PetscInt count;
248: }
249: ex1_stats_t;
251: static void ex1_stats_reduce(void *a, void *b, int * len, MPI_Datatype *datatype)
252: {
253: PetscInt i, N = *len;
255: for (i = 0; i < N; i++) {
256: ex1_stats_t *A = (ex1_stats_t *) a;
257: ex1_stats_t *B = (ex1_stats_t *) b;
259: B->min = PetscMin(A->min,B->min);
260: B->max = PetscMax(A->max,B->max);
261: B->sum += A->sum;
262: B->squaresum += A->squaresum;
263: B->count += A->count;
264: }
265: }
267: static PetscErrorCode TestCellShape(DM dm)
268: {
269: PetscMPIInt rank,size;
270: PetscInt dim, c, cStart, cEnd, count = 0;
271: ex1_stats_t stats, globalStats;
272: PetscReal *J, *invJ, min = 0, max = 0, mean = 0, stdev = 0;
273: MPI_Comm comm = PetscObjectComm((PetscObject)dm);
274: DM dmCoarse;
278: stats.min = PETSC_MAX_REAL;
279: stats.max = PETSC_MIN_REAL;
280: stats.sum = stats.squaresum = 0.;
281: stats.count = 0;
283: DMGetDimension(dm,&dim);
285: PetscMalloc2(dim * dim, &J, dim * dim, &invJ);
287: DMPlexGetHeightStratum(dm,0,&cStart,&cEnd);
288: for (c = cStart; c < cEnd; c++) {
289: PetscInt i;
290: PetscReal frobJ = 0., frobInvJ = 0., cond2, cond, detJ;
292: DMPlexComputeCellGeometryAffineFEM(dm,c,NULL,J,invJ,&detJ);
293: if (detJ < 0.0) SETERRQ1(PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Mesh cell %D is inverted", c);
295: for (i = 0; i < dim * dim; i++) {
296: frobJ += J[i] * J[i];
297: frobInvJ += invJ[i] * invJ[i];
298: }
299: cond2 = frobJ * frobInvJ;
300: cond = PetscSqrtReal(cond2);
302: stats.min = PetscMin(stats.min,cond);
303: stats.max = PetscMax(stats.max,cond);
304: stats.sum += cond;
305: stats.squaresum += cond2;
306: stats.count++;
307: }
309: MPI_Comm_size(comm,&size);
310: if (size > 1) {
311: PetscMPIInt blockLengths[2] = {4,1};
312: MPI_Aint blockOffsets[2] = {offsetof(ex1_stats_t,min),offsetof(ex1_stats_t,count)};
313: MPI_Datatype blockTypes[2] = {MPIU_REAL,MPIU_INT}, statType;
314: MPI_Op statReduce;
316: MPI_Type_create_struct(2,blockLengths,blockOffsets,blockTypes,&statType);
317: MPI_Type_commit(&statType);
318: MPI_Op_create(ex1_stats_reduce, PETSC_TRUE, &statReduce);
319: MPI_Reduce(&stats,&globalStats,1,statType,statReduce,0,comm);
320: MPI_Op_free(&statReduce);
321: MPI_Type_free(&statType);
322: } else {
323: PetscMemcpy(&globalStats,&stats,sizeof(stats));
324: }
326: MPI_Comm_rank(comm,&rank);
327: if (!rank) {
328: count = globalStats.count;
329: min = globalStats.min;
330: max = globalStats.max;
331: mean = globalStats.sum / globalStats.count;
332: stdev = PetscSqrtReal(globalStats.squaresum / globalStats.count - mean * mean);
333: }
334: PetscPrintf(comm,"Mesh with %d cells, shape condition numbers: min = %g, max = %g, mean = %g, stddev = %g\n", count, (double) min, (double) max, (double) mean, (double) stdev);
336: PetscFree2(J,invJ);
338: DMGetCoarseDM(dm,&dmCoarse);
339: if (dmCoarse) {
340: TestCellShape(dmCoarse);
341: }
343: return(0);
344: }
346: int main(int argc, char **argv)
347: {
348: AppCtx user; /* user-defined work context */
351: PetscInitialize(&argc, &argv, NULL, help);if (ierr) return ierr;
352: ProcessOptions(PETSC_COMM_WORLD, &user);
353: CreateMesh(PETSC_COMM_WORLD, &user, &user.dm);
354: if (user.testShape) {
355: TestCellShape(user.dm);
356: }
357: DMDestroy(&user.dm);
358: PetscFinalize();
359: return ierr;
360: }
362: /*TEST
364: # CTetGen 0-1
365: test:
366: suffix: 0
367: requires: ctetgen
368: args: -dim 3 -ctetgen_verbose 4 -dm_view ascii::ascii_info_detail -info -info_exclude null
369: test:
370: suffix: 1
371: requires: ctetgen
372: args: -dim 3 -ctetgen_verbose 4 -refinement_limit 0.0625 -dm_view ascii::ascii_info_detail -info -info_exclude null
374: # 2D LaTex and ASCII output 2-9
375: test:
376: suffix: 2
377: requires: triangle
378: args: -dim 2 -dm_view ascii::ascii_latex
379: test:
380: suffix: 3
381: requires: triangle
382: args: -dim 2 -dm_refine 1 -interpolate 1 -dm_view ascii::ascii_info_detail
383: test:
384: suffix: 4
385: requires: triangle
386: nsize: 2
387: args: -dim 2 -dm_refine 1 -interpolate 1 -test_partition -dm_view ascii::ascii_info_detail
388: test:
389: suffix: 5
390: requires: triangle
391: nsize: 2
392: args: -dim 2 -dm_refine 1 -interpolate 1 -test_partition -dm_view ascii::ascii_latex
393: test:
394: suffix: 6
395: args: -dim 2 -cell_simplex 0 -dm_view ascii::ascii_info_detail
396: test:
397: suffix: 7
398: args: -dim 2 -cell_simplex 0 -dm_refine 1 -dm_view ascii::ascii_info_detail
399: test:
400: suffix: 8
401: nsize: 2
402: args: -dim 2 -cell_simplex 0 -dm_refine 1 -interpolate 1 -test_partition -dm_view ascii::ascii_latex
404: # Parallel refinement tests with overlap
405: test:
406: suffix: refine_overlap_0
407: requires: triangle
408: nsize: 2
409: requires: triangle
410: args: -dim 2 -cell_simplex 1 -dm_refine 1 -interpolate 1 -test_partition -overlap 1 -dm_view ascii::ascii_info_detail
411: test:
412: suffix: refine_overlap_1
413: requires: triangle
414: nsize: 8
415: args: -dim 2 -cell_simplex 1 -dm_refine 1 -interpolate 1 -test_partition -overlap 1 -dm_view ascii::ascii_info_detail
417: # Parallel simple partitioner tests
418: test:
419: suffix: part_simple_0
420: requires: triangle
421: nsize: 2
422: args: -dim 2 -cell_simplex 1 -dm_refine 0 -interpolate 0 -petscpartitioner_type simple -partition_view -dm_view ascii::ascii_info_detail
423: test:
424: suffix: part_simple_1
425: requires: triangle
426: nsize: 8
427: args: -dim 2 -cell_simplex 1 -dm_refine 1 -interpolate 1 -petscpartitioner_type simple -partition_view -dm_view ascii::ascii_info_detail
429: # Parallel ptscotch partitioner tests
430: test:
431: suffix: part_ptscotch_0
432: requires: ptscotch
433: nsize: 2
434: args: -dim 2 -cell_simplex 0 -dm_refine 0 -interpolate 0 -petscpartitioner_type ptscotch -petscpartitioner_view -petscpartitioner_ptscotch_strategy quality
435: test:
436: suffix: part_ptscotch_1
437: requires: ptscotch
438: nsize: 8
439: args: -dim 2 -cell_simplex 0 -dm_refine 1 -interpolate 1 -petscpartitioner_type ptscotch -petscpartitioner_view -petscpartitioner_ptscotch_imbalance 0.1
441: # CGNS reader tests 10-11 (need to find smaller test meshes)
442: test:
443: suffix: cgns_0
444: requires: cgns
445: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/tut21.cgns -interpolate 1 -dm_view
447: # Gmsh mesh reader tests
448: test:
449: suffix: gmsh_0
450: requires: !single
451: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/doublet-tet.msh -interpolate 1 -dm_view
452: test:
453: suffix: gmsh_1
454: requires: !single
455: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/square.msh -interpolate 1 -dm_view
456: test:
457: suffix: gmsh_2
458: requires: !single
459: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/square_bin.msh -interpolate 1 -dm_view
460: test:
461: suffix: gmsh_3
462: nsize: 3
463: requires: !single
464: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/square.msh -test_partition -interpolate 1 -dm_view
465: test:
466: suffix: gmsh_4
467: nsize: 3
468: requires: !single
469: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/square_bin.msh -test_partition -interpolate 1 -dm_view
470: test:
471: suffix: gmsh_5
472: requires: !single
473: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/square_quad.msh -interpolate 1 -dm_view
474: test:
475: suffix: gmsh_6
476: requires: !single
477: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/square_bin_physnames.msh -interpolate 1 -dm_view
479: # Fluent mesh reader tests
480: test:
481: suffix: fluent_0
482: requires: !complex
483: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/square.cas -interpolate 1 -dm_view
484: test:
485: suffix: fluent_1
486: nsize: 3
487: requires: !complex
488: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/square.cas -interpolate 1 -test_partition -dm_view
489: test:
490: suffix: fluent_2
491: requires: !complex
492: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/cube_5tets_ascii.cas -interpolate 1 -dm_view
493: test:
494: suffix: fluent_3
495: requires: !complex
496: TODO: broken
497: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/cube_5tets.cas -interpolate 1 -dm_view
499: # Med mesh reader tests, including parallel file reads
500: test:
501: suffix: med_0
502: requires: med
503: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/square.med -interpolate 1 -dm_view
504: test:
505: suffix: med_1
506: requires: med
507: nsize: 3
508: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/square.med -interpolate 1 -petscpartitioner_type simple -dm_view
509: test:
510: suffix: med_2
511: requires: med
512: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/cylinder.med -interpolate 1 -dm_view
513: test:
514: suffix: med_3
515: requires: med
516: nsize: 3
517: args: -filename ${wPETSC_DIR}/share/petsc/datafiles/meshes/cylinder.med -interpolate 1 -petscpartitioner_type simple -dm_view
519: # Test shape quality
520: test:
521: suffix: test_shape
522: requires: ctetgen
523: args: -dim 3 -interpolate -dm_refine_hierarchy 3 -test_shape
525: # Test simplex to tensor conversion
526: test:
527: suffix: s2t2
528: requires: triangle
529: args: -dim 2 -simplex2tensor -refinement_limit 0.0625 -dm_view ascii::ascii_info_detail
531: test:
532: suffix: s2t3
533: requires: ctetgen
534: args: -dim 3 -simplex2tensor -refinement_limit 0.0625 -dm_view ascii::ascii_info_detail
536: # Test domain shapes
537: test:
538: suffix: cylinder
539: args: -dim 3 -cell_simplex 0 -domain_shape cylinder -test_shape -dm_view
541: test:
542: suffix: cylinder_per
543: args: -dim 3 -cell_simplex 0 -domain_shape cylinder -z_periodicity periodic -test_shape -dm_view
545: test:
546: suffix: cylinder_wedge
547: args: -dim 3 -cell_simplex 0 -cell_wedge -domain_shape cylinder -dm_view
549: test:
550: suffix: box_2d
551: args: -dim 2 -cell_simplex 0 -domain_shape box -dm_refine 2 -test_shape -dm_view
553: test:
554: suffix: box_2d_per
555: args: -dim 2 -cell_simplex 0 -domain_shape box -dm_refine 2 -test_shape -dm_view
557: test:
558: suffix: box_3d
559: args: -dim 3 -cell_simplex 0 -domain_shape box -dm_refine 2 -test_shape -dm_view
561: TEST*/