EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
EBGeometry::MollifyIF< T > Class Template Reference

Mollified implicit function. More...

#include <EBGeometry_Transform.hpp>

Inheritance diagram for EBGeometry::MollifyIF< T >:
Inheritance graph
[legend]
Collaboration diagram for EBGeometry::MollifyIF< T >:
Collaboration graph
[legend]

Public Member Functions

 MollifyIF ()=delete
 Disallowed weak construction.
 
 MollifyIF (const MollifyIF &a_other)=default
 Copy constructor.
 
 MollifyIF (MollifyIF &&a_other) noexcept=default
 Move constructor.
 
 MollifyIF (const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const std::shared_ptr< ImplicitFunction< T > > &a_mollifier, const T a_maxValue, const size_t a_numPoints) noexcept
 Full constructor.
 
 ~MollifyIF () override=default
 Destructor.
 
MollifyIFoperator= (const MollifyIF &a_other)=default
 Copy assignment operator.
 
MollifyIFoperator= (MollifyIF &&a_other) noexcept=default
 Move assignment operator.
 
value (const Vec3T< T > &a_point) const noexcept override
 Value function.
 
- Public Member Functions inherited from EBGeometry::ImplicitFunction< T >
 ImplicitFunction ()=default
 Default constructor.
 
virtual ~ImplicitFunction ()=default
 Default destructor.
 
operator() (const Vec3T< T > &a_point) const noexcept
 Call operator — alternative signature for the value function.
 
template<class BV >
BV approximateBoundingVolumeOctree (const Vec3T< T > &a_initialLowCorner, const Vec3T< T > &a_initialHighCorner, const unsigned int a_maxTreeDepth, const T &a_safety=0.0) const
 Compute an approximation to the bounding volume for the implicit surface using octree subdivision.
 

Protected Attributes

std::shared_ptr< ImplicitFunction< T > > m_implicitFunction = nullptr
 Original implicit function.
 
std::shared_ptr< ImplicitFunction< T > > m_mollifier = nullptr
 Mollifier.
 
std::vector< std::pair< Vec3T< T >, T > > m_sampledMollifier
 Mollifier Weights.
 

Detailed Description

template<class T>
class EBGeometry::MollifyIF< T >

Mollified implicit function.

Convolves the wrapped implicit function with a pre-sampled mollifier kernel (typically a sphere SDF) over a uniform 3-D grid of a_numPoints^3 sample offsets spanning [-a_maxValue, a_maxValue]^3. Weights are normalized to sum to 1.

Template Parameters
TFloating-point precision

Constructor & Destructor Documentation

◆ MollifyIF() [1/3]

template<class T >
EBGeometry::MollifyIF< T >::MollifyIF ( const MollifyIF< T > &  a_other)
default

Copy constructor.

Parameters
[in]a_otherOther MollifyIF.

◆ MollifyIF() [2/3]

template<class T >
EBGeometry::MollifyIF< T >::MollifyIF ( MollifyIF< T > &&  a_other)
defaultnoexcept

Move constructor.

Parameters
[in,out]a_otherOther MollifyIF.

◆ MollifyIF() [3/3]

template<class T >
EBGeometry::MollifyIF< T >::MollifyIF ( const std::shared_ptr< ImplicitFunction< T > > &  a_implicitFunction,
const std::shared_ptr< ImplicitFunction< T > > &  a_mollifier,
const a_maxValue,
const size_t  a_numPoints 
)
noexcept

Full constructor.

Parameters
[in]a_implicitFunctionInput implicit function.
[in]a_mollifierMollifier implicit function (e.g. a sphere SDF)
[in]a_maxValueHalf-width of the sampling region; must be > 0 for any smoothing to occur.
[in]a_numPointsNumber of sample points per axis; must be >= 2 for any smoothing to occur.

Member Function Documentation

◆ operator=() [1/2]

template<class T >
MollifyIF & EBGeometry::MollifyIF< T >::operator= ( const MollifyIF< T > &  a_other)
default

Copy assignment operator.

Parameters
[in]a_otherOther MollifyIF.
Returns
Reference to (*this).

◆ operator=() [2/2]

template<class T >
MollifyIF & EBGeometry::MollifyIF< T >::operator= ( MollifyIF< T > &&  a_other)
defaultnoexcept

Move assignment operator.

Parameters
[in,out]a_otherOther MollifyIF.
Returns
Reference to (*this).

◆ value()

template<class T >
T EBGeometry::MollifyIF< T >::value ( const Vec3T< T > &  a_point) const
overridevirtualnoexcept

Value function.

Parameters
[in]a_pointQuery point
Returns
Weighted convolution of the wrapped function with the pre-sampled mollifier kernel

Implements EBGeometry::ImplicitFunction< T >.


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