29 unsigned int patch_size = 1;
30 std::vector<std::size_t> return_index(patch_size);
32 const std::size_t i_primary = return_index[0];
43 it->second.push_back(secondary_elem_id);
69 const auto primary_ax_coord = axis_direction * (primary_elem_point - axis_point);
74 for (
const auto secondary_elem_id : secondary_elem_ids)
80 const auto secondary_ax_coord = axis_direction * (secondary_elem_point - axis_point);
102 "The element ID has no coupled elements.");
113 const std::vector<dof_id_type> &
117 "The element ID has no coupled elements.");
123 const unsigned int & secondary_qp)
const 127 "The element ID has no coupled quadrature point indices.");
128 mooseAssert(secondary_qp < it->second.size(),
"The quadrature index does not exist in the map.");
129 return it->second[secondary_qp];
std::vector< Point > _secondary_elem_points
List of secondary element points.
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Builds mapping between two aligned subdomains/boundaries.
bool hasCoupledPrimaryElemID(const dof_id_type &secondary_elem_id) const
Returns true if the given secondary element ID has a coupled primary element.
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.
const MooseMesh & _mesh
Mesh.
bool _meshes_are_aligned
Flag that meshes are aligned.
unsigned long _max_coupling_size
The maximum number of secondary elements coupled to any primary element.
std::vector< dof_id_type > _secondary_elem_ids
List of secondary element IDs.
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...
void buildMapping()
Builds the mapping using the extracted mesh information.
unsigned int getMaxLeafSize() const
std::vector< Point > _primary_elem_points
List of primary element points.
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.
dof_id_type getCoupledPrimaryElemID(const dof_id_type &secondary_elem_id) const
Gets the coupled primary element ID for a given secondary element ID.
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.
std::vector< dof_id_type > _primary_elem_ids
List of primary element IDs.
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.
MeshAlignmentOneToMany(const MooseMesh &mesh)
Constructor.
void checkAlignment(const Point &axis_point, const RealVectorValue &axis_direction)
Checks the alignment and sets _mesh_alignment accordingly.
auto index_range(const T &sizable)
bool hasCoupledSecondaryElemIDs(const dof_id_type &primary_elem_id) const
Returns true if the given primary element ID has coupled secondary elements.