plexcreate.c (49d85fc3981dc015f4926f5fb2869c39892cefb3) plexcreate.c (d02c7345ebed081476ce6bcdfd784b34c024d6ef)
1#define PETSCDM_DLL
2#include <petsc/private/dmpleximpl.h> /*I "petscdmplex.h" I*/
3#include <petsc/private/hashseti.h> /*I "petscdmplex.h" I*/
4#include <petscsf.h>
5#include <petscdmplextransform.h>
6#include <petscdmlabelephemeral.h>
7#include <petsc/private/kernels/blockmatmult.h>
8#include <petsc/private/kernels/blockinvert.h>

--- 4110 unchanged lines hidden (view full) ---

4119 if (flg) PetscCall(PetscLogDefaultBegin());
4120 /* Labeling */
4121 PetscCall(PetscOptionsString("-dm_plex_boundary_label", "Label to mark the mesh boundary", "", bdLabel, bdLabel, sizeof(bdLabel), &flg));
4122 if (flg) PetscCall(DMPlexCreateBoundaryLabel_Private(dm, bdLabel));
4123 /* Point Location */
4124 PetscCall(PetscOptionsBool("-dm_plex_hash_location", "Use grid hashing for point location", "DMInterpolate", PETSC_FALSE, &mesh->useHashLocation, NULL));
4125 /* Partitioning and distribution */
4126 PetscCall(PetscOptionsBool("-dm_plex_partition_balance", "Attempt to evenly divide points on partition boundary between processes", "DMPlexSetPartitionBalance", PETSC_FALSE, &mesh->partitionBalance, NULL));
1#define PETSCDM_DLL
2#include <petsc/private/dmpleximpl.h> /*I "petscdmplex.h" I*/
3#include <petsc/private/hashseti.h> /*I "petscdmplex.h" I*/
4#include <petscsf.h>
5#include <petscdmplextransform.h>
6#include <petscdmlabelephemeral.h>
7#include <petsc/private/kernels/blockmatmult.h>
8#include <petsc/private/kernels/blockinvert.h>

--- 4110 unchanged lines hidden (view full) ---

