Plane< dim, number > Class Template Reference

Developer Documentation: MeltPoolDG::Functions::Distance::Plane< dim, number > Class Template Reference
Developer Documentation
MeltPoolDG::Functions::Distance::Plane< dim, number > Class Template Reference

#include <distance_functions.hpp>

Inheritance diagram for MeltPoolDG::Functions::Distance::Plane< dim, number >:
[legend]
Collaboration diagram for MeltPoolDG::Functions::Distance::Plane< dim, number >:
[legend]

Public Member Functions

 Plane (const dealii::Point< dim, number > &center_of_wall, const dealii::Tensor< 1, dim, number > &normal, const std::array< number, dim - 1 > &half_extents, const dealii::Tensor< 1, dim, number > &first_tangent_direction=dealii::Tensor< 1, dim, number >())
 
dealii::Tensor< 1, dim, number > gradient (const dealii::Point< dim, number > &x, const unsigned int component=0) const override
 
number value (const dealii::Point< dim, number > &x, const unsigned int component=0) const override
 

Private Member Functions

dealii::Tensor< 1, dim, number > offset_from_wall (const dealii::Point< dim, number > &x) const
 

Private Attributes

dealii::Point< dim, number > center_of_wall
 The center of the rectangular wall plane.
 
dealii::Tensor< 1, dim, number > normal
 The normal of the wall plane.
 
std::array< dealii::Tensor< 1, dim, number >, dim - 1 > tangents
 The unit tangent directions spanning the wall plane (one in 2D, two in 3D).
 
std::array< number, dim - 1 > half_extents
 The half-widths of the wall along each tangent direction.
 
const number tolerance = 1e-12
 Tolerance for the geometric consistency checks and for detecting points on the wall.
 

Detailed Description

template<int dim, typename number>
class MeltPoolDG::Functions::Distance::Plane< dim, number >

Distance function of a finite (rectangular) wall segment: described by its center_of_wall, its unit normal, and the in-plane tangent direction(s) along which the wall extends. In 2D there is a single tangent direction, perpendicular to the normal; in 3D there are two, spanned by first_tangent_direction and its cross product with the normal. The half_extents give the size of the wall: its half-width along each of these tangent directions.

Constructor & Destructor Documentation

◆ Plane()

template<int dim, typename number >
MeltPoolDG::Functions::Distance::Plane< dim, number >::Plane ( const dealii::Point< dim, number > &  center_of_wall,
const dealii::Tensor< 1, dim, number > &  normal,
const std::array< number, dim - 1 > &  half_extents,
const dealii::Tensor< 1, dim, number > &  first_tangent_direction = dealii::Tensor<1, dim, number>() 
)
inline
Parameters
center_of_wallPoint at the center of the wall plane.
normalUnit normal of the wall plane.
half_extentsHalf-widths of the wall along each in-plane tangent direction.
first_tangent_direction(3D only) Direction of the first in-plane tangent, to which half_extents[0] corresponds. Must be nonzero and perpendicular to normal. The second tangent is computed as normal x first_tangent_direction.

Member Function Documentation

◆ gradient()

template<int dim, typename number >
dealii::Tensor< 1, dim, number > MeltPoolDG::Functions::Distance::Plane< dim, number >::gradient ( const dealii::Point< dim, number > &  x,
const unsigned int  component = 0 
) const
inlineoverride

Return the unit vector pointing from the closest point on the wall to x; on the wall surface, the unit normal is returned instead. Since the distance function is scalar-valued, component must be 0; any other value triggers an exception in debug mode.

◆ offset_from_wall()

template<int dim, typename number >
dealii::Tensor< 1, dim, number > MeltPoolDG::Functions::Distance::Plane< dim, number >::offset_from_wall ( const dealii::Point< dim, number > &  x) const
inlineprivate

Vector from the closest point on the (clamped, finite) wall patch to x.

◆ value()

template<int dim, typename number >
number MeltPoolDG::Functions::Distance::Plane< dim, number >::value ( const dealii::Point< dim, number > &  x,
const unsigned int  component = 0 
) const
inlineoverride

Return the distance from x to the closest point on the finite wall as a scalar value. For points whose projection onto the wall plane lies within the wall's extents, this is the distance along the normal; otherwise, it is the distance to the closest point on the wall's boundary (edge or corner). Since the distance function is scalar-valued, component must be 0; any other value triggers an exception in debug mode.

Member Data Documentation

◆ center_of_wall

template<int dim, typename number >
dealii::Point<dim, number> MeltPoolDG::Functions::Distance::Plane< dim, number >::center_of_wall
private

The center of the rectangular wall plane.

◆ half_extents

template<int dim, typename number >
std::array<number, dim - 1> MeltPoolDG::Functions::Distance::Plane< dim, number >::half_extents
private

The half-widths of the wall along each tangent direction.

◆ normal

template<int dim, typename number >
dealii::Tensor<1, dim, number> MeltPoolDG::Functions::Distance::Plane< dim, number >::normal
private

The normal of the wall plane.

◆ tangents

template<int dim, typename number >
std::array<dealii::Tensor<1, dim, number>, dim - 1> MeltPoolDG::Functions::Distance::Plane< dim, number >::tangents
private

The unit tangent directions spanning the wall plane (one in 2D, two in 3D).

◆ tolerance

template<int dim, typename number >
const number MeltPoolDG::Functions::Distance::Plane< dim, number >::tolerance = 1e-12
private

Tolerance for the geometric consistency checks and for detecting points on the wall.


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