TruncatedCone< dim, number > Class Template Reference

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

#include <distance_functions.hpp>

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

Public Member Functions

 TruncatedCone (const dealii::Point< dim, number > &axis_center, const dealii::Tensor< 1, dim, number > &axis_direction, const number radius_bottom, const number radius_top, const number half_length)
 
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

std::array< number, 2 > meridian_offset_from_wall (const dealii::Point< dim, number > &x) const
 

Private Attributes

const dealii::Point< dim, number > axis_center
 The midpoint on its axis of the truncated cone.
 
dealii::Tensor< 1, dim, number > axis
 The unit vector along the axis, pointing from the bottom to the top end.
 
const number radius_bottom
 The radius at the bottom end, i.e. at -half_length along the axis.
 
const number radius_top
 The radius at the top end, i.e. at +half_length along the axis.
 
const number half_length
 Half of the truncated cone height, measured from the axis center along the axis.
 
const number tolerance = 1e-12
 

Detailed Description

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

Distance function of a finite truncated cone wall, described by the axis_center, the axis_direction, the radii at its two ends and its half_length along the axis. Setting one radius to zero yields a full cone; setting both radii equal yields a cylinder.

Only the lateral surface is modelled. Points beyond either end of the axis measure the distance to the corresponding rim circle, not to a closed solid.

Constructor & Destructor Documentation

◆ TruncatedCone()

template<int dim, typename number >
MeltPoolDG::Functions::Distance::TruncatedCone< dim, number >::TruncatedCone ( const dealii::Point< dim, number > &  axis_center,
const dealii::Tensor< 1, dim, number > &  axis_direction,
const number  radius_bottom,
const number  radius_top,
const number  half_length 
)
inline
Parameters
axis_centerCenter of the truncated cone axis.
axis_directionDirection of the truncated cone axis, pointing from the bottom end (radius_bottom) to the top end (radius_top). Normalized internally.
radius_bottomRadius at the lower end, i.e. at -half_length along the axis.
radius_topRadius at the upper end, i.e. at +half_length along the axis.
half_lengthHalf of the truncated cone height, measured from axis_center along the axis.

Member Function Documentation

◆ gradient()

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

Gradient (unit vector) pointing from the closest point on the lateral surface towards x. On the surface itself, where the gradient is undefined, the inward surface normal is returned instead. On the axis, where every radial direction is equivalent, a fixed radial direction perpendicular to the axis is used. Since the distance function is scalar-valued, component must be 0; any other value triggers an exception in debug mode.

◆ meridian_offset_from_wall()

template<int dim, typename number >
std::array< number, 2 > MeltPoolDG::Functions::Distance::TruncatedCone< dim, number >::meridian_offset_from_wall ( const dealii::Point< dim, number > &  x) const
inlineprivate

Offset (axial, radial) from the closest point on the lateral surface to x, expressed in the meridian half plane through x.

Since the surface is generated by revolving a straight line about the axis, the closest point lies in the meridian half plane through x. The problem therefore reduces to the distance between the point (axial_coord, radial_coord) and the meridian segment running from (-half_length, radius_bottom) to (+half_length, radius_top).

The projection onto the segment is clamped to its endpoints.

◆ value()

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

Unsigned distance from x to the closest point on the lateral surface of the truncated cone. Since the distance function is scalar-valued, component must be 0; any other value triggers an exception in debug mode.

Member Data Documentation

◆ axis

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

The unit vector along the axis, pointing from the bottom to the top end.

◆ axis_center

template<int dim, typename number >
const dealii::Point<dim, number> MeltPoolDG::Functions::Distance::TruncatedCone< dim, number >::axis_center
private

The midpoint on its axis of the truncated cone.

◆ half_length

template<int dim, typename number >
const number MeltPoolDG::Functions::Distance::TruncatedCone< dim, number >::half_length
private

Half of the truncated cone height, measured from the axis center along the axis.

◆ radius_bottom

template<int dim, typename number >
const number MeltPoolDG::Functions::Distance::TruncatedCone< dim, number >::radius_bottom
private

The radius at the bottom end, i.e. at -half_length along the axis.

◆ radius_top

template<int dim, typename number >
const number MeltPoolDG::Functions::Distance::TruncatedCone< dim, number >::radius_top
private

The radius at the top end, i.e. at +half_length along the axis.

◆ tolerance

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

Tolerance for the geometric consistency checks and for detecting points on the surface or on the axis.


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