This class is a container/interface for the objects involved in automatic generation of mortar spaces. More...
#include <AutomaticMortarGeneration.h>
Classes | |
| struct | MsmSubdomainStats |
| Statistics for one primary-secondary subdomain pair. More... | |
Public Types | |
| using | MortarFilterIter = std::unordered_map< dof_id_type, std::set< Elem *, CompareDofObjectsByID > >::const_iterator |
Public Member Functions | |
| AutomaticMortarGeneration (MooseApp &app, MeshBase &mesh_in, const std::pair< BoundaryID, BoundaryID > &boundary_key, const std::pair< SubdomainID, SubdomainID > &subdomain_key, bool on_displaced, bool periodic, const bool debug, const bool correct_edge_dropping, const Real minimum_projection_angle, const Mortar3DSubpatchPlane mortar_3d_subpatch_plane, const MortarSegmentTriangulationMode triangulation_mode, const bool triangulate_triangles, const Mortar3DQuadraturePointMapping mortar_3d_qp_mapping=Mortar3DQuadraturePointMapping::NORMAL_PROJECTION) | |
| Must be constructed with a reference to the Mesh we are generating mortar spaces for. | |
| void | buildNodeToElemMaps () |
| Once the secondary_requested_boundary_ids and primary_requested_boundary_ids containers have been filled in, call this function to build node-to-Elem maps for the lower-dimensional elements. | |
| void | computeNodalGeometry () |
| Computes and stores the nodal normal/tangent vectors in a local data structure instead of using the ExplicitSystem/NumericVector approach. | |
| void | projectSecondaryNodes () |
| Project secondary nodes (find xi^(2) values) to the closest points on the primary surface. | |
| void | projectPrimaryNodes () |
| (Inverse) project primary nodes to the points on the secondary surface where they would have come from (find (xi^(1) values)). | |
| void | buildMortarSegmentMesh () |
| Builds the mortar segment mesh once the secondary and primary node projections have been completed. | |
| void | buildMortarSegmentMesh3d () |
| Builds the mortar segment mesh once the secondary and primary node projections have been completed. | |
| std::vector< MsmSubdomainStats > | computeMsmStatistics () |
| Computes mortar segment mesh statistics and returns one entry per subdomain pair. | |
| void | msmStatistics () |
| Prints mortar segment mesh statistics to console (calls computeMsmStatistics internally) | |
| void | clear () |
| Clears the mortar segment mesh and accompanying data structures. | |
| void | meshChanged () |
| Invalidates the cached MSM node/element ID starting offset so that the next call to buildMortarSegmentMesh3d() recomputes it via allgather. | |
| bool | onDisplaced () const |
| returns whether this object is on the displaced mesh | |
| std::vector< Point > | getNodalNormals (const Elem &secondary_elem) const |
| std::array< MooseUtils::SemidynamicVector< Point, 9 >, 2 > | getNodalTangents (const Elem &secondary_elem) const |
| Compute the two nodal tangents, which are built on-the-fly. | |
| void | computeADNodalNormals (const std::function< ADPoint(const Node &)> &coordinate, std::unordered_map< const Node *, ADRealVectorValue > &nodal_normals) const |
| Build the normalized JxW-weighted secondary nodal normals from AD nodal coordinates. | |
| std::map< unsigned int, unsigned int > | getSecondaryIpToLowerElementMap (const Elem &lower_secondary_elem) const |
| Compute on-the-fly mapping from secondary interior parent nodes to lower dimensional nodes. | |
| std::map< unsigned int, unsigned int > | getPrimaryIpToLowerElementMap (const Elem &primary_elem, const Elem &primary_elem_ip, const Elem &lower_secondary_elem) const |
| Compute on-the-fly mapping from primary interior parent nodes to its corresponding lower dimensional nodes. | |
| std::vector< Point > | getNormals (const Elem &secondary_elem, const std::vector< Point > &xi1_pts) const |
| Compute the normals at given reference points on a secondary element. | |
| std::vector< Point > | getNormals (const Elem &secondary_elem, const std::vector< Real > &oned_xi1_pts) const |
| Compute the normals at given reference points on a secondary element. | |
| const Elem * | getSecondaryLowerdElemFromSecondaryElem (dof_id_type secondary_elem_id) const |
| Return lower dimensional secondary element given its interior parent. | |
| void | computeInactiveLMNodes () |
| Get list of secondary nodes that don't contribute to interaction with any primary element. | |
| void | computeIncorrectEdgeDroppingInactiveLMNodes () |
| Computes inactive secondary nodes when incorrect edge dropping behavior is enabled (any node touching a partially or fully dropped element is dropped) | |
| void | computeInactiveLMElems () |
| Get list of secondary elems without any corresponding primary elements. | |
| const std::unordered_map< dof_id_type, std::unordered_set< dof_id_type > > & | mortarInterfaceCoupling () const |
| const std::pair< BoundaryID, BoundaryID > & | primarySecondaryBoundaryIDPair () const |
| const MeshBase & | mortarSegmentMesh () const |
| const std::unordered_map< const Elem *, MortarSegmentInfo > & | mortarSegmentMeshElemToInfo () const |
| int | dim () const |
| Mortar3DQuadraturePointMapping | mortar3DQpMapping () const |
| Return the 3D mortar quadrature-point mapping method. | |
| const MortarSegmentReferencePoints & | mortarSegmentReferencePoints (const Elem &mortar_segment_elem) const |
| Return the parent-face reference coordinates for a mortar segment. | |
| const std::unordered_set< const Node * > & | getInactiveLMNodes () const |
| const std::unordered_set< const Elem * > & | getInactiveLMElems () const |
| bool | incorrectEdgeDropping () const |
| std::vector< MortarFilterIter > | secondariesToMortarSegments (const Node &node) const |
| const std::unordered_map< dof_id_type, std::set< Elem *, CompareDofObjectsByID > > & | secondariesToMortarSegments () const |
| const std::set< SubdomainID > & | secondaryIPSubIDs () const |
| const std::set< SubdomainID > & | primaryIPSubIDs () const |
| const std::unordered_map< dof_id_type, std::vector< const Elem * > > & | nodesToSecondaryElem () const |
| void | initOutput () |
| initialize mortar-mesh based output | |
Public Attributes | |
| const ConsoleStream | _console |
| An instance of helper class to write streams to the Console objects. | |
Static Public Attributes | |
| static const std::string | system_name |
| The name of the nodal normals system. | |
Private Member Functions | |
| void | outputMortarMesh () |
| Write the mortar segment mesh to exodus. | |
| std::string | mortarInterfaceName () const |
| void | buildCouplingInformation () |
build the _mortar_interface_coupling data | |
| void | projectSecondaryNodesSinglePair (SubdomainID lower_dimensional_primary_subdomain_id, SubdomainID lower_dimensional_secondary_subdomain_id) |
| Helper function responsible for projecting secondary nodes onto primary elements for a single primary/secondary pair. | |
| void | projectPrimaryNodesSinglePair (SubdomainID lower_dimensional_primary_subdomain_id, SubdomainID lower_dimensional_secondary_subdomain_id) |
| Helper function used internally by AutomaticMortarGeneration::project_primary_nodes(). | |
| bool | processAlignedNodes (const Node &secondary_node, const Node &primary_node, const std::vector< const Elem * > *secondary_node_neighbors, const std::vector< const Elem * > *primary_node_neighbors, const VectorValue< Real > &nodal_normal, const Elem &candidate_element, std::set< const Elem * > &rejected_element_candidates) |
| Process aligned nodes. | |
Private Attributes | |
| MooseApp & | _app |
| The Moose app. | |
| MeshBase & | _mesh |
| Reference to the mesh stored in equation_systems. | |
| std::set< BoundaryID > | _secondary_requested_boundary_ids |
| The boundary ids corresponding to all the secondary surfaces. | |
| std::set< BoundaryID > | _primary_requested_boundary_ids |
| The boundary ids corresponding to all the primary surfaces. | |
| std::vector< std::pair< BoundaryID, BoundaryID > > | _primary_secondary_boundary_id_pairs |
| A list of primary/secondary boundary id pairs corresponding to each side of the mortar interface. | |
| std::unordered_map< dof_id_type, std::vector< const Elem * > > | _nodes_to_secondary_elem_map |
| Map from nodes to connected lower-dimensional elements on the secondary/primary subdomains. | |
| std::unordered_map< dof_id_type, std::vector< const Elem * > > | _nodes_to_primary_elem_map |
| std::unordered_map< std::pair< const Node *, const Elem * >, std::pair< Real, const Elem * > > | _secondary_node_and_elem_to_xi2_primary_elem |
| Similar to the map above, but associates a (Secondary Node, Secondary Elem) pair to a (xi^(2), primary Elem) pair. | |
| std::map< std::tuple< dof_id_type, const Node *, const Elem * >, std::pair< Real, const Elem * > > | _primary_node_and_elem_to_xi1_secondary_elem |
| Same type of container, but for mapping (Primary Node ID, Primary Node, Primary Elem) -> (xi^(1), Secondary Elem) where they are inverse-projected along the nodal normal direction. | |
| std::unique_ptr< MeshBase > | _mortar_segment_mesh |
| 1D Mesh of mortar segment elements which gets built by the call to build_mortar_segment_mesh(). | |
| std::unordered_map< const Elem *, MortarSegmentInfo > | _msm_elem_to_info |
| Map between Elems in the mortar segment mesh and their info structs. | |
| std::unordered_map< const Elem *, unsigned int > | _lower_elem_to_side_id |
| Keeps track of the mapping between lower-dimensional elements and the side_id of the interior_parent which they are. | |
| std::vector< std::pair< SubdomainID, SubdomainID > > | _primary_secondary_subdomain_id_pairs |
| A list of primary/secondary subdomain id pairs corresponding to each side of the mortar interface. | |
| std::set< SubdomainID > | _secondary_boundary_subdomain_ids |
| The secondary/primary lower-dimensional boundary subdomain ids are the secondary/primary boundary ids. | |
| std::set< SubdomainID > | _primary_boundary_subdomain_ids |
| std::unordered_map< dof_id_type, std::unordered_set< dof_id_type > > | _mortar_interface_coupling |
| Used by the AugmentSparsityOnInterface functor to determine whether a given Elem is coupled to any others across the gap, and to explicitly set up the dependence between interior_parent() elements on the secondary side and their lower-dimensional sides which are on the interface. | |
| std::unordered_map< const Node *, Point > | _secondary_node_to_nodal_normal |
| Container for storing the nodal normal vector associated with each secondary node. | |
| std::unordered_map< const Node *, std::array< Point, 2 > > | _secondary_node_to_hh_nodal_tangents |
| Container for storing the nodal tangent/binormal vectors associated with each secondary node (Householder approach). | |
| std::unordered_map< dof_id_type, const Elem * > | _secondary_element_to_secondary_lowerd_element |
| Map from full dimensional secondary element id to lower dimensional secondary element. | |
| std::unordered_set< const Node * > | _inactive_local_lm_nodes |
| List of inactive lagrange multiplier nodes owned by this processor (for nodal variables) | |
| std::unordered_set< const Elem * > | _inactive_local_lm_elems |
| List of inactive lagrange multiplier nodes (for elemental variables) | |
| std::unordered_map< dof_id_type, std::set< Elem *, CompareDofObjectsByID > > | _secondary_elems_to_mortar_segments |
| We maintain a mapping from lower-dimensional secondary elements in the original mesh to (sets of) elements in mortar_segment_mesh. | |
| std::set< SubdomainID > | _secondary_ip_sub_ids |
| All the secondary interior parent subdomain IDs associated with the mortar mesh. | |
| std::set< SubdomainID > | _primary_ip_sub_ids |
| All the primary interior parent subdomain IDs associated with the mortar mesh. | |
| const bool | _debug |
| Whether to print debug output. | |
| const bool | _on_displaced |
| Whether this object is on the displaced mesh. | |
| const bool | _periodic |
| Whether this object will be generating a mortar segment mesh for periodic constraints. | |
| const bool | _distributed |
| Whether the mortar segment mesh is distributed. | |
| Real | _newton_tolerance = 1e-12 |
| Newton solve tolerance for node projections. | |
| Real | _xi_tolerance = 1e-6 |
| Tolerance for checking projection xi values. | |
| const bool | _correct_edge_dropping |
| Flag to enable regressed treatment of edge dropping where all LM DoFs on edge dropping element are strongly set to 0. | |
| const Real | _minimum_projection_angle |
| Parameter to control which angle (in degrees) is admissible for the creation of mortar segments. | |
| const Mortar3DSubpatchPlane | _mortar_3d_subpatch_plane |
| Method used to define the local projection planes for 3D secondary subpatches. | |
| const MortarSegmentTriangulationMode | _triangulation_mode |
| Triangulation mode used for clipped 3D mortar polygons. | |
| const bool | _triangulate_triangles |
| Whether already-triangular clipped polygons should still be centroid-subdivided. | |
| const Mortar3DQuadraturePointMapping | _mortar_3d_qp_mapping |
| Method used to map 3D mortar segment quadrature points to primary and secondary faces. | |
| std::unordered_map< const Elem *, MortarSegmentReferencePoints > | _msm_elem_to_reference_points |
| Reference-coordinate data used only by the reference-interpolation mapping mode. | |
| std::unique_ptr< InputParameters > | _output_params |
| Storage for the input parameters used by the mortar nodal geometry output. | |
| std::optional< dof_id_type > | _msm_node_id_start |
| Cached per-rank starting ID for 3D MSM nodes/elements. | |
| std::unordered_set< dof_id_type > | _projected_secondary_nodes |
| Debugging container for printing information about fraction of successful projections for secondary nodes. | |
| std::unordered_set< dof_id_type > | _failed_secondary_node_projections |
| Secondary nodes that failed to project. | |
Friends | |
| class | MortarNodalGeometryOutput |
| class | AugmentSparsityOnInterface |
This class is a container/interface for the objects involved in automatic generation of mortar spaces.
Definition at line 111 of file AutomaticMortarGeneration.h.
| using AutomaticMortarGeneration::MortarFilterIter = std::unordered_map<dof_id_type, std::set<Elem *, CompareDofObjectsByID> >::const_iterator |
Definition at line 410 of file AutomaticMortarGeneration.h.
| AutomaticMortarGeneration::AutomaticMortarGeneration | ( | MooseApp & | app, |
| MeshBase & | mesh_in, | ||
| const std::pair< BoundaryID, BoundaryID > & | boundary_key, | ||
| const std::pair< SubdomainID, SubdomainID > & | subdomain_key, | ||
| bool | on_displaced, | ||
| bool | periodic, | ||
| const bool | debug, | ||
| const bool | correct_edge_dropping, | ||
| const Real | minimum_projection_angle, | ||
| const Mortar3DSubpatchPlane | mortar_3d_subpatch_plane, | ||
| const MortarSegmentTriangulationMode | triangulation_mode, | ||
| const bool | triangulate_triangles, | ||
| const Mortar3DQuadraturePointMapping | mortar_3d_qp_mapping = Mortar3DQuadraturePointMapping::NORMAL_PROJECTION |
||
| ) |
Must be constructed with a reference to the Mesh we are generating mortar spaces for.
Definition at line 389 of file AutomaticMortarGeneration.C.
|
private |
build the _mortar_interface_coupling data
Definition at line 1716 of file AutomaticMortarGeneration.C.
Referenced by buildMortarSegmentMesh(), and buildMortarSegmentMesh3d().
| void AutomaticMortarGeneration::buildMortarSegmentMesh | ( | ) |
Builds the mortar segment mesh once the secondary and primary node projections have been completed.
Inputs:
Outputs:
Defined in the file build_mortar_segment_mesh.C.
This was a change to how inactive LM DoFs are handled. Now mortar segment elements are not used in assembly if there is no corresponding primary element and inactive LM DoFs (those with no contribution to an active primary element) are zeroed.
Definition at line 654 of file AutomaticMortarGeneration.C.
Referenced by MortarInterfaceWarehouse::update().
| void AutomaticMortarGeneration::buildMortarSegmentMesh3d | ( | ) |
Builds the mortar segment mesh once the secondary and primary node projections have been completed.
Inputs:
Outputs:
Step 1: Build mortar segments for all secondary elements
Step 1.1: Linearize secondary face elements
For first order face elements (Tri3 and Quad4) elements are simply linearized around center For second order (Tri6 and Quad9) and third order (Tri7) face elements, elements are sub-divided into four first order elements then each of the sub-elements is linearized around their respective centers For Quad8 elements, they are sub-divided into one quad and four triangle elements and each sub-element is linearized around their respective centers
Step 1.2: Coarse screening using a k-d tree to find nodes on the primary interface that are 'close to' a center point of the secondary element.
Step 1.3: Loop through primary candidate nodes, create mortar segments
Once an element with non-trivial projection onto secondary element identified, switch to breadth-first search (drop all current candidates and add only neighbors of elements with non-trivial overlap)
Step 1.3.2: Sub-divide primary element candidate, then project onto secondary sub-elements, perform polygon clipping, and triangulate to form mortar segments
Step 1.3.3: Create mortar segments and add to mortar segment mesh
Definition at line 1164 of file AutomaticMortarGeneration.C.
Referenced by MortarInterfaceWarehouse::update().
| void AutomaticMortarGeneration::buildNodeToElemMaps | ( | ) |
Once the secondary_requested_boundary_ids and primary_requested_boundary_ids containers have been filled in, call this function to build node-to-Elem maps for the lower-dimensional elements.
Definition at line 505 of file AutomaticMortarGeneration.C.
Referenced by MortarInterfaceWarehouse::update().
| void AutomaticMortarGeneration::clear | ( | ) |
Clears the mortar segment mesh and accompanying data structures.
Definition at line 466 of file AutomaticMortarGeneration.C.
Referenced by MortarInterfaceWarehouse::update().
| void AutomaticMortarGeneration::computeADNodalNormals | ( | const std::function< ADPoint(const Node &)> & | coordinate, |
| std::unordered_map< const Node *, ADRealVectorValue > & | nodal_normals | ||
| ) | const |
Build the normalized JxW-weighted secondary nodal normals from AD nodal coordinates.
The coordinate functor adds displacement derivatives to each node's current coordinates, so the stored normal values and their derivatives use the same geometry state.
Definition at line 2189 of file AutomaticMortarGeneration.C.
| void AutomaticMortarGeneration::computeInactiveLMElems | ( | ) |
Get list of secondary elems without any corresponding primary elements.
Used to enforce zero values on inactive DoFs of elemental variables.
Definition at line 2041 of file AutomaticMortarGeneration.C.
Referenced by MortarInterfaceWarehouse::update().
| void AutomaticMortarGeneration::computeInactiveLMNodes | ( | ) |
Get list of secondary nodes that don't contribute to interaction with any primary element.
Used to enforce zero values on inactive DoFs of nodal variables.
Definition at line 1977 of file AutomaticMortarGeneration.C.
Referenced by MortarInterfaceWarehouse::update().
| void AutomaticMortarGeneration::computeIncorrectEdgeDroppingInactiveLMNodes | ( | ) |
Computes inactive secondary nodes when incorrect edge dropping behavior is enabled (any node touching a partially or fully dropped element is dropped)
Definition at line 1921 of file AutomaticMortarGeneration.C.
Referenced by computeInactiveLMNodes().
| std::vector< AutomaticMortarGeneration::MsmSubdomainStats > AutomaticMortarGeneration::computeMsmStatistics | ( | ) |
Computes mortar segment mesh statistics and returns one entry per subdomain pair.
Must be called collectively on all ranks.
Definition at line 1792 of file AutomaticMortarGeneration.C.
Referenced by msmStatistics().
| void AutomaticMortarGeneration::computeNodalGeometry | ( | ) |
Computes and stores the nodal normal/tangent vectors in a local data structure instead of using the ExplicitSystem/NumericVector approach.
This design was triggered by the way that the GhostingFunctor operates, but I think it is a better/more efficient way to do it anyway.
The _periodic flag tells us whether we want to inward vs outward facing normals
Definition at line 2089 of file AutomaticMortarGeneration.C.
Referenced by MortarInterfaceWarehouse::update().
|
inline |
Definition at line 383 of file AutomaticMortarGeneration.h.
Referenced by computeADNodalNormals(), computeInactiveLMElems(), computeIncorrectEdgeDroppingInactiveLMNodes(), computeNodalGeometry(), Moose::Mortar::loopOverMortarSegments(), and MortarInterfaceWarehouse::update().
|
inline |
Definition at line 403 of file AutomaticMortarGeneration.h.
Referenced by ComputeMortarFunctor::operator()().
|
inline |
Definition at line 395 of file AutomaticMortarGeneration.h.
Referenced by ComputeMortarFunctor::operator()().
| std::vector< Point > AutomaticMortarGeneration::getNodalNormals | ( | const Elem & | secondary_elem | ) | const |
secondary_elem Definition at line 543 of file AutomaticMortarGeneration.C.
Referenced by buildMortarSegmentMesh3d(), getNormals(), and MortarConsumerInterface::setNormals().
| std::array< MooseUtils::SemidynamicVector< Point, 9 >, 2 > AutomaticMortarGeneration::getNodalTangents | ( | const Elem & | secondary_elem | ) | const |
Compute the two nodal tangents, which are built on-the-fly.
secondary_elem Definition at line 596 of file AutomaticMortarGeneration.C.
| std::vector< Point > AutomaticMortarGeneration::getNormals | ( | const Elem & | secondary_elem, |
| const std::vector< Point > & | xi1_pts | ||
| ) | const |
Compute the normals at given reference points on a secondary element.
| secondary_elem | The secondary element used to query for associated nodal normals |
| xi1_pts | The reference points on the secondary element to evaluate the normals at. The points should only be non-zero in the zeroth entry because right now our mortar mesh elements are always 1D |
Definition at line 625 of file AutomaticMortarGeneration.C.
Referenced by buildMortarSegmentMesh(), getNormals(), and MortarConsumerInterface::setNormals().
| std::vector< Point > AutomaticMortarGeneration::getNormals | ( | const Elem & | secondary_elem, |
| const std::vector< Real > & | oned_xi1_pts | ||
| ) | const |
Compute the normals at given reference points on a secondary element.
| secondary_elem | The secondary element used to query for associated nodal normals |
| 1d_xi1_pts | The reference points on the secondary element to evaluate the normals at. The "points" are single reals corresponding to xi because right now our mortar mesh elements are always 1D |
Definition at line 614 of file AutomaticMortarGeneration.C.
| std::map< unsigned int, unsigned int > AutomaticMortarGeneration::getPrimaryIpToLowerElementMap | ( | const Elem & | primary_elem, |
| const Elem & | primary_elem_ip, | ||
| const Elem & | lower_secondary_elem | ||
| ) | const |
Compute on-the-fly mapping from primary interior parent nodes to its corresponding lower dimensional nodes.
Definition at line 579 of file AutomaticMortarGeneration.C.
| std::map< unsigned int, unsigned int > AutomaticMortarGeneration::getSecondaryIpToLowerElementMap | ( | const Elem & | lower_secondary_elem | ) | const |
Compute on-the-fly mapping from secondary interior parent nodes to lower dimensional nodes.
Definition at line 563 of file AutomaticMortarGeneration.C.
| const Elem * AutomaticMortarGeneration::getSecondaryLowerdElemFromSecondaryElem | ( | dof_id_type | secondary_elem_id | ) | const |
Return lower dimensional secondary element given its interior parent.
Helpful outside the mortar generation to locate mortar-related quantities.
| secondary_elem_id | The secondary interior parent element id used to query for associated lower dimensional element |
Definition at line 553 of file AutomaticMortarGeneration.C.
|
inline |
Definition at line 408 of file AutomaticMortarGeneration.h.
Referenced by ComputeMortarFunctor::operator()().
| void AutomaticMortarGeneration::initOutput | ( | ) |
initialize mortar-mesh based output
Definition at line 450 of file AutomaticMortarGeneration.C.
|
inline |
Invalidates the cached MSM node/element ID starting offset so that the next call to buildMortarSegmentMesh3d() recomputes it via allgather.
Call this when mesh topology changes.
Definition at line 260 of file AutomaticMortarGeneration.h.
Referenced by MortarInterfaceWarehouse::meshChanged().
|
inline |
Return the 3D mortar quadrature-point mapping method.
Definition at line 386 of file AutomaticMortarGeneration.h.
Referenced by Moose::Mortar::loopOverMortarSegments().
|
inline |
Definition at line 360 of file AutomaticMortarGeneration.h.
|
private |
Definition at line 436 of file AutomaticMortarGeneration.C.
Referenced by initOutput(), and outputMortarMesh().
|
inline |
Definition at line 373 of file AutomaticMortarGeneration.h.
Referenced by Moose::Mortar::loopOverMortarSegments().
|
inline |
Definition at line 378 of file AutomaticMortarGeneration.h.
Referenced by Moose::Mortar::loopOverMortarSegments().
| const MortarSegmentReferencePoints & AutomaticMortarGeneration::mortarSegmentReferencePoints | ( | const Elem & | mortar_segment_elem | ) | const |
Return the parent-face reference coordinates for a mortar segment.
Definition at line 488 of file AutomaticMortarGeneration.C.
Referenced by Moose::Mortar::loopOverMortarSegments().
| void AutomaticMortarGeneration::msmStatistics | ( | ) |
Prints mortar segment mesh statistics to console (calls computeMsmStatistics internally)
Definition at line 1876 of file AutomaticMortarGeneration.C.
Referenced by buildMortarSegmentMesh3d().
|
inline |
Definition at line 444 of file AutomaticMortarGeneration.h.
|
inline |
returns whether this object is on the displaced mesh
Definition at line 265 of file AutomaticMortarGeneration.h.
|
private |
Write the mortar segment mesh to exodus.
Definition at line 1149 of file AutomaticMortarGeneration.C.
Referenced by buildMortarSegmentMesh(), and buildMortarSegmentMesh3d().
|
inline |
Definition at line 439 of file AutomaticMortarGeneration.h.
Referenced by Moose::Mortar::setupMortarMaterials(), and MortarInterfaceWarehouse::update().
|
inline |
Definition at line 669 of file AutomaticMortarGeneration.h.
Referenced by Moose::Mortar::loopOverMortarSegments(), and Moose::Mortar::setupMortarMaterials().
|
private |
Process aligned nodes.
Definition at line 2341 of file AutomaticMortarGeneration.C.
Referenced by projectPrimaryNodesSinglePair(), and projectSecondaryNodesSinglePair().
| void AutomaticMortarGeneration::projectPrimaryNodes | ( | ) |
(Inverse) project primary nodes to the points on the secondary surface where they would have come from (find (xi^(1) values)).
Inputs:
Outputs:
Defined in the file project_primary_nodes.C.
Definition at line 2702 of file AutomaticMortarGeneration.C.
Referenced by MortarInterfaceWarehouse::update().
|
private |
Helper function used internally by AutomaticMortarGeneration::project_primary_nodes().
Definition at line 2711 of file AutomaticMortarGeneration.C.
Referenced by projectPrimaryNodes().
| void AutomaticMortarGeneration::projectSecondaryNodes | ( | ) |
Project secondary nodes (find xi^(2) values) to the closest points on the primary surface.
Inputs:
Outputs:
Defined in the file project_secondary_nodes.C.
Definition at line 2332 of file AutomaticMortarGeneration.C.
Referenced by MortarInterfaceWarehouse::update().
|
private |
Helper function responsible for projecting secondary nodes onto primary elements for a single primary/secondary pair.
Called by the class member AutomaticMortarGeneration::project_secondary_nodes().
Definition at line 2457 of file AutomaticMortarGeneration.C.
Referenced by projectSecondaryNodes().
|
inline |
Definition at line 426 of file AutomaticMortarGeneration.h.
| std::vector< AutomaticMortarGeneration::MortarFilterIter > AutomaticMortarGeneration::secondariesToMortarSegments | ( | const Node & | node | ) | const |
Definition at line 2938 of file AutomaticMortarGeneration.C.
Referenced by MortarUserObjectThread::operator()(), and ComputeMortarFunctor::operator()().
|
inline |
Definition at line 434 of file AutomaticMortarGeneration.h.
Referenced by Moose::Mortar::setupMortarMaterials(), and MortarInterfaceWarehouse::update().
|
friend |
Definition at line 665 of file AutomaticMortarGeneration.h.
|
friend |
Definition at line 664 of file AutomaticMortarGeneration.h.
|
private |
The Moose app.
Definition at line 471 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh(), initOutput(), and outputMortarMesh().
|
inherited |
An instance of helper class to write streams to the Console objects.
Definition at line 31 of file ConsoleStreamInterface.h.
Referenced by IterationAdaptiveDT::acceptStep(), MaterialOutputAction::act(), MeshOnlyAction::act(), SetupDebugAction::act(), FEProblemBase::adaptMesh(), Adaptivity::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), DefaultSteadyStateConvergence::checkConvergence(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonConformingFaces(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), MeshDiagnosticsGenerator::checkPolygons(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualConvergence::checkResidualConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), CoarsenSurfaceMeshAlongSidesetGenerator::coarsenAlongSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeLinearSystemTags(), LinearSystem::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), TimeStepper::constrainStep(), IterationAdaptiveDT::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), Eigenvalue::execute(), SteadyBase::execute(), MFEMSteady::execute(), MessageFromInput::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), SidesetAroundSubdomainUpdater::finalize(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), CoarsenBlockGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), OrientSurfaceMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), SubProblem::initialSetup(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), SurfaceDelaunayGeneratorBase::meshNormalDeviation2D(), MooseBase::mooseDeprecated(), MooseBase::mooseDeprecatedNoTrace(), MooseBase::mooseInfo(), MooseBase::mooseWarning(), MooseBase::mooseWarningNonPrefixed(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), Console::output(), DOFMapOutput::output(), MaterialPropertyDebugOutput::output(), PerfGraphOutput::output(), ReporterDebugOutput::output(), SolutionInvalidityOutput::output(), VariableResidualNormsDebugOutput::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), WebServerControl::outputMessage(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), DefaultMultiAppFixedPointConvergence::preLoop(), ActionWarehouse::printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), PicardSolve::printFixedPointConvergenceHistory(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), NEML2Action::printSummary(), projectPrimaryNodesSinglePair(), projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), FEProblemBase::restoreSolutions(), NonlinearSystemBase::setInitialSolution(), MooseApp::setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), LinearSystem::solve(), NonlinearSystem::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), ImplicitMidpoint::solve(), LStableDirk2::solve(), LStableDirk3::solve(), LStableDirk4::solve(), EigenProblem::solve(), FixedPointSolve::solveStep(), TransientMultiApp::solveStep(), MeshRepairGenerator::splitNonConvexPolygons(), PerfGraphLivePrint::start(), WebServerControl::startServer(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), TransientBase::takeStep(), MFEMTransient::takeStep(), TerminateChainControl::terminate(), SubProblem::timestepSetup(), FEProblemBase::updateMeshXFEM(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().
|
private |
Flag to enable regressed treatment of edge dropping where all LM DoFs on edge dropping element are strongly set to 0.
Definition at line 626 of file AutomaticMortarGeneration.h.
Referenced by computeInactiveLMElems(), computeInactiveLMNodes(), and incorrectEdgeDropping().
|
private |
Whether to print debug output.
Definition at line 605 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh(), buildMortarSegmentMesh3d(), initOutput(), projectPrimaryNodesSinglePair(), and projectSecondaryNodesSinglePair().
|
private |
Whether the mortar segment mesh is distributed.
Definition at line 614 of file AutomaticMortarGeneration.h.
Referenced by AutomaticMortarGeneration(), and projectSecondaryNodesSinglePair().
|
private |
Secondary nodes that failed to project.
Definition at line 662 of file AutomaticMortarGeneration.h.
Referenced by clear(), projectPrimaryNodesSinglePair(), and projectSecondaryNodesSinglePair().
|
private |
List of inactive lagrange multiplier nodes (for elemental variables)
Definition at line 564 of file AutomaticMortarGeneration.h.
Referenced by computeInactiveLMElems(), and getInactiveLMElems().
|
private |
List of inactive lagrange multiplier nodes owned by this processor (for nodal variables)
Definition at line 561 of file AutomaticMortarGeneration.h.
Referenced by computeInactiveLMNodes(), computeIncorrectEdgeDroppingInactiveLMNodes(), and getInactiveLMNodes().
|
private |
Keeps track of the mapping between lower-dimensional elements and the side_id of the interior_parent which they are.
Definition at line 529 of file AutomaticMortarGeneration.h.
Referenced by clear().
|
private |
Reference to the mesh stored in equation_systems.
Definition at line 474 of file AutomaticMortarGeneration.h.
Referenced by AutomaticMortarGeneration(), buildCouplingInformation(), buildMortarSegmentMesh(), buildMortarSegmentMesh3d(), buildNodeToElemMaps(), computeADNodalNormals(), computeInactiveLMElems(), computeInactiveLMNodes(), computeIncorrectEdgeDroppingInactiveLMNodes(), computeMsmStatistics(), computeNodalGeometry(), dim(), getNormals(), msmStatistics(), MortarNodalGeometryOutput::output(), projectPrimaryNodesSinglePair(), and projectSecondaryNodesSinglePair().
|
private |
Parameter to control which angle (in degrees) is admissible for the creation of mortar segments.
If set to a value close to zero, very oblique projections are allowed, which can result in mortar segments solving physics not meaningfully and overprojection of primary nodes onto the mortar segment mesh in extreme cases. This parameter is mostly intended for mortar mesh debugging purposes in 2D.
Definition at line 632 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh3d(), projectPrimaryNodesSinglePair(), and projectSecondaryNodesSinglePair().
|
private |
Method used to map 3D mortar segment quadrature points to primary and secondary faces.
Definition at line 644 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh3d(), mortar3DQpMapping(), and mortarSegmentReferencePoints().
|
private |
Method used to define the local projection planes for 3D secondary subpatches.
Definition at line 635 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh3d().
|
private |
Used by the AugmentSparsityOnInterface functor to determine whether a given Elem is coupled to any others across the gap, and to explicitly set up the dependence between interior_parent() elements on the secondary side and their lower-dimensional sides which are on the interface.
This latter type of coupling must be explicitly declared when there is no primary_elem for a given mortar segment and you are using e.g. a P^1-P^0 discretization which does not induce the coupling automatically.
Definition at line 548 of file AutomaticMortarGeneration.h.
Referenced by buildCouplingInformation(), clear(), and mortarInterfaceCoupling().
|
private |
1D Mesh of mortar segment elements which gets built by the call to build_mortar_segment_mesh().
Definition at line 520 of file AutomaticMortarGeneration.h.
Referenced by AutomaticMortarGeneration(), buildMortarSegmentMesh(), buildMortarSegmentMesh3d(), clear(), computeInactiveLMElems(), computeInactiveLMNodes(), computeIncorrectEdgeDroppingInactiveLMNodes(), mortarSegmentMesh(), and outputMortarMesh().
|
private |
Map between Elems in the mortar segment mesh and their info structs.
This gets filled in by the call to build_mortar_segment_mesh().
Definition at line 525 of file AutomaticMortarGeneration.h.
Referenced by buildCouplingInformation(), buildMortarSegmentMesh(), buildMortarSegmentMesh3d(), clear(), computeInactiveLMElems(), computeInactiveLMNodes(), computeIncorrectEdgeDroppingInactiveLMNodes(), computeMsmStatistics(), and mortarSegmentMeshElemToInfo().
|
private |
Reference-coordinate data used only by the reference-interpolation mapping mode.
Definition at line 647 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh3d(), clear(), and mortarSegmentReferencePoints().
|
private |
Cached per-rank starting ID for 3D MSM nodes/elements.
nullopt forces recomputation on next buildMortarSegmentMesh3d() call. Reset by meshChanged() on topology change so the allgather is skipped for displaced-mesh residual updates that only move nodes.
Definition at line 655 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh3d(), and meshChanged().
|
private |
Newton solve tolerance for node projections.
Definition at line 617 of file AutomaticMortarGeneration.h.
Referenced by projectPrimaryNodesSinglePair(), and projectSecondaryNodesSinglePair().
|
private |
Definition at line 488 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh(), buildMortarSegmentMesh3d(), buildNodeToElemMaps(), clear(), processAlignedNodes(), projectPrimaryNodesSinglePair(), and projectSecondaryNodesSinglePair().
|
private |
Map from nodes to connected lower-dimensional elements on the secondary/primary subdomains.
Definition at line 487 of file AutomaticMortarGeneration.h.
Referenced by buildNodeToElemMaps(), clear(), nodesToSecondaryElem(), processAlignedNodes(), projectPrimaryNodesSinglePair(), projectSecondaryNodesSinglePair(), and secondariesToMortarSegments().
|
private |
Whether this object is on the displaced mesh.
Definition at line 608 of file AutomaticMortarGeneration.h.
Referenced by mortarInterfaceName(), onDisplaced(), and MortarNodalGeometryOutput::output().
|
private |
Storage for the input parameters used by the mortar nodal geometry output.
Definition at line 650 of file AutomaticMortarGeneration.h.
Referenced by initOutput().
|
private |
Whether this object will be generating a mortar segment mesh for periodic constraints.
Definition at line 611 of file AutomaticMortarGeneration.h.
Referenced by computeADNodalNormals(), computeNodalGeometry(), and getNormals().
|
private |
Definition at line 538 of file AutomaticMortarGeneration.h.
Referenced by AutomaticMortarGeneration(), and buildNodeToElemMaps().
|
private |
All the primary interior parent subdomain IDs associated with the mortar mesh.
Definition at line 576 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh(), buildMortarSegmentMesh3d(), clear(), and primaryIPSubIDs().
|
private |
Same type of container, but for mapping (Primary Node ID, Primary Node, Primary Elem) -> (xi^(1), Secondary Elem) where they are inverse-projected along the nodal normal direction.
Note that the first item of the key, the primary node ID, is important for storing the key-value pairs in a consistent order across processes, e.g. this container has to be ordered!
Definition at line 516 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh(), clear(), processAlignedNodes(), and projectPrimaryNodesSinglePair().
|
private |
The boundary ids corresponding to all the primary surfaces.
Definition at line 480 of file AutomaticMortarGeneration.h.
Referenced by AutomaticMortarGeneration(), and buildNodeToElemMaps().
|
private |
A list of primary/secondary boundary id pairs corresponding to each side of the mortar interface.
Definition at line 484 of file AutomaticMortarGeneration.h.
Referenced by AutomaticMortarGeneration(), buildMortarSegmentMesh(), mortarInterfaceName(), and primarySecondaryBoundaryIDPair().
|
private |
A list of primary/secondary subdomain id pairs corresponding to each side of the mortar interface.
Definition at line 533 of file AutomaticMortarGeneration.h.
Referenced by AutomaticMortarGeneration(), buildMortarSegmentMesh3d(), computeInactiveLMElems(), computeInactiveLMNodes(), computeIncorrectEdgeDroppingInactiveLMNodes(), computeMsmStatistics(), projectPrimaryNodes(), and projectSecondaryNodes().
|
private |
Debugging container for printing information about fraction of successful projections for secondary nodes.
If !_debug then this should always be empty
Definition at line 659 of file AutomaticMortarGeneration.h.
Referenced by clear(), and projectSecondaryNodesSinglePair().
|
private |
The secondary/primary lower-dimensional boundary subdomain ids are the secondary/primary boundary ids.
Definition at line 537 of file AutomaticMortarGeneration.h.
Referenced by AutomaticMortarGeneration(), buildMortarSegmentMesh(), buildNodeToElemMaps(), computeADNodalNormals(), and computeNodalGeometry().
|
private |
Map from full dimensional secondary element id to lower dimensional secondary element.
Definition at line 558 of file AutomaticMortarGeneration.h.
Referenced by clear(), computeNodalGeometry(), and getSecondaryLowerdElemFromSecondaryElem().
|
private |
We maintain a mapping from lower-dimensional secondary elements in the original mesh to (sets of) elements in mortar_segment_mesh.
This allows us to quickly determine which elements need to be split.
Definition at line 570 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh(), buildMortarSegmentMesh3d(), clear(), computeMsmStatistics(), secondariesToMortarSegments(), and secondariesToMortarSegments().
|
private |
All the secondary interior parent subdomain IDs associated with the mortar mesh.
Definition at line 573 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh(), buildMortarSegmentMesh3d(), clear(), and secondaryIPSubIDs().
|
private |
Similar to the map above, but associates a (Secondary Node, Secondary Elem) pair to a (xi^(2), primary Elem) pair.
This allows a single secondary node, which is potentially connected to two elements on the secondary side, to be associated with multiple primary Elem/xi^(2) values to handle the case where the primary and secondary nodes are "matching". In this configuration:
A B o--—o--—o (secondary orientation ->) | v ---—x---— (primary orientation <-) C D
The entries in the map should be: (Elem A, Node 1) -> (Elem C, xi^(2)=-1) (Elem B, Node 0) -> (Elem D, xi^(2)=+1)
Definition at line 508 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh(), clear(), processAlignedNodes(), and projectSecondaryNodesSinglePair().
|
private |
Container for storing the nodal tangent/binormal vectors associated with each secondary node (Householder approach).
Definition at line 555 of file AutomaticMortarGeneration.h.
Referenced by clear(), computeNodalGeometry(), getNodalTangents(), and MortarNodalGeometryOutput::output().
|
private |
Container for storing the nodal normal vector associated with each secondary node.
Definition at line 551 of file AutomaticMortarGeneration.h.
Referenced by clear(), computeADNodalNormals(), computeNodalGeometry(), getNodalNormals(), MortarNodalGeometryOutput::output(), projectPrimaryNodesSinglePair(), and projectSecondaryNodesSinglePair().
|
private |
The boundary ids corresponding to all the secondary surfaces.
Definition at line 477 of file AutomaticMortarGeneration.h.
Referenced by AutomaticMortarGeneration(), and buildNodeToElemMaps().
|
private |
Whether already-triangular clipped polygons should still be centroid-subdivided.
Definition at line 641 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh3d().
|
private |
Triangulation mode used for clipped 3D mortar polygons.
Definition at line 638 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh3d().
|
private |
Tolerance for checking projection xi values.
Usually we are checking whether we projected onto a certain element (in which case -1 <= xi <= 1) or whether we should have already projected a primary node (in which case we error if abs(xi) is sufficiently close to 1)
Definition at line 622 of file AutomaticMortarGeneration.h.
Referenced by buildMortarSegmentMesh(), projectPrimaryNodesSinglePair(), and projectSecondaryNodesSinglePair().
|
static |
The name of the nodal normals system.
We store this in one place so it's easy to change later.
Definition at line 118 of file AutomaticMortarGeneration.h.