Builds mapping between a 1D/2D boundary and a 3D boundary. More...
#include <MeshAlignmentOneToMany.h>
Public Member Functions | |
MeshAlignmentOneToMany (const MooseMesh &mesh) | |
Constructor. More... | |
bool | hasCoupledPrimaryElemID (const dof_id_type &secondary_elem_id) const |
Returns true if the given secondary element ID has a coupled primary element. More... | |
dof_id_type | getCoupledPrimaryElemID (const dof_id_type &secondary_elem_id) const |
Gets the coupled primary element ID for a given secondary element ID. More... | |
bool | hasCoupledSecondaryElemIDs (const dof_id_type &primary_elem_id) const |
Returns true if the given primary element ID has coupled secondary elements. More... | |
const std::vector< dof_id_type > & | getCoupledSecondaryElemIDs (const dof_id_type &primary_elem_id) const |
Gets the coupled secondary element IDs for a given primary element ID. More... | |
unsigned int | getPrimaryNumberOfQuadraturePoints () const |
Gets the number of quadrature points for faces on the primary boundary. More... | |
unsigned int | getSecondaryNumberOfQuadraturePoints () const |
Gets the number of quadrature points for faces on the secondary boundary. More... | |
unsigned int | getCoupledPrimaryElemQpIndex (const dof_id_type &secondary_elem_id, const unsigned int &secondary_qp) const |
Gets the quadrature point index on the primary element corresponding to the quadrature point index on the provided secondary element. More... | |
unsigned int | getMaxCouplingSize () const |
Gets the maximum number of secondary elements coupled to any primary element. More... | |
const std::vector< dof_id_type > & | getPrimaryElemIDs () const |
Returns the list of element IDs on the primary boundary. More... | |
const std::vector< dof_id_type > & | getSecondaryElemIDs () const |
Returns the list of element IDs on the secondary boundary. More... | |
bool | meshesAreAligned () const |
Returns true if the primary and secondary meshes are aligned. More... | |
Protected Member Functions | |
void | buildMapping () |
Builds the mapping using the extracted mesh information. More... | |
void | checkAlignment (const Point &axis_point, const RealVectorValue &axis_direction) |
Checks the alignment and sets _mesh_alignment accordingly. More... | |
void | extractFrom1DElements (const std::vector< dof_id_type > &elem_ids, std::vector< Point > &elem_points, std::vector< dof_id_type > &node_ids, std::vector< Point > &node_points) const |
Extracts mesh information from 1D elements. More... | |
void | extractFromBoundaryInfo (const std::vector< std::tuple< dof_id_type, unsigned short int >> &boundary_info, std::vector< dof_id_type > &elem_ids, std::vector< unsigned short int > &side_ids, std::vector< Point > &side_points, std::vector< dof_id_type > &node_ids, std::vector< Point > &node_points) const |
Extracts mesh information from boundary info. More... | |
Protected Attributes | |
std::map< dof_id_type, std::vector< dof_id_type > > | _primary_elem_id_to_secondary_elem_ids |
Map of primary element ID to coupled secondary element IDs. More... | |
std::map< dof_id_type, dof_id_type > | _secondary_elem_id_to_primary_elem_id |
Map of secondary element ID to coupled primary element ID. More... | |
std::map< dof_id_type, std::vector< unsigned int > > | _secondary_elem_id_to_qp_indices |
Map of secondary element ID to vector of coupled quadrature points. More... | |
unsigned int | _n_qp_primary |
Number of quadrature points for faces on the primary boundary. More... | |
unsigned int | _n_qp_secondary |
Number of quadrature points for faces on the secondary boundary. More... | |
unsigned long | _max_coupling_size |
The maximum number of secondary elements coupled to any primary element. More... | |
const MooseMesh & | _mesh |
Mesh. More... | |
std::vector< dof_id_type > | _primary_elem_ids |
List of primary element IDs. More... | |
std::vector< dof_id_type > | _secondary_elem_ids |
List of secondary element IDs. More... | |
std::vector< Point > | _primary_elem_points |
List of primary element points. More... | |
std::vector< Point > | _secondary_elem_points |
List of secondary element points. More... | |
std::vector< unsigned short int > | _primary_side_ids |
List of primary side IDs (if any) More... | |
std::vector< unsigned short int > | _secondary_side_ids |
List of secondary side IDs (if any) More... | |
std::vector< dof_id_type > | _primary_node_ids |
List of primary node IDs. More... | |
std::vector< dof_id_type > | _secondary_node_ids |
List of secondary node IDs. More... | |
std::vector< Point > | _primary_node_points |
List of primary node points. More... | |
std::vector< Point > | _secondary_node_points |
List of secondary node points. More... | |
bool | _meshes_are_aligned |
Flag that meshes are aligned. More... | |
Builds mapping between a 1D/2D boundary and a 3D boundary.
The "primary" mesh is the 1D/2D boundary, and the "secondary" mesh is the 3D boundary.
Definition at line 19 of file MeshAlignmentOneToMany.h.
MeshAlignmentOneToMany::MeshAlignmentOneToMany | ( | const MooseMesh & | mesh | ) |
Constructor.
mesh[in] | mesh Mesh |
Definition at line 14 of file MeshAlignmentOneToMany.C.
|
protected |
Builds the mapping using the extracted mesh information.
Definition at line 20 of file MeshAlignmentOneToMany.C.
Referenced by MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), and MeshAlignment2D3D::initialize().
|
protected |
Checks the alignment and sets _mesh_alignment
accordingly.
[in] | axis_point | Any point on the axis of the 1D or 2D boundary |
[in] | axis_direction | Direction of the axis for the 1D or 2D boundary |
Definition at line 57 of file MeshAlignmentOneToMany.C.
Referenced by MeshAlignment2D2D::initialize(), and MeshAlignment2D3D::initialize().
|
protectedinherited |
Extracts mesh information from 1D elements.
[in] | elem_ids | Vector of element IDs |
[out] | elem_points | Vector of element centroids |
[out] | node_ids | Vector of node IDs |
[out] | node_points | Vector of node points |
Definition at line 20 of file MeshAlignmentBase.C.
Referenced by MeshAlignment1D3D::initialize(), and MeshAlignment::initialize().
|
protectedinherited |
Extracts mesh information from boundary info.
[in] | boundary_info | Vector of tuples of element ID and side ID on boundary |
[out] | elem_ids | Vector of element IDs |
[out] | side_ids | Vector of side IDs |
[out] | side_points | Vector of side centroids |
[out] | node_ids | Vector of node IDs |
[out] | node_points | Vector of node points |
Definition at line 48 of file MeshAlignmentBase.C.
Referenced by MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().
dof_id_type MeshAlignmentOneToMany::getCoupledPrimaryElemID | ( | const dof_id_type & | secondary_elem_id | ) | const |
Gets the coupled primary element ID for a given secondary element ID.
[in] | secondary_elem_id | Secondary element ID for which to find the coupled primary element ID |
Definition at line 99 of file MeshAlignmentOneToMany.C.
Referenced by MeshAlignment2D3D::buildCoupledElemQpIndexMapSecondary(), HSCoupler2D3DUserObject::execute(), and HSCoupler2D3D::setupMesh().
unsigned int MeshAlignmentOneToMany::getCoupledPrimaryElemQpIndex | ( | const dof_id_type & | secondary_elem_id, |
const unsigned int & | secondary_qp | ||
) | const |
Gets the quadrature point index on the primary element corresponding to the quadrature point index on the provided secondary element.
Only secondary elements corresponding to local primary elements may be queried.
[in] | secondary_elem_id | Secondary element ID for which to find the coupled quadrature point |
[in] | secondary_qp | Quadrature point index on the given secondary element |
Definition at line 122 of file MeshAlignmentOneToMany.C.
Referenced by ADHeatTransferFromHeatStructure3D1PhaseUserObject::execute(), and HSCoupler2D3DUserObject::execute().
const std::vector< dof_id_type > & MeshAlignmentOneToMany::getCoupledSecondaryElemIDs | ( | const dof_id_type & | primary_elem_id | ) | const |
Gets the coupled secondary element IDs for a given primary element ID.
[in] | primary_elem_id | Primary element ID for which to find the coupled secondary element IDs |
Definition at line 114 of file MeshAlignmentOneToMany.C.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), buildMapping(), checkAlignment(), ADHeatTransferFromHeatStructure3D1PhaseUserObject::execute(), HSCoupler2D2DRadiationUserObject::execute(), HSCoupler2D2DRadiation::setupMesh(), and HeatTransferFromHeatStructure3D1Phase::setupMesh().
|
inline |
Gets the maximum number of secondary elements coupled to any primary element.
Definition at line 88 of file MeshAlignmentOneToMany.h.
Referenced by HSCoupler2D3D::check().
|
inlineinherited |
Returns the list of element IDs on the primary boundary.
Definition at line 34 of file MeshAlignmentBase.h.
Referenced by HeatStructure2DCouplerBase::setupMesh(), and HSCoupler2D2DRadiation::setupMesh().
|
inline |
Gets the number of quadrature points for faces on the primary boundary.
Definition at line 65 of file MeshAlignmentOneToMany.h.
Referenced by HSCoupler2D3DUserObject::execute().
|
inlineinherited |
Returns the list of element IDs on the secondary boundary.
Definition at line 39 of file MeshAlignmentBase.h.
Referenced by HSCoupler2D3D::setupMesh().
|
inline |
Gets the number of quadrature points for faces on the secondary boundary.
Definition at line 70 of file MeshAlignmentOneToMany.h.
Referenced by ADHeatTransferFromHeatStructure3D1PhaseUserObject::execute().
bool MeshAlignmentOneToMany::hasCoupledPrimaryElemID | ( | const dof_id_type & | secondary_elem_id | ) | const |
Returns true if the given secondary element ID has a coupled primary element.
[in] | secondary_elem_id | Secondary element ID for which to find the coupled primary element ID |
Definition at line 92 of file MeshAlignmentOneToMany.C.
Referenced by getCoupledPrimaryElemID(), and HSCoupler2D3D::setupMesh().
bool MeshAlignmentOneToMany::hasCoupledSecondaryElemIDs | ( | const dof_id_type & | primary_elem_id | ) | const |
Returns true if the given primary element ID has coupled secondary elements.
[in] | primary_elem_id | Primary element ID for which to find the coupled secondary element IDs |
Definition at line 107 of file MeshAlignmentOneToMany.C.
Referenced by buildMapping(), checkAlignment(), getCoupledSecondaryElemIDs(), and HeatTransferFromHeatStructure3D1Phase::setupMesh().
|
inlineinherited |
Returns true if the primary and secondary meshes are aligned.
Definition at line 44 of file MeshAlignmentBase.h.
Referenced by HeatStructure2DCoupler::check(), HeatStructure2DRadiationCouplerRZ::check(), HSCoupler2D2DRadiation::check(), HSCoupler2D3D::check(), HeatTransferFromHeatStructure1Phase::check(), HeatStructure2DCouplerBase::setupMesh(), HSCoupler2D2DRadiation::setupMesh(), and HSCoupler2D3D::setupMesh().
|
protected |
The maximum number of secondary elements coupled to any primary element.
Definition at line 117 of file MeshAlignmentOneToMany.h.
Referenced by buildMapping(), and getMaxCouplingSize().
|
protectedinherited |
Mesh.
Definition at line 79 of file MeshAlignmentBase.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), MeshAlignment::buildCoupledElemQpIndexMap(), MeshAlignment2D3D::buildCoupledElemQpIndexMapSecondary(), buildMapping(), MeshAlignment::buildMapping(), MeshAlignmentBase::extractFrom1DElements(), MeshAlignmentBase::extractFromBoundaryInfo(), and MeshAlignment::getLocalQuadraturePointMap().
|
protectedinherited |
Flag that meshes are aligned.
Definition at line 105 of file MeshAlignmentBase.h.
Referenced by MeshAlignment::buildMapping(), checkAlignment(), and MeshAlignmentBase::meshesAreAligned().
|
protected |
Number of quadrature points for faces on the primary boundary.
Definition at line 112 of file MeshAlignmentOneToMany.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), MeshAlignment2D3D::buildCoupledElemQpIndexMapSecondary(), and getPrimaryNumberOfQuadraturePoints().
|
protected |
Number of quadrature points for faces on the secondary boundary.
Definition at line 114 of file MeshAlignmentOneToMany.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), MeshAlignment2D3D::buildCoupledElemQpIndexMapSecondary(), and getSecondaryNumberOfQuadraturePoints().
|
protected |
Map of primary element ID to coupled secondary element IDs.
Definition at line 105 of file MeshAlignmentOneToMany.h.
Referenced by buildMapping(), getCoupledSecondaryElemIDs(), and hasCoupledSecondaryElemIDs().
|
protectedinherited |
List of primary element IDs.
Definition at line 82 of file MeshAlignmentBase.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), MeshAlignment::buildCoupledElemQpIndexMap(), MeshAlignment2D3D::buildCoupledElemQpIndexMapSecondary(), buildMapping(), MeshAlignment::buildMapping(), checkAlignment(), MeshAlignmentBase::getPrimaryElemIDs(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of primary element points.
Definition at line 86 of file MeshAlignmentBase.h.
Referenced by buildMapping(), MeshAlignment::buildMapping(), checkAlignment(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of primary node IDs.
Definition at line 96 of file MeshAlignmentBase.h.
Referenced by MeshAlignment::buildMapping(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of primary node points.
Definition at line 100 of file MeshAlignmentBase.h.
Referenced by MeshAlignment::buildMapping(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of primary side IDs (if any)
Definition at line 91 of file MeshAlignmentBase.h.
Referenced by MeshAlignment::buildCoupledElemQpIndexMap(), MeshAlignment2D3D::buildCoupledElemQpIndexMapSecondary(), MeshAlignment2D2D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().
|
protected |
Map of secondary element ID to coupled primary element ID.
Definition at line 107 of file MeshAlignmentOneToMany.h.
Referenced by buildMapping(), getCoupledPrimaryElemID(), and hasCoupledPrimaryElemID().
|
protected |
Map of secondary element ID to vector of coupled quadrature points.
Definition at line 109 of file MeshAlignmentOneToMany.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), MeshAlignment2D3D::buildCoupledElemQpIndexMapSecondary(), and getCoupledPrimaryElemQpIndex().
|
protectedinherited |
List of secondary element IDs.
Definition at line 84 of file MeshAlignmentBase.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), MeshAlignment::buildCoupledElemQpIndexMap(), MeshAlignment2D3D::buildCoupledElemQpIndexMapSecondary(), buildMapping(), MeshAlignment::buildMapping(), checkAlignment(), MeshAlignmentBase::getSecondaryElemIDs(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of secondary element points.
Definition at line 88 of file MeshAlignmentBase.h.
Referenced by buildMapping(), MeshAlignment::buildMapping(), checkAlignment(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of secondary node IDs.
Definition at line 98 of file MeshAlignmentBase.h.
Referenced by MeshAlignment::buildMapping(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of secondary node points.
Definition at line 102 of file MeshAlignmentBase.h.
Referenced by MeshAlignment::buildMapping(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of secondary side IDs (if any)
Definition at line 93 of file MeshAlignmentBase.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), MeshAlignment::buildCoupledElemQpIndexMap(), MeshAlignment2D3D::buildCoupledElemQpIndexMapSecondary(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), MeshAlignment2D3D::initialize(), and MeshAlignment::initialize().