Detects contact surface pairs from a list of candidate boundaries using proximity, stores them in the mesh meta-data, and optionally creates lower-dimensional subdomain blocks for each pair, suitable for use in mortar contact via ContactAction. More...
#include <AutomaticContactPairingGenerator.h>
Classes | |
| struct | CandidateBoundary |
| A candidate contact boundary with its sideset area and area-weighted centroid. More... | |
Public Types | |
| using | ContactPairs = std::vector< std::pair< std::string, std::string > > |
| Type of the mesh meta-data holding the detected (primary, secondary) boundary name pairs. | |
| typedef DataFileName | DataFileParameterType |
Public Member Functions | |
| AutomaticContactPairingGenerator (const InputParameters ¶meters) | |
| std::unique_ptr< MeshBase > | generate () override |
| std::unique_ptr< CSG::CSGBase > | generateInternalCSG () |
| std::unique_ptr< MeshBase > | generateInternal () |
| const std::set< MeshGeneratorName > & | getRequestedMeshGenerators () const |
| const std::set< MeshGeneratorName > & | getRequestedMeshGeneratorsForSub () const |
| void | addParentMeshGenerator (const MeshGenerator &mg, const AddParentChildKey) |
| void | addChildMeshGenerator (const MeshGenerator &mg, const AddParentChildKey) |
| const std::set< const MeshGenerator *, Comparator > & | getParentMeshGenerators () const |
| const std::set< const MeshGenerator *, Comparator > & | getChildMeshGenerators () const |
| const std::set< const MeshGenerator *, Comparator > & | getSubMeshGenerators () const |
| bool | isParentMeshGenerator (const MeshGeneratorName &name, const bool direct=true) const |
| bool | isChildMeshGenerator (const MeshGeneratorName &name, const bool direct=true) const |
| bool | isNullMeshName (const MeshGeneratorName &name) const |
| bool | hasSaveMesh () const |
| bool | hasOutput () const |
| const std::string & | getSavedMeshName () const |
| bool | hasGenerateData () const |
| bool | hasGenerateCSG () const |
| bool | isDataOnly () const |
| virtual bool | enabled () const |
| std::shared_ptr< MooseObject > | getSharedPtr () |
| std::shared_ptr< const MooseObject > | getSharedPtr () const |
| bool | isKokkosObject () const |
| MooseApp & | getMooseApp () const |
| const std::string & | type () const |
| const std::string & | name () const |
| std::string | typeAndName () const |
| MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
| MooseObjectName | uniqueName () const |
| const InputParameters & | parameters () const |
| const hit::Node * | getHitNode () const |
| bool | hasBase () const |
| const std::string & | getBase () const |
| const T & | getParam (const std::string &name) const |
| std::vector< std::pair< T1, T2 > > | getParam (const std::string ¶m1, const std::string ¶m2) const |
| const T * | queryParam (const std::string &name) const |
| const T & | getRenamedParam (const std::string &old_name, const std::string &new_name) const |
| T | getCheckedPointerParam (const std::string &name, const std::string &error_string="") const |
| bool | isParamValid (const std::string &name) const |
| bool | isParamSetByUser (const std::string &name) const |
| void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
| void | paramError (const std::string ¶m, Args... args) const |
| void | paramWarning (const std::string ¶m, Args... args) const |
| void | paramWarning (const std::string ¶m, Args... args) const |
| void | paramInfo (const std::string ¶m, Args... args) const |
| std::string | messagePrefix (const bool hit_prefix=true) const |
| std::string | errorPrefix (const std::string &) const |
| void | mooseError (Args &&... args) const |
| void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
| void | mooseErrorNonPrefixed (Args &&... args) const |
| void | mooseWarning (Args &&... args) const |
| void | mooseWarning (Args &&... args) const |
| void | mooseWarningNonPrefixed (Args &&... args) const |
| void | mooseWarningNonPrefixed (Args &&... args) const |
| void | mooseDeprecated (Args &&... args) const |
| void | mooseDeprecated (Args &&... args) const |
| void | mooseDeprecatedNoTrace (Args &&... args) const |
| void | mooseInfo (Args &&... args) const |
| void | callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const |
| std::string | getDataFileName (const std::string ¶m) const |
| std::string | getDataFileNameByName (const std::string &relative_path) const |
| std::string | getDataFilePath (const std::string &relative_path) const |
| const Parallel::Communicator & | comm () const |
| processor_id_type | n_processors () const |
| processor_id_type | processor_id () const |
Static Public Member Functions | |
| static InputParameters | validParams () |
| static std::string | pairSuffix (const std::pair< BoundaryName, BoundaryName > &pair) |
| Name suffix identifying a (primary, secondary) boundary pair, used to build unique object names when there is more than one contact pair. | |
| static bool | hasGenerateData (const InputParameters ¶ms) |
| static bool | hasGenerateCSG (const InputParameters ¶ms) |
| static void | callMooseError (MooseApp *const app, const InputParameters ¶ms, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true) |
| static void | setHasGenerateData (InputParameters ¶ms) |
| static void | setHasGenerateCSG (InputParameters ¶ms) |
Public Attributes | |
| usingCombinedWarningSolutionWarnings | |
| const ConsoleStream | _console |
Static Public Attributes | |
| static constexpr auto | contact_pairs_property = "contact_pairs" |
| Name of the mesh meta-data holding the detected contact pairs. | |
| static const std::string | data_only_param |
| static const std::string | type_param |
| static const std::string | name_param |
| static const std::string | unique_name_param |
| static const std::string | app_param |
| static const std::string | moose_base_param |
| static const std::string | kokkos_object_param |
| static constexpr auto | SYSTEM |
| static constexpr auto | NAME |
Protected Member Functions | |
| virtual void | generateData () |
| virtual std::unique_ptr< CSG::CSGBase > | generateCSG () |
| T & | copyMeshProperty (const std::string &target_data_name, const std::string &source_data_name, const std::string &source_mesh) |
| T & | copyMeshProperty (const std::string &source_data_name, const std::string &source_mesh) |
| std::unique_ptr< MeshBase > & | getMesh (const std::string ¶m_name, const bool allow_invalid=false) |
| std::vector< std::unique_ptr< MeshBase > * > | getMeshes (const std::string ¶m_name) |
| std::unique_ptr< MeshBase > & | getMeshByName (const MeshGeneratorName &mesh_generator_name) |
| std::vector< std::unique_ptr< MeshBase > * > | getMeshesByName (const std::vector< MeshGeneratorName > &mesh_generator_names) |
| std::unique_ptr< CSG::CSGBase > & | getCSGBase (const std::string ¶m_name) |
| std::unique_ptr< CSG::CSGBase > & | getCSGBaseByName (const MeshGeneratorName &mesh_generator_name) |
| std::vector< std::unique_ptr< CSG::CSGBase > * > | getCSGBases (const std::string ¶m_name) |
| std::vector< std::unique_ptr< CSG::CSGBase > * > | getCSGBasesByName (const std::vector< MeshGeneratorName > &mesh_generator_names) |
| void | declareMeshForSub (const std::string ¶m_name) |
| void | declareMeshesForSub (const std::string ¶m_name) |
| void | declareMeshForSubByName (const MeshGeneratorName &mesh_generator_name) |
| void | declareMeshesForSubByName (const std::vector< MeshGeneratorName > &mesh_generator_names) |
| std::unique_ptr< MeshBase > | buildMeshBaseObject (unsigned int dim=libMesh::invalid_uint) |
| std::unique_ptr< ReplicatedMesh > | buildReplicatedMesh (unsigned int dim=libMesh::invalid_uint) |
| std::unique_ptr< DistributedMesh > | buildDistributedMesh (unsigned int dim=libMesh::invalid_uint) |
| void | addMeshSubgenerator (const std::string &type, const std::string &name, Ts... extra_input_parameters) |
| void | addMeshSubgenerator (const std::string &type, const std::string &name, InputParameters params) |
| void | declareNullMeshName (const MeshGeneratorName &name) |
| void | flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const |
| InvalidSolutionID | registerInvalidSolutionInternal (const std::string &message, const bool warning) const |
| const T & | getMeshProperty (const std::string &data_name, const std::string &prefix) |
| const T & | getMeshProperty (const std::string &data_name) |
| bool | hasMeshProperty (const std::string &data_name, const std::string &prefix) const |
| bool | hasMeshProperty (const std::string &data_name, const std::string &prefix) const |
| bool | hasMeshProperty (const std::string &data_name) const |
| bool | hasMeshProperty (const std::string &data_name) const |
| std::string | meshPropertyName (const std::string &data_name) const |
| T & | declareMeshProperty (const std::string &data_name, Args &&... args) |
| T & | declareMeshProperty (const std::string &data_name, const T &data_value) |
| T & | declareMeshProperty (const std::string &data_name, Args &&... args) |
| T & | declareMeshProperty (const std::string &data_name, const T &data_value) |
| T & | setMeshProperty (const std::string &data_name, Args &&... args) |
| T & | setMeshProperty (const std::string &data_name, const T &data_value) |
| T & | setMeshProperty (const std::string &data_name, Args &&... args) |
| T & | setMeshProperty (const std::string &data_name, const T &data_value) |
Static Protected Member Functions | |
| static std::string | meshPropertyName (const std::string &data_name, const std::string &prefix) |
Protected Attributes | |
| std::unique_ptr< MeshBase > & | _input |
| MooseMesh *const | _mesh |
| const bool & | _enabled |
| MooseApp & | _app |
| Factory & | _factory |
| ActionFactory & | _action_factory |
| const std::string & | _type |
| const std::string & | _name |
| const InputParameters & | _pars |
| const Parallel::Communicator & | _communicator |
Private Member Functions | |
| std::vector< std::pair< BoundaryName, BoundaryName > > | findPairsNodeProximity (const MeshBase &mesh) const |
| Find pairs by node-proximity KD-tree search; returns deduplicated pairs. | |
| std::vector< std::pair< BoundaryName, BoundaryName > > | findPairsCentroid (const MeshBase &mesh) const |
| Find pairs by sideset centroid distance; returns deduplicated pairs. | |
| std::vector< CandidateBoundary > | candidateBoundaries (const MeshBase &mesh) const |
| Resolve the candidate boundary names to boundary IDs, erroring if any boundary is listed more than once, and compute the area and centroid of each candidate sideset. | |
| virtual std::string | meshPropertyPrefix (const std::string &) const override final |
| void | checkGetMesh (const MeshGeneratorName &mesh_generator_name, const std::string ¶m_name) const |
| const MeshGeneratorName * | getMeshGeneratorNameFromParam (const std::string ¶m_name, const bool allow_invalid) const |
| const std::vector< MeshGeneratorName > & | getMeshGeneratorNamesFromParam (const std::string ¶m_name) const |
| RestartableDataValue & | setMeshPropertyHelper (const std::string &data_name) |
| const RestartableDataValue & | getMeshPropertyInternal (const std::string &data_name, const std::string &prefix) const |
| void | mooseErrorInternal (Args &&... args) const |
Static Private Member Functions | |
| static std::pair< BoundaryName, BoundaryName > | orderPair (const CandidateBoundary &a, const CandidateBoundary &b) |
| Order two paired boundaries as (primary, secondary), with the larger surface as primary. | |
| static void | removeDuplicatePairs (std::vector< std::pair< BoundaryName, BoundaryName > > &pairs) |
| static const hit::Node * | getHitNode (const InputParameters ¶ms) |
| static std::string | messagePrefix (const InputParameters ¶ms, const bool hit_prefix) |
Private Attributes | |
| const std::vector< BoundaryName > & | _pairing_boundaries |
| Candidate boundaries to pair. | |
| const Real | _pairing_distance |
| Maximum center-to-center or node-to-node distance for pairing. | |
| const MooseEnum & | _pairing_method |
| Pairing method: NODE or CENTROID. | |
| const std::string & | _prefix |
| Prefix prepended to the names of generated subdomain blocks. | |
| const bool | _create_lower_d_blocks |
| Whether to create lower-dimensional subdomain blocks for each detected pair. | |
| std::set< MeshGeneratorName > | _requested_mesh_generators |
| std::set< MeshGeneratorName > | _requested_mesh_generators_for_sub |
| std::vector< std::pair< std::string, std::unique_ptr< MeshBase > * > > | _requested_meshes |
| std::vector< std::pair< std::string, std::unique_ptr< CSG::CSGBase > * > > | _requested_csg_bases |
| std::unique_ptr< MeshBase > | _null_mesh |
| std::unique_ptr< CSG::CSGBase > | _null_csg_base |
| std::set< const MeshGenerator *, Comparator > | _parent_mesh_generators |
| std::set< const MeshGenerator *, Comparator > | _child_mesh_generators |
| std::set< const MeshGenerator *, Comparator > | _sub_mesh_generators |
| std::set< std::string > | _null_mesh_names |
| const std::string & | _save_with_name |
| const bool | _data_only |
| const ParallelParamObject & | _parent |
| const MooseBase & | _si_moose_base |
| const FEProblemBase * | _si_problem |
| MooseApp & | _meta_data_app |
| const MooseObject *const | _meta_data_object |
Detects contact surface pairs from a list of candidate boundaries using proximity, stores them in the mesh meta-data, and optionally creates lower-dimensional subdomain blocks for each pair, suitable for use in mortar contact via ContactAction.
Definition at line 19 of file AutomaticContactPairingGenerator.h.
| using AutomaticContactPairingGenerator::ContactPairs = std::vector<std::pair<std::string, std::string> > |
Type of the mesh meta-data holding the detected (primary, secondary) boundary name pairs.
Definition at line 27 of file AutomaticContactPairingGenerator.h.
| AutomaticContactPairingGenerator::AutomaticContactPairingGenerator | ( | const InputParameters & | parameters | ) |
Definition at line 72 of file AutomaticContactPairingGenerator.C.
|
private |
Resolve the candidate boundary names to boundary IDs, erroring if any boundary is listed more than once, and compute the area and centroid of each candidate sideset.
Areas and centroids are computed in Cartesian coordinates.
Definition at line 139 of file AutomaticContactPairingGenerator.C.
Referenced by findPairsCentroid(), and findPairsNodeProximity().
|
private |
Find pairs by sideset centroid distance; returns deduplicated pairs.
Definition at line 318 of file AutomaticContactPairingGenerator.C.
Referenced by generate().
|
private |
Find pairs by node-proximity KD-tree search; returns deduplicated pairs.
Definition at line 241 of file AutomaticContactPairingGenerator.C.
Referenced by generate().
|
overridevirtual |
Implements MeshGenerator.
Definition at line 88 of file AutomaticContactPairingGenerator.C.
|
staticprivate |
Order two paired boundaries as (primary, secondary), with the larger surface as primary.
Definition at line 224 of file AutomaticContactPairingGenerator.C.
Referenced by findPairsCentroid(), and findPairsNodeProximity().
|
static |
Name suffix identifying a (primary, secondary) boundary pair, used to build unique object names when there is more than one contact pair.
Definition at line 129 of file AutomaticContactPairingGenerator.C.
Referenced by generate(), and ContactAction::pairSuffix().
|
staticprivate |
Definition at line 337 of file AutomaticContactPairingGenerator.C.
Referenced by findPairsCentroid(), and findPairsNodeProximity().
|
static |
Definition at line 44 of file AutomaticContactPairingGenerator.C.
|
private |
Whether to create lower-dimensional subdomain blocks for each detected pair.
Definition at line 51 of file AutomaticContactPairingGenerator.h.
Referenced by generate().
|
protected |
Definition at line 39 of file AutomaticContactPairingGenerator.h.
Referenced by generate().
|
private |
Candidate boundaries to pair.
Definition at line 43 of file AutomaticContactPairingGenerator.h.
Referenced by candidateBoundaries(), and generate().
|
private |
Maximum center-to-center or node-to-node distance for pairing.
Definition at line 45 of file AutomaticContactPairingGenerator.h.
Referenced by findPairsCentroid(), findPairsNodeProximity(), and generate().
|
private |
Pairing method: NODE or CENTROID.
Definition at line 47 of file AutomaticContactPairingGenerator.h.
Referenced by generate().
|
private |
Prefix prepended to the names of generated subdomain blocks.
Definition at line 49 of file AutomaticContactPairingGenerator.h.
Referenced by generate().
|
staticconstexpr |
Name of the mesh meta-data holding the detected contact pairs.
Definition at line 30 of file AutomaticContactPairingGenerator.h.
Referenced by AutomaticContactPairingGenerator(), generate(), and ContactAction::getAutomaticContactPairs().