OpenVDB  2.3.0
Classes | Public Types | Public Member Functions | List of all members
LevelSetAdvection< GridT, FieldT, InterruptT > Class Template Reference

Hyperbolic advection of narrow-band level sets in an external velocity field. More...

#include <LevelSetAdvect.h>

Public Types

typedef GridT GridType
 
typedef LevelSetTracker< GridT,
InterruptT > 
TrackerT
 
typedef TrackerT::RangeType RangeType
 
typedef TrackerT::LeafType LeafType
 
typedef TrackerT::BufferType BufferType
 
typedef TrackerT::ValueType ScalarType
 
typedef FieldT::VectorType VectorType
 

Public Member Functions

 LevelSetAdvection (GridT &grid, const FieldT &field, InterruptT *interrupt=NULL)
 Main constructor. More...
 
virtual ~LevelSetAdvection ()
 
math::BiasedGradientScheme getSpatialScheme () const
 
void setSpatialScheme (math::BiasedGradientScheme scheme)
 Set the spatial finite difference scheme. More...
 
math::TemporalIntegrationScheme getTemporalScheme () const
 
void setTemporalScheme (math::TemporalIntegrationScheme scheme)
 Set the spatial finite difference scheme. More...
 
math::BiasedGradientScheme getTrackerSpatialScheme () const
 
void setTrackerSpatialScheme (math::BiasedGradientScheme scheme)
 Set the spatial finite difference scheme. More...
 
math::TemporalIntegrationScheme getTrackerTemporalScheme () const
 
void setTrackerTemporalScheme (math::TemporalIntegrationScheme scheme)
 Set the spatial finite difference scheme. More...
 
int getNormCount () const
 
void setNormCount (int n)
 Set the number of normalizations performed per track or normalize call. More...
 
int getGrainSize () const
 
void setGrainSize (int grainsize)
 Set the grain-size used for multi-threading. More...
 
size_t advect (ScalarType time0, ScalarType time1)
 

Detailed Description

template<typename GridT, typename FieldT = EnrightField<typename GridT::ValueType>, typename InterruptT = util::NullInterrupter>
class openvdb::v2_3_0::tools::LevelSetAdvection< GridT, FieldT, InterruptT >

Hyperbolic advection of narrow-band level sets in an external velocity field.

The FieldType template argument below refers to any functor with the following interface (see tools/VelocityFields.h for examples):

class VelocityField {
...
public:
openvdb::VectorType operator() (const openvdb::Coord& xyz, ScalarType time) const;
...
};
Note
The functor method returns the velocity field at coordinate position xyz of the advection grid, and for the specified time. Note that since the velocity is returned in the local coordinate space of the grid that is being advected, the functor typically depends on the transformation of that grid. This design is chosen for performance reasons.

The InterruptType template argument below refers to any class with the following interface:

class Interrupter {
...
public:
void start(const char* name = NULL)// called when computations begin
void end() // called when computations end
bool wasInterrupted(int percent=-1)// return true to break computation
};
Note
If no template argument is provided for this InterruptType the util::NullInterrupter is used which implies that all interrupter calls are no-ops (i.e. incurs no computational overhead).

Member Typedef Documentation

typedef GridT GridType
typedef LevelSetTracker<GridT, InterruptT> TrackerT
typedef FieldT::VectorType VectorType

Constructor & Destructor Documentation

LevelSetAdvection ( GridT &  grid,
const FieldT &  field,
InterruptT *  interrupt = NULL 
)
inline

Main constructor.

virtual ~LevelSetAdvection ( )
inlinevirtual

Member Function Documentation

size_t advect ( ScalarType  time0,
ScalarType  time1 
)
inline

Advect the level set from it's current time, time0, to it's final time, time1. If time0>time1 backward advection is performed.

Returns
number of CFL iterations used to advect from time0 to time1
int getGrainSize ( ) const
inline
Returns
the grain-size used for multi-threading
int getNormCount ( ) const
inline
Returns
The number of normalizations performed per track or normalize call.
math::BiasedGradientScheme getSpatialScheme ( ) const
inline
Returns
the spatial finite difference scheme
math::TemporalIntegrationScheme getTemporalScheme ( ) const
inline
Returns
the temporal integration scheme
math::BiasedGradientScheme getTrackerSpatialScheme ( ) const
inline
Returns
the spatial finite difference scheme
math::TemporalIntegrationScheme getTrackerTemporalScheme ( ) const
inline
Returns
the temporal integration scheme
void setGrainSize ( int  grainsize)
inline

Set the grain-size used for multi-threading.

Note
A grainsize of 0 or less disables multi-threading!
void setNormCount ( int  n)
inline

Set the number of normalizations performed per track or normalize call.

void setSpatialScheme ( math::BiasedGradientScheme  scheme)
inline

Set the spatial finite difference scheme.

void setTemporalScheme ( math::TemporalIntegrationScheme  scheme)
inline

Set the spatial finite difference scheme.

void setTrackerSpatialScheme ( math::BiasedGradientScheme  scheme)
inline

Set the spatial finite difference scheme.

void setTrackerTemporalScheme ( math::TemporalIntegrationScheme  scheme)
inline

Set the spatial finite difference scheme.


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