1f1b11859SMatthew G. Knepley static const char help[] = "Tests for mesh transformation using only options"; 2f1b11859SMatthew G. Knepley 3f1b11859SMatthew G. Knepley #include <petscdmplex.h> 4f1b11859SMatthew G. Knepley 5f1b11859SMatthew G. Knepley static PetscErrorCode CreateMesh(MPI_Comm comm, DM *dm) 6f1b11859SMatthew G. Knepley { 7f1b11859SMatthew G. Knepley PetscFunctionBegin; 8f1b11859SMatthew G. Knepley PetscCall(DMCreate(comm, dm)); 9f1b11859SMatthew G. Knepley PetscCall(DMSetType(*dm, DMPLEX)); 10f1b11859SMatthew G. Knepley PetscCall(DMSetFromOptions(*dm)); 11f1b11859SMatthew G. Knepley 12f1b11859SMatthew G. Knepley PetscCall(PetscObjectSetOptionsPrefix((PetscObject)*dm, "phase_1_")); 13f1b11859SMatthew G. Knepley PetscCall(DMSetFromOptions(*dm)); 14f1b11859SMatthew G. Knepley PetscCall(PetscObjectSetOptionsPrefix((PetscObject)*dm, NULL)); 15f1b11859SMatthew G. Knepley 16f1b11859SMatthew G. Knepley PetscCall(DMViewFromOptions(*dm, NULL, "-dm_view")); 17*3ba16761SJacob Faibussowitsch PetscFunctionReturn(PETSC_SUCCESS); 18f1b11859SMatthew G. Knepley } 19f1b11859SMatthew G. Knepley 20f1b11859SMatthew G. Knepley int main(int argc, char **argv) 21f1b11859SMatthew G. Knepley { 22f1b11859SMatthew G. Knepley DM dm; 23f1b11859SMatthew G. Knepley 24f1b11859SMatthew G. Knepley PetscFunctionBeginUser; 25f1b11859SMatthew G. Knepley PetscCall(PetscInitialize(&argc, &argv, NULL, help)); 26f1b11859SMatthew G. Knepley PetscCall(CreateMesh(PETSC_COMM_WORLD, &dm)); 27f1b11859SMatthew G. Knepley PetscCall(DMDestroy(&dm)); 28f1b11859SMatthew G. Knepley PetscCall(PetscFinalize()); 29f1b11859SMatthew G. Knepley return 0; 30f1b11859SMatthew G. Knepley } 31f1b11859SMatthew G. Knepley 32f1b11859SMatthew G. Knepley /*TEST 33f1b11859SMatthew G. Knepley 34f1b11859SMatthew G. Knepley # This verifies the correctness of an extruded coordinate space 35f1b11859SMatthew G. Knepley test: 36f1b11859SMatthew G. Knepley suffix: ext_coord_space 37f1b11859SMatthew G. Knepley args: -dm_plex_dim 1 -dm_plex_box_faces 1 -phase_1_dm_extrude 1 -phase_1_dm_plex_transform_extrude_use_tensor 0 -cdm_dm_petscds_view 38f1b11859SMatthew G. Knepley 39f1b11859SMatthew G. Knepley TEST*/ 40