12 #include "libmesh/elem.h" 15 : _mesh(
mesh), _meshes_are_aligned(false)
21 std::vector<Point> & elem_points,
22 std::vector<dof_id_type> & node_ids,
23 std::vector<Point> & node_points)
const 29 for (
const auto & elem_id : elem_ids)
32 elem_points.push_back(elem->vertex_average());
34 for (
const auto j : elem->node_index_range())
36 const Node & node = elem->node_ref(
j);
37 const auto node_id = node.id();
38 if (std::find(node_ids.begin(), node_ids.end(), node_id) == node_ids.end())
40 node_ids.push_back(node_id);
41 node_points.push_back(node);
49 const std::vector<std::tuple<dof_id_type, unsigned short int>> & boundary_info,
50 std::vector<dof_id_type> & elem_ids,
51 std::vector<unsigned short int> & side_ids,
52 std::vector<Point> & side_points,
53 std::vector<dof_id_type> & node_ids,
54 std::vector<Point> & node_points)
const 62 for (
const auto & elem_id_and_side : boundary_info)
64 auto elem_id = std::get<0>(elem_id_and_side);
65 elem_ids.push_back(elem_id);
67 auto side = std::get<1>(elem_id_and_side);
68 side_ids.push_back(side);
71 const Elem * side_elem = elem->build_side_ptr(side).release();
72 const Point side_center = side_elem->vertex_average();
73 side_points.push_back(side_center);
75 for (
const auto j : side_elem->node_index_range())
77 const Node & node = side_elem->node_ref(
j);
78 const auto node_id = node.id();
79 if (std::find(node_ids.begin(), node_ids.end(), node_id) == node_ids.end())
81 node_ids.push_back(node_id);
82 node_points.push_back(node);
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.
virtual Elem * elemPtr(const dof_id_type i)
const MooseMesh & _mesh
Mesh.
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.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
MeshAlignmentBase(const MooseMesh &mesh)
Constructor.