https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MeshAlignmentBase.h
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#pragma once
11
12#include "MooseMesh.h"
13
22{
23public:
30
34 const std::vector<dof_id_type> & getPrimaryElemIDs() const { return _primary_elem_ids; }
35
39 const std::vector<dof_id_type> & getSecondaryElemIDs() const { return _secondary_elem_ids; }
40
44 bool meshesAreAligned() const { return _meshes_are_aligned; }
45
46protected:
55 void extractFrom1DElements(const std::vector<dof_id_type> & elem_ids,
56 std::vector<Point> & elem_points,
57 std::vector<dof_id_type> & node_ids,
58 std::vector<Point> & node_points) const;
59
71 const std::vector<std::tuple<dof_id_type, unsigned short int>> & boundary_info,
72 std::vector<dof_id_type> & elem_ids,
73 std::vector<unsigned short int> & side_ids,
74 std::vector<Point> & side_points,
75 std::vector<dof_id_type> & node_ids,
76 std::vector<Point> & node_points) const;
77
80
82 std::vector<dof_id_type> _primary_elem_ids;
84 std::vector<dof_id_type> _secondary_elem_ids;
86 std::vector<Point> _primary_elem_points;
88 std::vector<Point> _secondary_elem_points;
89
91 std::vector<unsigned short int> _primary_side_ids;
93 std::vector<unsigned short int> _secondary_side_ids;
94
96 std::vector<dof_id_type> _primary_node_ids;
98 std::vector<dof_id_type> _secondary_node_ids;
100 std::vector<Point> _primary_node_points;
102 std::vector<Point> _secondary_node_points;
103
106};
Builds mapping between two aligned subdomains/boundaries.
bool _meshes_are_aligned
Flag that meshes are aligned.
std::vector< unsigned short int > _primary_side_ids
List of primary side IDs (if any)
const MooseMesh & _mesh
Mesh.
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.
const std::vector< dof_id_type > & getPrimaryElemIDs() const
Returns the list of element IDs on the primary boundary.
const std::vector< dof_id_type > & getSecondaryElemIDs() const
Returns the list of element IDs on the secondary boundary.
std::vector< Point > _primary_elem_points
List of primary element points.
std::vector< Point > _primary_node_points
List of primary node points.
bool meshesAreAligned() const
Returns true if the primary and secondary meshes are aligned.
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.
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.
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.
MeshBase & mesh