Builds mapping between a 2D boundary and a 3D boundary. More...
#include <MeshAlignment2D3D.h>
Public Member Functions | |
MeshAlignment2D3D (const MooseMesh &mesh) | |
Constructor. More... | |
void | initialize (const std::vector< std::tuple< dof_id_type, unsigned short int >> &primary_boundary_info, const std::vector< std::tuple< dof_id_type, unsigned short int >> &secondary_boundary_info, const Point &axis_point, const RealVectorValue &axis_direction) |
Extracts mesh information and builds the mapping. More... | |
void | buildCoupledElemQpIndexMapSecondary (Assembly &assembly) |
Builds the map used for getting the coupled quadrature point index. More... | |
const std::vector< Real > & | getPrimaryArea (const dof_id_type primary_elem_id) const |
Gets the area for each quadrature point on a primary element. 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< Real > > | _primary_elem_id_to_area |
Map of primary element ID to area for each quadrature point. More... | |
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 2D boundary and a 3D boundary.
The "primary" mesh is the 2D boundary, and the "secondary" mesh is the 3D boundary.
Definition at line 21 of file MeshAlignment2D3D.h.
MeshAlignment2D3D::MeshAlignment2D3D | ( | const MooseMesh & | mesh | ) |
Constructor.
mesh[in] | mesh Mesh |
Definition at line 17 of file MeshAlignment2D3D.C.
Builds the map used for getting the coupled quadrature point index.
This method is used for coupling a 2D boundary to a 3D boundary, where the map will be used within a side user object for the 3D boundary. This method needs the assembly object, so it needs to be called from an object that has assembly access (components do not).
assembly | The assembly object |
Definition at line 45 of file MeshAlignment2D3D.C.
Referenced by HSCoupler2D3DUserObject::HSCoupler2D3DUserObject().
|
protectedinherited |
Builds the mapping using the extracted mesh information.
Definition at line 20 of file MeshAlignmentOneToMany.C.
Referenced by MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), and initialize().
|
protectedinherited |
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 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(), initialize(), and MeshAlignment::initialize().
|
inherited |
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 buildCoupledElemQpIndexMapSecondary(), HSCoupler2D3DUserObject::execute(), and HSCoupler2D3D::setupMesh().
|
inherited |
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().
|
inherited |
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(), MeshAlignmentOneToMany::buildMapping(), MeshAlignmentOneToMany::checkAlignment(), ADHeatTransferFromHeatStructure3D1PhaseUserObject::execute(), HSCoupler2D2DRadiationUserObject::execute(), HSCoupler2D2DRadiation::setupMesh(), and HeatTransferFromHeatStructure3D1Phase::setupMesh().
|
inlineinherited |
Gets the maximum number of secondary elements coupled to any primary element.
Definition at line 88 of file MeshAlignmentOneToMany.h.
Referenced by HSCoupler2D3D::check().
const std::vector< Real > & MeshAlignment2D3D::getPrimaryArea | ( | const dof_id_type | primary_elem_id | ) | const |
Gets the area for each quadrature point on a primary element.
[in] | primary_elem_id | Primary element ID |
Definition at line 98 of file MeshAlignment2D3D.C.
Referenced by HSCoupler2D3DUserObject::execute().
|
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().
|
inlineinherited |
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().
|
inlineinherited |
Gets the number of quadrature points for faces on the secondary boundary.
Definition at line 70 of file MeshAlignmentOneToMany.h.
Referenced by ADHeatTransferFromHeatStructure3D1PhaseUserObject::execute().
|
inherited |
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 MeshAlignmentOneToMany::getCoupledPrimaryElemID(), and HSCoupler2D3D::setupMesh().
|
inherited |
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 MeshAlignmentOneToMany::buildMapping(), MeshAlignmentOneToMany::checkAlignment(), MeshAlignmentOneToMany::getCoupledSecondaryElemIDs(), and HeatTransferFromHeatStructure3D1Phase::setupMesh().
void MeshAlignment2D3D::initialize | ( | const std::vector< std::tuple< dof_id_type, unsigned short int >> & | primary_boundary_info, |
const std::vector< std::tuple< dof_id_type, unsigned short int >> & | secondary_boundary_info, | ||
const Point & | axis_point, | ||
const RealVectorValue & | axis_direction | ||
) |
Extracts mesh information and builds the mapping.
secondary_boundary_info[in] | List of tuples (elem_id, side_id) of the primary side | |
secondary_boundary_info[in] | List of tuples (elem_id, side_id) of the secondary side | |
[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 20 of file MeshAlignment2D3D.C.
Referenced by HSCoupler2D3D::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().
|
protectedinherited |
The maximum number of secondary elements coupled to any primary element.
Definition at line 117 of file MeshAlignmentOneToMany.h.
Referenced by MeshAlignmentOneToMany::buildMapping(), and MeshAlignmentOneToMany::getMaxCouplingSize().
|
protectedinherited |
Mesh.
Definition at line 79 of file MeshAlignmentBase.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), MeshAlignment::buildCoupledElemQpIndexMap(), buildCoupledElemQpIndexMapSecondary(), MeshAlignmentOneToMany::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(), MeshAlignmentOneToMany::checkAlignment(), and MeshAlignmentBase::meshesAreAligned().
|
protectedinherited |
Number of quadrature points for faces on the primary boundary.
Definition at line 112 of file MeshAlignmentOneToMany.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), buildCoupledElemQpIndexMapSecondary(), and MeshAlignmentOneToMany::getPrimaryNumberOfQuadraturePoints().
|
protectedinherited |
Number of quadrature points for faces on the secondary boundary.
Definition at line 114 of file MeshAlignmentOneToMany.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), buildCoupledElemQpIndexMapSecondary(), and MeshAlignmentOneToMany::getSecondaryNumberOfQuadraturePoints().
|
protected |
Map of primary element ID to area for each quadrature point.
Definition at line 66 of file MeshAlignment2D3D.h.
Referenced by buildCoupledElemQpIndexMapSecondary(), and getPrimaryArea().
|
protectedinherited |
Map of primary element ID to coupled secondary element IDs.
Definition at line 105 of file MeshAlignmentOneToMany.h.
Referenced by MeshAlignmentOneToMany::buildMapping(), MeshAlignmentOneToMany::getCoupledSecondaryElemIDs(), and MeshAlignmentOneToMany::hasCoupledSecondaryElemIDs().
|
protectedinherited |
List of primary element IDs.
Definition at line 82 of file MeshAlignmentBase.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), MeshAlignment::buildCoupledElemQpIndexMap(), buildCoupledElemQpIndexMapSecondary(), MeshAlignmentOneToMany::buildMapping(), MeshAlignment::buildMapping(), MeshAlignmentOneToMany::checkAlignment(), MeshAlignmentBase::getPrimaryElemIDs(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of primary element points.
Definition at line 86 of file MeshAlignmentBase.h.
Referenced by MeshAlignmentOneToMany::buildMapping(), MeshAlignment::buildMapping(), MeshAlignmentOneToMany::checkAlignment(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), 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(), 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(), initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of primary side IDs (if any)
Definition at line 91 of file MeshAlignmentBase.h.
Referenced by MeshAlignment::buildCoupledElemQpIndexMap(), buildCoupledElemQpIndexMapSecondary(), MeshAlignment2D2D::initialize(), initialize(), and MeshAlignment::initialize().
|
protectedinherited |
Map of secondary element ID to coupled primary element ID.
Definition at line 107 of file MeshAlignmentOneToMany.h.
Referenced by MeshAlignmentOneToMany::buildMapping(), MeshAlignmentOneToMany::getCoupledPrimaryElemID(), and MeshAlignmentOneToMany::hasCoupledPrimaryElemID().
|
protectedinherited |
Map of secondary element ID to vector of coupled quadrature points.
Definition at line 109 of file MeshAlignmentOneToMany.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), buildCoupledElemQpIndexMapSecondary(), and MeshAlignmentOneToMany::getCoupledPrimaryElemQpIndex().
|
protectedinherited |
List of secondary element IDs.
Definition at line 84 of file MeshAlignmentBase.h.
Referenced by MeshAlignment1D3D::buildCoupledElemQpIndexMap(), MeshAlignment::buildCoupledElemQpIndexMap(), buildCoupledElemQpIndexMapSecondary(), MeshAlignmentOneToMany::buildMapping(), MeshAlignment::buildMapping(), MeshAlignmentOneToMany::checkAlignment(), MeshAlignmentBase::getSecondaryElemIDs(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), initialize(), and MeshAlignment::initialize().
|
protectedinherited |
List of secondary element points.
Definition at line 88 of file MeshAlignmentBase.h.
Referenced by MeshAlignmentOneToMany::buildMapping(), MeshAlignment::buildMapping(), MeshAlignmentOneToMany::checkAlignment(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), 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(), 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(), 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(), buildCoupledElemQpIndexMapSecondary(), MeshAlignment2D2D::initialize(), MeshAlignment1D3D::initialize(), initialize(), and MeshAlignment::initialize().