chombo-discharge
|
Signed distance function for a DCEL mesh. More...
#include <CD_SignedDistanceBVH.H>
Public Types | |
using | Vec3 = EBGeometry::Vec3T< T > |
Alias for always-3D vector with template. | |
using | Face = EBGeometry::DCEL::FaceT< T > |
DCEL polygon face, which is the primitive type enclosed in the bounding volume hierarchy. | |
using | Node = EBGeometry::BVH::LinearBVH< T, Face, BV, K > |
Alias for BVH node with precision T, enclosing DCEL face with a bounding volume type V. | |
Public Member Functions | |
SignedDistanceBVH ()=delete | |
Disallowed weak construction. | |
SignedDistanceBVH (const std::shared_ptr< Node > &a_root, const bool a_flipInside, const Real a_zCoord=0.0) | |
Full constructor. More... | |
SignedDistanceBVH (const SignedDistanceBVH &a_object) | |
Copy constructor. | |
virtual | ~SignedDistanceBVH () |
Destructor (does nothing) | |
Real | value (const RealVect &a_point) const override |
Value function. More... | |
BaseIF * | newImplicitFunction () const override |
Factory method. Sends pointers around. | |
Protected Attributes | |
Real | m_zCoord |
For 2D only. This is the z-coordinate through which we slice the object. | |
std::shared_ptr< Node > | m_root |
Pointer to root node in bounding volume hierarchy. | |
bool | m_flipInside |
Hook for turning inside to outside. | |
long | m_numCalled |
Number of times the implicit function was called. Use for performance tracking. | |
std::chrono::duration< double > | m_timespan |
Total time spent computing the signed distance. Use for performance tracking. | |
Signed distance function for a DCEL mesh.
This class uses the EBGeometry submodule for creating signed distance functions from compelx geometries. The template parameters are the precision and the bounding volume type. To use this class, the user must first create the DCEL mesh and then create the BVH.
SignedDistanceBVH< T, BV, K >::SignedDistanceBVH | ( | const std::shared_ptr< Node > & | a_root, |
const bool | a_flipInside, | ||
const Real | a_zCoord = 0.0 |
||
) |
Full constructor.
[in] | a_root | Pointer to root node in the bounding volume hierarchy. |
[in] | a_flipInside | If true, turns inside to outside |
[in] | a_zCoord | Special flag for 2D – indicates the z-position through which we slice the 3D object. Will no longer be signed distance. |
|
override |
Value function.
[in] | a_point | Spatial point |