190d1c1a4SMatthew G. Knepley static char help[] = "Tests dof numberings for external integrators such as LibCEED.\n\n";
290d1c1a4SMatthew G. Knepley
390d1c1a4SMatthew G. Knepley #include <petscdmplex.h>
490d1c1a4SMatthew G. Knepley #include <petscds.h>
590d1c1a4SMatthew G. Knepley
690d1c1a4SMatthew G. Knepley typedef struct {
752e7713aSMatthew G. Knepley PetscBool useFE;
85f06a3ddSJed Brown PetscInt check_face;
95f06a3ddSJed Brown PetscBool closure_tensor;
1090d1c1a4SMatthew G. Knepley } AppCtx;
1190d1c1a4SMatthew G. Knepley
ProcessOptions(MPI_Comm comm,AppCtx * options)12d71ae5a4SJacob Faibussowitsch static PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *options)
13d71ae5a4SJacob Faibussowitsch {
1490d1c1a4SMatthew G. Knepley PetscFunctionBeginUser;
1552e7713aSMatthew G. Knepley options->useFE = PETSC_TRUE;
165f06a3ddSJed Brown options->check_face = 1;
175f06a3ddSJed Brown options->closure_tensor = PETSC_FALSE;
1890d1c1a4SMatthew G. Knepley PetscOptionsBegin(comm, "", "Dof Ordering Options", "DMPLEX");
1952e7713aSMatthew G. Knepley PetscCall(PetscOptionsBool("-use_fe", "Use FE or FV discretization", "ex49.c", options->useFE, &options->useFE, NULL));
205f06a3ddSJed Brown PetscCall(PetscOptionsInt("-check_face", "Face set to report on", "ex49.c", options->check_face, &options->check_face, NULL));
215f06a3ddSJed Brown PetscCall(PetscOptionsBool("-closure_tensor", "Use DMPlexSetClosurePermutationTensor()", "ex49.c", options->closure_tensor, &options->closure_tensor, NULL));
2290d1c1a4SMatthew G. Knepley PetscOptionsEnd();
233ba16761SJacob Faibussowitsch PetscFunctionReturn(PETSC_SUCCESS);
2490d1c1a4SMatthew G. Knepley }
2590d1c1a4SMatthew G. Knepley
CreateMesh(MPI_Comm comm,AppCtx * user,DM * dm)26d71ae5a4SJacob Faibussowitsch static PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *user, DM *dm)
27d71ae5a4SJacob Faibussowitsch {
2890d1c1a4SMatthew G. Knepley PetscFunctionBeginUser;
2990d1c1a4SMatthew G. Knepley PetscCall(DMCreate(comm, dm));
3090d1c1a4SMatthew G. Knepley PetscCall(DMSetType(*dm, DMPLEX));
3190d1c1a4SMatthew G. Knepley PetscCall(DMSetFromOptions(*dm));
3290d1c1a4SMatthew G. Knepley PetscCall(DMSetApplicationContext(*dm, user));
3390d1c1a4SMatthew G. Knepley PetscCall(DMViewFromOptions(*dm, NULL, "-dm_view"));
343ba16761SJacob Faibussowitsch PetscFunctionReturn(PETSC_SUCCESS);
3590d1c1a4SMatthew G. Knepley }
3690d1c1a4SMatthew G. Knepley
SetupDiscretization(DM dm,AppCtx * user)37d71ae5a4SJacob Faibussowitsch static PetscErrorCode SetupDiscretization(DM dm, AppCtx *user)
38d71ae5a4SJacob Faibussowitsch {
3990d1c1a4SMatthew G. Knepley DM cdm = dm;
4090d1c1a4SMatthew G. Knepley PetscInt dim;
4190d1c1a4SMatthew G. Knepley
4290d1c1a4SMatthew G. Knepley PetscFunctionBeginUser;
4390d1c1a4SMatthew G. Knepley PetscCall(DMGetDimension(dm, &dim));
4452e7713aSMatthew G. Knepley if (user->useFE) {
4552e7713aSMatthew G. Knepley PetscFE fe;
465962854dSMatthew G. Knepley DMPolytopeType ct;
475962854dSMatthew G. Knepley PetscInt cStart;
4852e7713aSMatthew G. Knepley
495962854dSMatthew G. Knepley PetscCall(DMPlexGetHeightStratum(dm, 0, &cStart, NULL));
505962854dSMatthew G. Knepley PetscCall(DMPlexGetCellType(dm, cStart, &ct));
51*9262ad6eSJames Wright PetscCall(PetscFECreateByCell(PETSC_COMM_SELF, dim, 1, ct, NULL, PETSC_DETERMINE, &fe));
5290d1c1a4SMatthew G. Knepley PetscCall(PetscObjectSetName((PetscObject)fe, "scalar"));
5390d1c1a4SMatthew G. Knepley PetscCall(DMSetField(dm, 0, NULL, (PetscObject)fe));
5490d1c1a4SMatthew G. Knepley PetscCall(DMSetField(dm, 1, NULL, (PetscObject)fe));
5590d1c1a4SMatthew G. Knepley PetscCall(PetscFEDestroy(&fe));
5652e7713aSMatthew G. Knepley } else {
5752e7713aSMatthew G. Knepley PetscFV fv;
5852e7713aSMatthew G. Knepley
5952e7713aSMatthew G. Knepley PetscCall(PetscFVCreate(PETSC_COMM_SELF, &fv));
6052e7713aSMatthew G. Knepley PetscCall(PetscFVSetType(fv, PETSCFVLEASTSQUARES));
6152e7713aSMatthew G. Knepley PetscCall(PetscFVSetNumComponents(fv, dim));
6252e7713aSMatthew G. Knepley PetscCall(PetscFVSetSpatialDimension(fv, dim));
6352e7713aSMatthew G. Knepley PetscCall(PetscFVSetFromOptions(fv));
6452e7713aSMatthew G. Knepley PetscCall(PetscFVSetUp(fv));
6552e7713aSMatthew G. Knepley PetscCall(PetscObjectSetName((PetscObject)fv, "vector"));
6652e7713aSMatthew G. Knepley PetscCall(DMSetField(dm, 0, NULL, (PetscObject)fv));
6752e7713aSMatthew G. Knepley PetscCall(PetscFVDestroy(&fv));
6852e7713aSMatthew G. Knepley }
6990d1c1a4SMatthew G. Knepley PetscCall(DMCreateDS(dm));
7090d1c1a4SMatthew G. Knepley while (cdm) {
7190d1c1a4SMatthew G. Knepley PetscCall(DMCopyDisc(dm, cdm));
7290d1c1a4SMatthew G. Knepley PetscCall(DMGetCoarseDM(cdm, &cdm));
7390d1c1a4SMatthew G. Knepley }
743ba16761SJacob Faibussowitsch PetscFunctionReturn(PETSC_SUCCESS);
7590d1c1a4SMatthew G. Knepley }
7690d1c1a4SMatthew G. Knepley
CheckOffsets(DM dm,AppCtx * user,const char * domain_name,PetscInt label_value,PetscInt height)775f06a3ddSJed Brown static PetscErrorCode CheckOffsets(DM dm, AppCtx *user, const char *domain_name, PetscInt label_value, PetscInt height)
78d71ae5a4SJacob Faibussowitsch {
7990d1c1a4SMatthew G. Knepley const char *height_name[] = {"cells", "faces"};
8090d1c1a4SMatthew G. Knepley DMLabel domain_label = NULL;
8190d1c1a4SMatthew G. Knepley DM cdm;
8290d1c1a4SMatthew G. Knepley PetscInt Nf, f;
83f2c6b1a2SJed Brown ISLocalToGlobalMapping ltog;
8490d1c1a4SMatthew G. Knepley
8590d1c1a4SMatthew G. Knepley PetscFunctionBeginUser;
8690d1c1a4SMatthew G. Knepley if (domain_name) PetscCall(DMGetLabel(dm, domain_name, &domain_label));
873e72e933SJed Brown PetscCall(PetscPrintf(PETSC_COMM_WORLD, "## %s: '%s' {%" PetscInt_FMT "}%s\n", height_name[height], domain_name ? domain_name : "default", label_value, domain_name && !domain_label ? " (null label)" : ""));
883ba16761SJacob Faibussowitsch if (domain_name && !domain_label) PetscFunctionReturn(PETSC_SUCCESS);
895f06a3ddSJed Brown if (user->closure_tensor) PetscCall(DMPlexSetClosurePermutationTensor(dm, PETSC_DETERMINE, NULL));
9090d1c1a4SMatthew G. Knepley // Offsets for cell closures
9190d1c1a4SMatthew G. Knepley PetscCall(DMGetNumFields(dm, &Nf));
9290d1c1a4SMatthew G. Knepley for (f = 0; f < Nf; ++f) {
9352e7713aSMatthew G. Knepley PetscObject obj;
9452e7713aSMatthew G. Knepley PetscClassId id;
9590d1c1a4SMatthew G. Knepley char name[PETSC_MAX_PATH_LEN];
9690d1c1a4SMatthew G. Knepley
9752e7713aSMatthew G. Knepley PetscCall(DMGetField(dm, f, NULL, &obj));
9852e7713aSMatthew G. Knepley PetscCall(PetscObjectGetClassId(obj, &id));
9952e7713aSMatthew G. Knepley if (id == PETSCFE_CLASSID) {
10052e7713aSMatthew G. Knepley IS offIS;
10152e7713aSMatthew G. Knepley PetscInt *offsets, Ncell, Ncl, Nc, n;
10252e7713aSMatthew G. Knepley
10390d1c1a4SMatthew G. Knepley PetscCall(DMPlexGetLocalOffsets(dm, domain_label, label_value, height, f, &Ncell, &Ncl, &Nc, &n, &offsets));
10490d1c1a4SMatthew G. Knepley PetscCall(ISCreateGeneral(PETSC_COMM_SELF, Ncell * Ncl, offsets, PETSC_OWN_POINTER, &offIS));
10590d1c1a4SMatthew G. Knepley PetscCall(PetscSNPrintf(name, PETSC_MAX_PATH_LEN, "Field %" PetscInt_FMT " Offsets", f));
10690d1c1a4SMatthew G. Knepley PetscCall(PetscObjectSetName((PetscObject)offIS, name));
10790d1c1a4SMatthew G. Knepley PetscCall(ISViewFromOptions(offIS, NULL, "-offsets_view"));
10890d1c1a4SMatthew G. Knepley PetscCall(ISDestroy(&offIS));
10952e7713aSMatthew G. Knepley } else if (id == PETSCFV_CLASSID) {
11052e7713aSMatthew G. Knepley IS offIS;
1115962854dSMatthew G. Knepley PetscInt *offsets, *offsetsNeg, *offsetsPos, Nface, Nc, n, i = 0;
11252e7713aSMatthew G. Knepley
11352e7713aSMatthew G. Knepley PetscCall(DMPlexGetLocalOffsetsSupport(dm, domain_label, label_value, &Nface, &Nc, &n, &offsetsNeg, &offsetsPos));
11452e7713aSMatthew G. Knepley PetscCall(PetscMalloc1(Nface * Nc * 2, &offsets));
1155962854dSMatthew G. Knepley for (PetscInt f = 0; f < Nface; ++f) {
11662d9cbd2SMatthew G. Knepley for (PetscInt c = 0; c < Nc; ++c) offsets[i++] = offsetsNeg[f] + c;
11762d9cbd2SMatthew G. Knepley for (PetscInt c = 0; c < Nc; ++c) offsets[i++] = offsetsPos[f] + c;
11852e7713aSMatthew G. Knepley }
1195962854dSMatthew G. Knepley PetscCheck(i == Nface * Nc * 2, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Total offsets %" PetscInt_FMT " != %" PetscInt_FMT, i, Nface * Nc * 2);
12052e7713aSMatthew G. Knepley PetscCall(PetscFree(offsetsNeg));
12152e7713aSMatthew G. Knepley PetscCall(PetscFree(offsetsPos));
12252e7713aSMatthew G. Knepley PetscCall(ISCreateGeneral(PETSC_COMM_SELF, Nface * Nc * 2, offsets, PETSC_OWN_POINTER, &offIS));
12352e7713aSMatthew G. Knepley PetscCall(PetscSNPrintf(name, PETSC_MAX_PATH_LEN, "Field %" PetscInt_FMT " Offsets", f));
12452e7713aSMatthew G. Knepley PetscCall(PetscObjectSetName((PetscObject)offIS, name));
12552e7713aSMatthew G. Knepley PetscCall(ISViewFromOptions(offIS, NULL, "-offsets_view"));
12652e7713aSMatthew G. Knepley PetscCall(ISDestroy(&offIS));
12752e7713aSMatthew G. Knepley } else SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Unrecognized type for DM field %" PetscInt_FMT, f);
12890d1c1a4SMatthew G. Knepley }
129f2c6b1a2SJed Brown PetscCall(DMGetLocalToGlobalMapping(dm, <og));
130f2c6b1a2SJed Brown PetscCall(ISLocalToGlobalMappingViewFromOptions(ltog, NULL, "-ltog_view"));
131f2c6b1a2SJed Brown
13290d1c1a4SMatthew G. Knepley // Offsets for coordinates
13390d1c1a4SMatthew G. Knepley {
13490d1c1a4SMatthew G. Knepley Vec X;
13590d1c1a4SMatthew G. Knepley PetscSection s;
13690d1c1a4SMatthew G. Knepley const PetscScalar *x;
13790d1c1a4SMatthew G. Knepley const char *cname;
13852e7713aSMatthew G. Knepley PetscInt cdim, *offsets, Ncell, Ncl, Nc, n;
13990d1c1a4SMatthew G. Knepley PetscBool isDG = PETSC_FALSE;
14090d1c1a4SMatthew G. Knepley
14190d1c1a4SMatthew G. Knepley PetscCall(DMGetCellCoordinateDM(dm, &cdm));
14290d1c1a4SMatthew G. Knepley if (!cdm) {
1439371c9d4SSatish Balay PetscCall(DMGetCoordinateDM(dm, &cdm));
1449371c9d4SSatish Balay cname = "Coordinates";
14590d1c1a4SMatthew G. Knepley PetscCall(DMGetCoordinatesLocal(dm, &X));
14690d1c1a4SMatthew G. Knepley } else {
14790d1c1a4SMatthew G. Knepley isDG = PETSC_TRUE;
14890d1c1a4SMatthew G. Knepley cname = "DG Coordinates";
14990d1c1a4SMatthew G. Knepley PetscCall(DMGetCellCoordinatesLocal(dm, &X));
15090d1c1a4SMatthew G. Knepley }
1513ba16761SJacob Faibussowitsch if (isDG && height) PetscFunctionReturn(PETSC_SUCCESS);
15290d1c1a4SMatthew G. Knepley if (domain_name) PetscCall(DMGetLabel(cdm, domain_name, &domain_label));
1535f06a3ddSJed Brown if (user->closure_tensor) PetscCall(DMPlexSetClosurePermutationTensor(cdm, PETSC_DETERMINE, NULL));
15490d1c1a4SMatthew G. Knepley PetscCall(DMPlexGetLocalOffsets(cdm, domain_label, label_value, height, 0, &Ncell, &Ncl, &Nc, &n, &offsets));
15590d1c1a4SMatthew G. Knepley PetscCall(DMGetCoordinateDim(dm, &cdim));
15690d1c1a4SMatthew G. Knepley PetscCheck(Nc == cdim, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Geometric dimension %" PetscInt_FMT " should be %" PetscInt_FMT, Nc, cdim);
15790d1c1a4SMatthew G. Knepley PetscCall(DMGetLocalSection(cdm, &s));
15890d1c1a4SMatthew G. Knepley PetscCall(VecGetArrayRead(X, &x));
1595f06a3ddSJed Brown PetscCall(PetscPrintf(PETSC_COMM_WORLD, "%s by element in %s order\n", cname, user->closure_tensor ? "tensor" : "bfs"));
16090d1c1a4SMatthew G. Knepley for (PetscInt c = 0; c < Ncell; ++c) {
16190d1c1a4SMatthew G. Knepley for (PetscInt v = 0; v < Ncl; ++v) {
16290d1c1a4SMatthew G. Knepley PetscInt off = offsets[c * Ncl + v], dgdof;
16390d1c1a4SMatthew G. Knepley const PetscScalar *vx = &x[off];
16490d1c1a4SMatthew G. Knepley
16590d1c1a4SMatthew G. Knepley if (isDG) {
16690d1c1a4SMatthew G. Knepley PetscCall(PetscSectionGetDof(s, c, &dgdof));
16790d1c1a4SMatthew G. Knepley PetscCheck(Ncl * Nc == dgdof, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Offset size %" PetscInt_FMT " should be %" PetscInt_FMT, Ncl * Nc, dgdof);
16890d1c1a4SMatthew G. Knepley }
169eefd97a2SJed Brown switch (cdim) {
1703e72e933SJed Brown case 1:
1713e72e933SJed Brown PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "[%" PetscInt_FMT "] %" PetscInt_FMT " <-- %2" PetscInt_FMT " (% 4.2f)\n", c, v, off, (double)PetscRealPart(vx[0])));
1723e72e933SJed Brown break;
173d71ae5a4SJacob Faibussowitsch case 2:
1743e72e933SJed Brown PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "[%" PetscInt_FMT "] %" PetscInt_FMT " <-- %2" PetscInt_FMT " (% 4.2f, % 4.2f)\n", c, v, off, (double)PetscRealPart(vx[0]), (double)PetscRealPart(vx[1])));
175d71ae5a4SJacob Faibussowitsch break;
176eefd97a2SJed Brown case 3:
1773e72e933SJed Brown PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "[%" PetscInt_FMT "] %" PetscInt_FMT " <-- %2" PetscInt_FMT " (% 4.2f, % 4.2f, % 4.2f)\n", c, v, off, (double)PetscRealPart(vx[0]), (double)PetscRealPart(vx[1]), (double)PetscRealPart(vx[2])));
178eefd97a2SJed Brown }
17990d1c1a4SMatthew G. Knepley }
18090d1c1a4SMatthew G. Knepley }
1813e72e933SJed Brown PetscCall(PetscSynchronizedFlush(PETSC_COMM_WORLD, stdout));
18290d1c1a4SMatthew G. Knepley PetscCall(VecRestoreArrayRead(X, &x));
18390d1c1a4SMatthew G. Knepley PetscCall(PetscFree(offsets));
184f2c6b1a2SJed Brown PetscCall(DMGetLocalToGlobalMapping(cdm, <og));
185f2c6b1a2SJed Brown PetscCall(ISLocalToGlobalMappingViewFromOptions(ltog, NULL, "-coord_ltog_view"));
1865e50ca95SJames Wright {
1875e50ca95SJames Wright DM clonedm;
1885e50ca95SJames Wright Vec cloneX, X;
1895e50ca95SJames Wright PetscInt clone_num_x, num_x;
1905e50ca95SJames Wright const PetscScalar *clonex, *x;
1915e50ca95SJames Wright
1925e50ca95SJames Wright PetscCall(DMClone(dm, &clonedm));
1935e50ca95SJames Wright { // Force recreation of local coordinate vector
1945e50ca95SJames Wright Vec X_global;
1955e50ca95SJames Wright
1965e50ca95SJames Wright PetscCall(DMGetCoordinates(dm, &X_global));
1975e50ca95SJames Wright PetscCall(DMSetCoordinates(clonedm, X_global));
1985e50ca95SJames Wright }
1995e50ca95SJames Wright PetscCall(DMGetCoordinatesLocal(dm, &X));
2005e50ca95SJames Wright PetscCall(DMGetCoordinatesLocal(clonedm, &cloneX));
2015e50ca95SJames Wright PetscCall(VecGetLocalSize(X, &num_x));
2025e50ca95SJames Wright PetscCall(VecGetLocalSize(cloneX, &clone_num_x));
2035e50ca95SJames Wright PetscCheck(num_x == clone_num_x, PETSC_COMM_WORLD, PETSC_ERR_ARG_SIZ, "Cloned DM coordinate size (%" PetscInt_FMT ") different from original DM coordinate size (%" PetscInt_FMT ")", clone_num_x, num_x);
2045e50ca95SJames Wright
2055e50ca95SJames Wright PetscCall(VecGetArrayRead(X, &x));
2065e50ca95SJames Wright PetscCall(VecGetArrayRead(cloneX, &clonex));
2075e50ca95SJames Wright
2085e50ca95SJames Wright for (PetscInt i = 0; i < num_x; i++) {
2095e50ca95SJames Wright PetscCheck(PetscIsCloseAtTolScalar(x[i], clonex[i], 1e-13, 1e-13), PETSC_COMM_WORLD, PETSC_ERR_PLIB, "Original coordinate (%4.2f) and cloned coordinate (%4.2f) are different", (double)PetscRealPart(x[i]), (double)PetscRealPart(clonex[i]));
2105e50ca95SJames Wright }
2115e50ca95SJames Wright
2125e50ca95SJames Wright PetscCall(VecRestoreArrayRead(X, &x));
2135e50ca95SJames Wright PetscCall(VecRestoreArrayRead(cloneX, &clonex));
2145e50ca95SJames Wright PetscCall(DMDestroy(&clonedm));
2155e50ca95SJames Wright }
21690d1c1a4SMatthew G. Knepley }
2173ba16761SJacob Faibussowitsch PetscFunctionReturn(PETSC_SUCCESS);
21890d1c1a4SMatthew G. Knepley }
21990d1c1a4SMatthew G. Knepley
main(int argc,char ** argv)220d71ae5a4SJacob Faibussowitsch int main(int argc, char **argv)
221d71ae5a4SJacob Faibussowitsch {
22290d1c1a4SMatthew G. Knepley DM dm;
22390d1c1a4SMatthew G. Knepley AppCtx user;
2243e72e933SJed Brown PetscInt depth;
225a38eeca9SJames Wright PetscBool flg;
22690d1c1a4SMatthew G. Knepley
227327415f7SBarry Smith PetscFunctionBeginUser;
22890d1c1a4SMatthew G. Knepley PetscCall(PetscInitialize(&argc, &argv, NULL, help));
22990d1c1a4SMatthew G. Knepley PetscCall(ProcessOptions(PETSC_COMM_WORLD, &user));
23090d1c1a4SMatthew G. Knepley PetscCall(CreateMesh(PETSC_COMM_WORLD, &user, &dm));
23190d1c1a4SMatthew G. Knepley PetscCall(SetupDiscretization(dm, &user));
2325f06a3ddSJed Brown PetscCall(CheckOffsets(dm, &user, NULL, 0, 0));
2333e72e933SJed Brown PetscCall(DMPlexGetDepth(dm, &depth));
2345f06a3ddSJed Brown if (depth > 1) PetscCall(CheckOffsets(dm, &user, "Face Sets", user.check_face, 1));
235a38eeca9SJames Wright
236a38eeca9SJames Wright PetscCall(PetscOptionsHasName(NULL, NULL, "-view_mat", &flg));
237a38eeca9SJames Wright if (flg) {
238a38eeca9SJames Wright Mat A;
239a38eeca9SJames Wright PetscCall(DMCreateMatrix(dm, &A));
240a38eeca9SJames Wright PetscCall(MatViewFromOptions(A, NULL, "-view_mat"));
241a38eeca9SJames Wright PetscCall(MatDestroy(&A));
242a38eeca9SJames Wright }
24390d1c1a4SMatthew G. Knepley PetscCall(DMDestroy(&dm));
24490d1c1a4SMatthew G. Knepley PetscCall(PetscFinalize());
24590d1c1a4SMatthew G. Knepley return 0;
24690d1c1a4SMatthew G. Knepley }
24790d1c1a4SMatthew G. Knepley
24890d1c1a4SMatthew G. Knepley /*TEST
24990d1c1a4SMatthew G. Knepley
25090d1c1a4SMatthew G. Knepley test:
25190d1c1a4SMatthew G. Knepley suffix: 0
25290d1c1a4SMatthew G. Knepley requires: triangle
25390d1c1a4SMatthew G. Knepley args: -dm_refine 1 -petscspace_degree 1 -dm_view -offsets_view
25490d1c1a4SMatthew G. Knepley
25590d1c1a4SMatthew G. Knepley test:
25690d1c1a4SMatthew G. Knepley suffix: 1
25790d1c1a4SMatthew G. Knepley args: -dm_plex_simplex 0 -dm_plex_box_bd periodic,none -dm_plex_box_faces 3,3 -dm_sparse_localize 0 -petscspace_degree 1 \
25890d1c1a4SMatthew G. Knepley -dm_view -offsets_view
25990d1c1a4SMatthew G. Knepley
26090d1c1a4SMatthew G. Knepley test:
26190d1c1a4SMatthew G. Knepley suffix: cg_2d
26290d1c1a4SMatthew G. Knepley args: -dm_plex_simplex 0 -dm_plex_box_bd none,none -dm_plex_box_faces 3,3 -petscspace_degree 1 \
26390d1c1a4SMatthew G. Knepley -dm_view -offsets_view
2643e72e933SJed Brown
2653e72e933SJed Brown test:
2663e72e933SJed Brown suffix: 1d_sfc
2675dca41c3SJed Brown args: -dm_plex_simplex 0 -dm_plex_dim 1 -dm_plex_shape zbox -dm_plex_box_faces 3 1 -dm_view -coord_ltog_view
2683e72e933SJed Brown
2693e72e933SJed Brown test:
270a38eeca9SJames Wright suffix: 1d_sfc_periodic
271a38eeca9SJames Wright args: -dm_plex_simplex 0 -dm_plex_dim 1 -dm_plex_shape zbox -dm_plex_box_faces 3 1 -dm_view -coord_ltog_view -petscspace_degree 1 -view_mat -dm_plex_box_bd periodic
272a38eeca9SJames Wright
273a38eeca9SJames Wright test:
2743e72e933SJed Brown suffix: 2d_sfc
2753e72e933SJed Brown nsize: 2
2765dca41c3SJed Brown args: -dm_plex_simplex 0 -dm_plex_dim 2 -dm_plex_shape zbox -dm_plex_box_faces 4,3 -dm_distribute 0 -petscspace_degree 1 -dm_view
2773e72e933SJed Brown
2784e2e9504SJed Brown test:
2794e2e9504SJed Brown suffix: 2d_sfc_periodic
2804e2e9504SJed Brown nsize: 2
281a38eeca9SJames Wright args: -dm_plex_simplex 0 -dm_plex_dim 2 -dm_plex_shape zbox -dm_plex_box_faces 4,3 -dm_distribute 0 -petscspace_degree 1 -dm_plex_box_bd periodic,none -dm_view ::ascii_info_detail -view_mat
2824e2e9504SJed Brown
283*9262ad6eSJames Wright test:
284*9262ad6eSJames Wright suffix: 2d_sfc_periodic_mat
285*9262ad6eSJames Wright args: -dm_plex_simplex 0 -dm_plex_dim 2 -dm_plex_shape zbox -dm_plex_box_faces 1,1 -dm_distribute 0 -petscspace_degree 2 -dm_plex_box_bd periodic,periodic -dm_view ::ascii_info_detail -view_mat
286*9262ad6eSJames Wright
2875f06a3ddSJed Brown testset:
2885e8b5fd9SJames Wright args: -dm_plex_simplex 0 -dm_plex_dim 2 -dm_plex_shape zbox -dm_plex_box_faces 3,2 -petscspace_degree 1 -dm_view ::ascii_info_detail -closure_tensor
2895f06a3ddSJed Brown nsize: 2
2905f06a3ddSJed Brown test:
2915f06a3ddSJed Brown suffix: 2d_sfc_periodic_stranded
2925e8b5fd9SJames Wright args: -dm_distribute 0 -dm_plex_box_bd none,periodic
2935f06a3ddSJed Brown test:
2945f06a3ddSJed Brown suffix: 2d_sfc_periodic_stranded_dist
2955e8b5fd9SJames Wright args: -dm_distribute 1 -petscpartitioner_type simple -dm_plex_box_bd none,periodic
2965e8b5fd9SJames Wright test:
2975e8b5fd9SJames Wright suffix: 2d_sfc_biperiodic_stranded
2985e8b5fd9SJames Wright args: -dm_distribute 0 -dm_plex_box_bd periodic,periodic
2995e8b5fd9SJames Wright test:
3005e8b5fd9SJames Wright suffix: 2d_sfc_biperiodic_stranded_dist
3015e8b5fd9SJames Wright args: -dm_distribute 1 -petscpartitioner_type simple -dm_plex_box_bd periodic,periodic
302d7d2d1d2SJames Wright test:
303d7d2d1d2SJames Wright suffix: 2d_sfc_biperiodic_stranded_dist_box_label
304d7d2d1d2SJames Wright args: -dm_distribute 1 -petscpartitioner_type simple -dm_plex_box_label_bd periodic,periodic -dm_plex_box_label
3055f06a3ddSJed Brown
30652e7713aSMatthew G. Knepley test:
30752e7713aSMatthew G. Knepley suffix: fv_0
30852e7713aSMatthew G. Knepley requires: triangle
30952e7713aSMatthew G. Knepley args: -dm_refine 1 -use_fe 0 -dm_view -offsets_view
31052e7713aSMatthew G. Knepley
31190d1c1a4SMatthew G. Knepley TEST*/
312