Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
MortarManagerBase< dim > Class Template Referenceabstract

#include <mortar_coupling_manager.h>

Inheritance diagram for MortarManagerBase< dim >:
[legend]

Public Member Functions

template<int dim2>
 MortarManagerBase (const std::vector< unsigned int > &n_subdivisions, const std::vector< double > &interface_dimensions, const Quadrature< dim2 > &quadrature, const double rotation_angle, const unsigned int rotation_axis_direction=2, const std::vector< double > &stage_heights={0.0, 1.0})
virtual ~MortarManagerBase ()=default
bool is_mesh_aligned () const
unsigned int get_n_total_mortars () const
unsigned int get_n_mortars () const
std::vector< unsigned int > get_mortar_indices (const Point< dim > &face_center, const bool is_inner) const
unsigned int get_n_total_points () const
unsigned int get_n_points () const
std::vector< Point< dim > > get_points (const Point< dim > &face_center, const bool is_inner) const
std::vector< Point< std::max(1, dim - 1)> > get_points_ref (const Point< dim > &face_center, const bool is_inner) const
std::vector< double > get_weights (const Point< dim > &face_center, const bool is_inner) const
std::vector< Tensor< 1, dim, double > > get_normals (const Point< dim > &face_center, const bool is_inner) const

Public Attributes

std::vector< unsigned int > n_subdivisions
std::vector< double > interface_dimensions

Protected Member Functions

std::tuple< unsigned int, unsigned int, unsigned int > get_config (const Point< dim > &face_center, const bool is_inner) const
virtual Point< dim > from_1D (const double angle_rad) const =0
virtual double to_1D (const Point< dim > &point) const =0
virtual Tensor< 1, dim, double > get_normal (const Point< dim > &point) const =0

Protected Attributes

Quadrature< std::max(1, dim - 1)> quadrature
const unsigned int n_quadrature_points
const double rotation_angle
const unsigned int rotation_axis_direction
const std::vector< double > stage_heights

Detailed Description

template<int dim>
class MortarManagerBase< dim >

Base class for the mortar manager.

Definition at line 25 of file mortar_coupling_manager.h.

Constructor & Destructor Documentation

◆ MortarManagerBase()

template<int dim>
template<int dim2>
MortarManagerBase< dim >::MortarManagerBase ( const std::vector< unsigned int > & n_subdivisions,
const std::vector< double > & interface_dimensions,
const Quadrature< dim2 > & quadrature,
const double rotation_angle,
const unsigned int rotation_axis_direction = 2,
const std::vector< double > & stage_heights = {0.0, 1.0} )

Mortar manager base constructor.

Template Parameters
dim2Quadrature dimension
Parameters
[in]n_subdivisionsNumber of cells at the interface between inner and outer domains
[in]interface_dimensionsVector containing the radius at the mortar interface and the domain length in the direction of the rotation axis
[in]quadratureQuadrature for local cell operations
[in]rotation_angleRotation angle for the inner domain
[in]rotation_axis_directionDirection of the rotation axis
[in]stage_heightsVector containing the unique vertex heights at the mortar interface

Definition at line 426 of file mortar_coupling_manager.h.

References interface_dimensions, n_quadrature_points, n_subdivisions, quadrature, rotation_angle, rotation_axis_direction, and stage_heights.

◆ ~MortarManagerBase()

template<int dim>
virtual MortarManagerBase< dim >::~MortarManagerBase ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ from_1D()

template<int dim>
virtual Point< dim > MortarManagerBase< dim >::from_1D ( const double angle_rad) const
protectedpure virtual

Convert angle (in radians) to quadrature point in real space.

Parameters
[in]angle_radAngle (in radians)
Returns
Point in cartesian coordinates

Implemented in MortarManagerCircle< dim >, and MortarManagerLinear< dim >.

◆ get_config()

template<int dim>
std::tuple< unsigned int, unsigned int, unsigned int > MortarManagerBase< dim >::get_config ( const Point< dim > & face_center,
const bool is_inner ) const
protected

