https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MeshAlignment2D2D.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "MeshAlignment2D2D.h"
11
13
14void
16 const std::vector<std::vector<std::tuple<dof_id_type, unsigned short int>>> & boundary_infos,
17 const Point & axis_point,
18 const RealVectorValue & axis_direction)
19{
20 const auto n_boundaries = boundary_infos.size();
21 if (n_boundaries > 1)
22 {
23 extractFromBoundaryInfo(boundary_infos[0],
29
30 for (unsigned int i = 1; i < n_boundaries; ++i)
31 {
32 std::vector<dof_id_type> elem_ids;
33 std::vector<unsigned short int> side_ids;
34 std::vector<dof_id_type> node_ids;
35 std::vector<Point> elem_points;
36 std::vector<Point> node_points;
38 boundary_infos[i], elem_ids, side_ids, elem_points, node_ids, node_points);
39 _secondary_elem_ids.insert(_secondary_elem_ids.end(), elem_ids.begin(), elem_ids.end());
40 _secondary_side_ids.insert(_secondary_side_ids.end(), side_ids.begin(), side_ids.end());
41 _secondary_node_ids.insert(_secondary_node_ids.end(), node_ids.begin(), node_ids.end());
43 _secondary_elem_points.end(), elem_points.begin(), elem_points.end());
45 _secondary_node_points.end(), node_points.begin(), node_points.end());
46 }
47
49 checkAlignment(axis_point, axis_direction);
50 }
51}
MeshAlignment2D2D(const MooseMesh &mesh)
Constructor.
void initialize(const std::vector< std::vector< std::tuple< dof_id_type, unsigned short int > > > &boundary_infos, const Point &axis_point, const RealVectorValue &axis_direction)
Extracts mesh information and builds the mapping.
std::vector< unsigned short int > _primary_side_ids
List of primary side IDs (if any)
std::vector< dof_id_type > _primary_node_ids
List of primary node IDs.
std::vector< dof_id_type > _primary_elem_ids
List of primary element IDs.
std::vector< Point > _primary_elem_points
List of primary element points.
std::vector< Point > _primary_node_points
List of primary node points.
std::vector< dof_id_type > _secondary_node_ids
List of secondary node IDs.
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.
std::vector< Point > _secondary_elem_points
List of secondary element points.
std::vector< unsigned short int > _secondary_side_ids
List of secondary side IDs (if any)
std::vector< Point > _secondary_node_points
List of secondary node points.
std::vector< dof_id_type > _secondary_elem_ids
List of secondary element IDs.
Builds mapping between a 1D/2D boundary and a 3D boundary.
void checkAlignment(const Point &axis_point, const RealVectorValue &axis_direction)
Checks the alignment and sets _mesh_alignment accordingly.
void buildMapping()
Builds the mapping using the extracted mesh information.
MeshBase & mesh