14 #include "libmesh/elem.h" 20 const std::vector<dof_id_type> & primary_elem_ids,
21 const std::vector<std::tuple<dof_id_type, unsigned short int>> & secondary_boundary_info)
48 assembly.
reinit(primary_elem);
53 for (
const auto & secondary_elem_id : secondary_elem_ids)
61 const Elem * secondary_elem =
_mesh.
elemPtr(secondary_elem_id);
63 assembly.
reinit(secondary_elem, secondary_side_id);
69 for (std::size_t i = 0; i < secondary_qps.size(); i++)
71 unsigned int patch_size = 1;
72 std::vector<std::size_t> return_index(patch_size);
73 kd_tree_qp.neighborSearch(secondary_qps[i], patch_size, return_index);
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.
std::vector< Point > _secondary_elem_points
List of secondary element points.
virtual Elem * elemPtr(const dof_id_type i)
void initialize(const std::vector< dof_id_type > &primary_elem_ids, const std::vector< std::tuple< dof_id_type, unsigned short int >> &secondary_boundary_info)
Extracts mesh information and builds the mapping.
Builds mapping between a 1D/2D boundary and a 3D boundary.
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.
std::vector< dof_id_type > _secondary_elem_ids
List of secondary element IDs.
const MooseArray< Point > & qPoints() const
std::vector< dof_id_type > _secondary_node_ids
List of secondary node IDs.
std::vector< unsigned short int > _secondary_side_ids
List of secondary side IDs (if any)
void reinit(const Elem *elem)
virtual Elem * queryElemPtr(const dof_id_type i)
void buildMapping()
Builds the mapping using the extracted mesh information.
unsigned int getMaxLeafSize() const
unsigned int _n_qp_primary
Number of quadrature points for faces on the primary boundary.
unsigned int _n_qp_secondary
Number of quadrature points for faces on the secondary boundary.
std::vector< Point > stdVector() const
std::vector< dof_id_type > _primary_node_ids
List of primary node IDs.
std::vector< Point > _primary_elem_points
List of primary element points.
std::vector< Point > _primary_node_points
List of primary node points.
void setCurrentSubdomainID(SubdomainID i)
MeshAlignment1D3D(const MooseMesh &mesh)
Constructor.
const MooseArray< Point > & qPointsFace() const
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.
void buildCoupledElemQpIndexMap(Assembly &assembly)
Builds the map used for getting the coupled quadrature point index.
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.
processor_id_type processor_id() const
std::vector< Point > _secondary_node_points
List of secondary node points.