Returns the mesh alignment type and cell index.

Parameters
[in]face_centerFace center
[in]is_innerBoolean that indicates whether the face is part of the rotor (inner) side of the mortar interface
Returns
type Cell configuration type at the interface type = 0: mesh aligned type = 1: mesh not aligned, inner domain (allows rotation) type = 2: mesh not aligned, outer domain (fixed)
id_in_plane Index of the cell in which lies the rotated cell center
id_out_plane Second index of the cell in which lies the rotated cell center.

The id_out_plane corresponds to indexes along the rotation axis, and it is necessary only for 3D problems

Definition at line 439 of file mortar_coupling_manager.cc.

References is_mesh_aligned(), n_subdivisions, rotation_angle, stage_heights, and to_1D().

◆ get_mortar_indices()

template<int dim>
std::vector< unsigned int > MortarManagerBase< dim >::get_mortar_indices ( const Point< dim > & face_center,
const bool is_inner ) const

Returns the indices of all mortars at both sides of the interface.

Parameters
[in]face_centerFace center
[in]is_innerBoolean that indicates whether the face is part of the rotor (inner) side of the mortar interface

Definition at line 76 of file mortar_coupling_manager.cc.

References get_config(), and n_subdivisions.

◆ get_n_mortars()

template<int dim>
unsigned int MortarManagerBase< dim >::get_n_mortars ( ) const

Returns the number of mortar cells connecting rotor-stator regular cells at the interface 1 = rotor-stator meshes are aligned. Only one mortar cell is needed to connect each rotor-stator regular cell pair 2 = rotor-stator meshes are not aligned. Two mortar cells are linked to each rotor or stator regular cell.

Definition at line 63 of file mortar_coupling_manager.cc.

References is_mesh_aligned().

◆ get_n_points()

template<int dim>
unsigned int MortarManagerBase< dim >::get_n_points ( ) const

Returns the number of quadrature points at the mortar cells connected to a given cell.

Definition at line 145 of file mortar_coupling_manager.cc.

References get_n_mortars(), and n_quadrature_points.

◆ get_n_total_mortars()

template<int dim>
unsigned int MortarManagerBase< dim >::get_n_total_mortars ( ) const

Returns the total number of mortars.

Definition at line 40 of file mortar_coupling_manager.cc.

References is_mesh_aligned(), and n_subdivisions.

◆ get_n_total_points()

template<int dim>
unsigned int MortarManagerBase< dim >::get_n_total_points ( ) const

Returns the total number of quadrature points at all mortar cells.

Definition at line 135 of file mortar_coupling_manager.cc.

References get_n_total_mortars(), and n_quadrature_points.

◆ get_normal()

template<int dim>
virtual Tensor< 1, dim, double > MortarManagerBase< dim >::get_normal ( const Point< dim > & point) const
protectedpure virtual

Return the normal for a given quadrature point.

Parameters
[in]pointPoint in cartesian coordinates
Returns
Corresponding outward normal vector

Implemented in MortarManagerCircle< dim >, and MortarManagerLinear< dim >.

◆ get_normals()

template<int dim>
std::vector< Tensor< 1, dim, double > > MortarManagerBase< dim >::get_normals ( const Point< dim > & face_center,
const bool is_inner ) const

Returns the normal vector for the quadrature points.

Parameters
[in]face_centerFace center
[in]is_innerBoolean that indicates whether the face is part of the rotor (inner) side of the mortar interface
Returns
result Normal vectors of the cell quadrature points

Definition at line 421 of file mortar_coupling_manager.cc.

References get_normal(), and get_points().

◆ get_points()

template<int dim>
std::vector< Point< dim > > MortarManagerBase< dim >::get_points ( const Point< dim > & face_center,
const bool is_inner ) const

Returns the coordinates of the quadrature points at both sides of the interface in the real space.

Parameters
[in]face_centerFace center
[in]is_innerBoolean that indicates whether the face is part of the rotor (inner) side of the mortar interface
Returns
points Coordinate of quadrature points of the cell in the real space