4119 if (flg) PetscCall(PetscLogDefaultBegin());
4120 /* Labeling */
4121 PetscCall(PetscOptionsString("-dm_plex_boundary_label", "Label to mark the mesh boundary", "", bdLabel, bdLabel, sizeof(bdLabel), &flg));
4122 if (flg) PetscCall(DMPlexCreateBoundaryLabel_Private(dm, bdLabel));
4123 /* Point Location */
4124 PetscCall(PetscOptionsBool("-dm_plex_hash_location", "Use grid hashing for point location", "DMInterpolate", PETSC_FALSE, &mesh->useHashLocation, NULL));
4125 /* Partitioning and distribution */
4126 PetscCall(PetscOptionsBool("-dm_plex_partition_balance", "Attempt to evenly divide points on partition boundary between processes", "DMPlexSetPartitionBalance", PETSC_FALSE, &mesh->partitionBalance, NULL));
4127 /* Reordering */
4128 PetscCall(PetscOptionsBool("-dm_plex_reorder_section", "Compute point permutation for local section", "DMPlexReorderSectionSetDefault", PETSC_FALSE, &flg2, &flg));
4129 if (flg) PetscCall(DMPlexReorderSectionSetDefault(dm, flg2 ? DMPLEX_REORDER_DEFAULT_TRUE : DMPLEX_REORDER_DEFAULT_FALSE));
4127 /* Generation and remeshing */
4128 PetscCall(PetscOptionsBool("-dm_plex_remesh_bd", "Allow changes to the boundary on remeshing", "DMAdapt", PETSC_FALSE, &mesh->remeshBd, NULL));
4129 /* Projection behavior */
4130 PetscCall(PetscOptionsBoundedInt("-dm_plex_max_projection_height", "Maximum mesh point height used to project locally", "DMPlexSetMaxProjectionHeight", 0, &mesh->maxProjectionHeight, NULL, 0));
4131 PetscCall(PetscOptionsBool("-dm_plex_regular_refinement", "Use special nested projection algorithm for regular refinement", "DMPlexSetRegularRefinement", mesh->regularRefinement, &mesh->regularRefinement, NULL));
4132 /* Checking structure */
4133 {
4134 PetscBool all = PETSC_FALSE;

--- 506 unchanged lines hidden (view full) ---

4641 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexInsertBoundaryValues_C", DMPlexInsertBoundaryValues_Plex));
4642 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexInsertTimeDerivativeBoundaryValues_C", DMPlexInsertTimeDerivativeBoundaryValues_Plex));
4643 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMSetUpGLVisViewer_C", DMSetUpGLVisViewer_Plex));
4644 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMCreateNeumannOverlap_C", DMCreateNeumannOverlap_Plex));
4645 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexDistributeGetDefault_C", DMPlexDistributeGetDefault_Plex));
4646 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexDistributeSetDefault_C", DMPlexDistributeSetDefault_Plex));
4647 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexReorderGetDefault_C", DMPlexReorderGetDefault_Plex));
4648 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexReorderSetDefault_C", DMPlexReorderSetDefault_Plex));
4130 /* Generation and remeshing */
4131 PetscCall(PetscOptionsBool("-dm_plex_remesh_bd", "Allow changes to the boundary on remeshing", "DMAdapt", PETSC_FALSE, &mesh->remeshBd, NULL));
4132 /* Projection behavior */
4133 PetscCall(PetscOptionsBoundedInt("-dm_plex_max_projection_height", "Maximum mesh point height used to project locally", "DMPlexSetMaxProjectionHeight", 0, &mesh->maxProjectionHeight, NULL, 0));
4134 PetscCall(PetscOptionsBool("-dm_plex_regular_refinement", "Use special nested projection algorithm for regular refinement", "DMPlexSetRegularRefinement", mesh->regularRefinement, &mesh->regularRefinement, NULL));
4135 /* Checking structure */
4136 {
4137 PetscBool all = PETSC_FALSE;

--- 506 unchanged lines hidden (view full) ---

4644 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexInsertBoundaryValues_C", DMPlexInsertBoundaryValues_Plex));
4645 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexInsertTimeDerivativeBoundaryValues_C", DMPlexInsertTimeDerivativeBoundaryValues_Plex));
4646 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMSetUpGLVisViewer_C", DMSetUpGLVisViewer_Plex));
4647 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMCreateNeumannOverlap_C", DMCreateNeumannOverlap_Plex));
4648 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexDistributeGetDefault_C", DMPlexDistributeGetDefault_Plex));
4649 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexDistributeSetDefault_C", DMPlexDistributeSetDefault_Plex));
4650 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexReorderGetDefault_C", DMPlexReorderGetDefault_Plex));
4651 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexReorderSetDefault_C", DMPlexReorderSetDefault_Plex));
4652 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexReorderSectionGetDefault_C", DMPlexReorderSectionGetDefault_Plex));
4653 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexReorderSectionSetDefault_C", DMPlexReorderSectionSetDefault_Plex));
4649 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMInterpolateSolution_C", DMInterpolateSolution_Plex));
4650 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexGetOverlap_C", DMPlexGetOverlap_Plex));
4651 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexSetOverlap_C", DMPlexSetOverlap_Plex));
4652 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexGetUseCeed_C", DMPlexGetUseCeed_Plex));
4653 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexSetUseCeed_C", DMPlexSetUseCeed_Plex));
4654 PetscFunctionReturn(PETSC_SUCCESS);
4655}
4656

--- 26 unchanged lines hidden (view full) ---

4683. -dm_distribute_overlap - Number of cells to overlap for distribution
4684. -dm_refine - Refine mesh after distribution
4685. -dm_plex_hash_location - Use grid hashing for point location
4686. -dm_plex_hash_box_faces <n,m,p> - The number of divisions in each direction of the grid hash
4687. -dm_plex_partition_balance - Attempt to evenly divide points on partition boundary between processes
4688. -dm_plex_remesh_bd - Allow changes to the boundary on remeshing
4689. -dm_plex_max_projection_height - Maximum mesh point height used to project locally
4690. -dm_plex_regular_refinement - Use special nested projection algorithm for regular refinement
4654 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMInterpolateSolution_C", DMInterpolateSolution_Plex));
4655 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexGetOverlap_C", DMPlexGetOverlap_Plex));
4656 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexSetOverlap_C", DMPlexSetOverlap_Plex));
4657 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexGetUseCeed_C", DMPlexGetUseCeed_Plex));
4658 PetscCall(PetscObjectComposeFunction((PetscObject)dm, "DMPlexSetUseCeed_C", DMPlexSetUseCeed_Plex));
4659 PetscFunctionReturn(PETSC_SUCCESS);
4660}
4661

--- 26 unchanged lines hidden (view full) ---

4688. -dm_distribute_overlap - Number of cells to overlap for distribution
4689. -dm_refine - Refine mesh after distribution
4690. -dm_plex_hash_location - Use grid hashing for point location
4691. -dm_plex_hash_box_faces <n,m,p> - The number of divisions in each direction of the grid hash
4692. -dm_plex_partition_balance - Attempt to evenly divide points on partition boundary between processes
4693. -dm_plex_remesh_bd - Allow changes to the boundary on remeshing
4694. -dm_plex_max_projection_height - Maximum mesh point height used to project locally
4695. -dm_plex_regular_refinement - Use special nested projection algorithm for regular refinement
4696. -dm_plex_reorder_section - Use specialized blocking if available
4691. -dm_plex_check_all - Perform all checks below
4692. -dm_plex_check_symmetry - Check that the adjacency information in the mesh is symmetric
4693. -dm_plex_check_skeleton <celltype> - Check that each cell has the correct number of vertices
4694. -dm_plex_check_faces <celltype> - Check that the faces of each cell give a vertex order this is consistent with what we expect from the cell type
4695. -dm_plex_check_geometry - Check that cells have positive volume
4696. -dm_view :mesh.tex:ascii_latex - View the mesh in LaTeX/TikZ
4697. -dm_plex_view_scale <num> - Scale the TikZ
4698. -dm_plex_print_fem <num> - View FEM assembly information, such as element vectors and matrices

--- 17 unchanged lines hidden (view full) ---

4716
4717 mesh->refct = 1;
4718 PetscCall(PetscSectionCreate(PetscObjectComm((PetscObject)dm), &mesh->coneSection));
4719 PetscCall(PetscSectionCreate(PetscObjectComm((PetscObject)dm), &mesh->supportSection));
4720 mesh->refinementUniform = PETSC_TRUE;
4721 mesh->refinementLimit = -1.0;
4722 mesh->distDefault = PETSC_TRUE;
4723 mesh->reorderDefault = DMPLEX_REORDER_DEFAULT_NOTSET;
4697. -dm_plex_check_all - Perform all checks below
4698. -dm_plex_check_symmetry - Check that the adjacency information in the mesh is symmetric
4699. -dm_plex_check_skeleton <celltype> - Check that each cell has the correct number of vertices
4700. -dm_plex_check_faces <celltype> - Check that the faces of each cell give a vertex order this is consistent with what we expect from the cell type
4701. -dm_plex_check_geometry - Check that cells have positive volume
4702. -dm_view :mesh.tex:ascii_latex - View the mesh in LaTeX/TikZ
4703. -dm_plex_view_scale <num> - Scale the TikZ
4704. -dm_plex_print_fem <num> - View FEM assembly information, such as element vectors and matrices

--- 17 unchanged lines hidden (view full) ---

4722
4723 mesh->refct = 1;
4724 PetscCall(PetscSectionCreate(PetscObjectComm((PetscObject)dm), &mesh->coneSection));
4725 PetscCall(PetscSectionCreate(PetscObjectComm((PetscObject)dm), &mesh->supportSection));
4726 mesh->refinementUniform = PETSC_TRUE;
4727 mesh->refinementLimit = -1.0;
4728 mesh->distDefault = PETSC_TRUE;
4729 mesh->reorderDefault = DMPLEX_REORDER_DEFAULT_NOTSET;
4730 mesh->reorderSection = DMPLEX_REORDER_DEFAULT_NOTSET;
4724 mesh->distributionName = NULL;
4725 mesh->interpolated = DMPLEX_INTERPOLATED_INVALID;
4726 mesh->interpolatedCollective = DMPLEX_INTERPOLATED_INVALID;
4727
4728 PetscCall(PetscPartitionerCreate(PetscObjectComm((PetscObject)dm), &mesh->partitioner));
4729 mesh->remeshBd = PETSC_FALSE;
4730
4731 for (unit = 0; unit < NUM_PETSC_UNITS; ++unit) mesh->scale[unit] = 1.0;

--- 1010 unchanged lines hidden ---
4731 mesh->distributionName = NULL;
4732 mesh->interpolated = DMPLEX_INTERPOLATED_INVALID;
4733 mesh->interpolatedCollective = DMPLEX_INTERPOLATED_INVALID;
4734
4735 PetscCall(PetscPartitionerCreate(PetscObjectComm((PetscObject)dm), &mesh->partitioner));
4736 mesh->remeshBd = PETSC_FALSE;
4737
4738 for (unit = 0; unit < NUM_PETSC_UNITS; ++unit) mesh->scale[unit] = 1.0;

--- 1010 unchanged lines hidden ---