Definition at line 155 of file mortar_coupling_manager.cc.

References from_1D(), get_config(), n_quadrature_points, n_subdivisions, quadrature, rotation_angle, rotation_axis_direction, and stage_heights.

◆ get_points_ref()

template<int dim>
std::vector< Point< std::max(1, dim - 1)> > MortarManagerBase< dim >::get_points_ref ( const Point< dim > & face_center,
const bool is_inner ) const

Returns the coordinates of the quadrature points at both sides of the interface in the reference space.

Parameters
[in]face_centerFace center
[in]is_innerBoolean that indicates whether the face is part of the rotor (inner) side of the mortar interface
Returns
points Coordinate of quadrature points of the cell in the reference space

Definition at line 262 of file mortar_coupling_manager.cc.

References get_config(), n_quadrature_points, n_subdivisions, quadrature, and rotation_angle.

◆ get_weights()

template<int dim>
std::vector< double > MortarManagerBase< dim >::get_weights ( const Point< dim > & face_center,
const bool is_inner ) const

Returns the weights of the quadrature points at both sides of the interface.

Parameters
[in]face_centerFace center
[in]is_innerBoolean that indicates whether the face is part of the rotor (inner) side of the mortar interface
Returns
points Angular weights of quadrature points of the cell

Definition at line 342 of file mortar_coupling_manager.cc.

References get_config(), interface_dimensions, n_quadrature_points, n_subdivisions, quadrature, rotation_angle, and stage_heights.

◆ is_mesh_aligned()

template<int dim>
bool MortarManagerBase< dim >::is_mesh_aligned ( ) const

Verify if cells of the inner and outer domains are aligned.

Definition at line 25 of file mortar_coupling_manager.cc.

References n_subdivisions, and rotation_angle.

◆ to_1D()

template<int dim>
virtual double MortarManagerBase< dim >::to_1D ( const Point< dim > & point) const
protectedpure virtual

Convert quadrature point in real space to angle (in radians).

Parameters
[in]pointPoint in cartesian coordinates
Returns
Angle (in radians)

Implemented in MortarManagerCircle< dim >, and MortarManagerLinear< dim >.

Member Data Documentation

◆ interface_dimensions

template<int dim>
std::vector<double> MortarManagerBase< dim >::interface_dimensions

Vector containing the radius at the mortar interface and the domain length in the direction of the rotation axis

Definition at line 151 of file mortar_coupling_manager.h.

◆ n_quadrature_points

template<int dim>
const unsigned int MortarManagerBase< dim >::n_quadrature_points
protected

Number of quadrature points per cell.

Definition at line 204 of file mortar_coupling_manager.h.

◆ n_subdivisions

template<int dim>
std::vector<unsigned int> MortarManagerBase< dim >::n_subdivisions

Number of cells at the interface between inner and outer domains.

Definition at line 148 of file mortar_coupling_manager.h.

◆ quadrature

template<int dim>
Quadrature<std::max(1, dim - 1)> MortarManagerBase< dim >::quadrature
protected

Mortar quadrature.

Definition at line 202 of file mortar_coupling_manager.h.

◆ rotation_angle

template<int dim>
const double MortarManagerBase< dim >::rotation_angle
protected

Rotation angle for the inner domain.

Definition at line 206 of file mortar_coupling_manager.h.

◆ rotation_axis_direction

template<int dim>
const unsigned int MortarManagerBase< dim >::rotation_axis_direction
protected

Direction of the rotation axis (x=0, y=1, z=2).

Definition at line 208 of file mortar_coupling_manager.h.

◆ stage_heights

template<int dim>
const std::vector<double> MortarManagerBase< dim >::stage_heights
protected

Stage heights at the mortar interface along the rotation axis in 3D problems. A stage is defined as a plane perpendicular to the rotation axis containing vertices of the same height.

Definition at line 212 of file mortar_coupling_manager.h.


The documentation for this class was generated from the following files: