ViennaLS
Loading...
Searching...
No Matches
viennals::Domain< T, D > Class Template Reference

Class containing all information about the level set, including the dimensions of the domain, boundary conditions and all data. More...

#include <lsDomain.hpp>

Public Types

typedef T ValueType
 
typedef hrleGrid< DGridType
 
typedef hrleDomain< T, DDomainType
 
typedef BoundaryConditionEnum< DBoundaryType
 
typedef std::vector< std::pair< hrleVectorType< hrleIndexType, D >, T > > PointValueVectorType
 
typedef std::vector< std::array< T, D > > NormalVectorType
 
typedef PointData< TPointDataType
 
typedef std::vector< bool > VoidPointMarkersType
 

Public Member Functions

 Domain (hrleCoordType gridDelta=1.0)
 initalise an empty infinite Domain
 
 Domain (hrleCoordType *bounds, BoundaryType *boundaryConditions, hrleCoordType gridDelta=1.0)
 
 Domain (std::vector< hrleCoordType > bounds, std::vector< unsigned > boundaryConditions, hrleCoordType gridDelta=1.0)
 
 Domain (PointValueVectorType pointData, hrleCoordType *bounds, BoundaryType *boundaryConditions, hrleCoordType gridDelta=1.0)
 initialise Domain with domain size "bounds", filled with point/value pairs in pointData
 
 Domain (GridType passedGrid)
 
 Domain (SmartPointer< Domain > passedDomain)
 
void finalize (int newWidth)
 this function sets a new levelset width and finalizes the levelset, so it is ready for use by other algorithms
 
void finalize ()
 this function finalizes the levelset, so it is ready for use by other algorithms
 
void deepCopy (const SmartPointer< Domain< T, D > > passedDomain)
 copy all values of "passedDomain" to this Domain
 
void insertPoints (PointValueVectorType pointData, bool sort=true)
 re-initalise Domain with the point/value pairs in pointData This is similar to lsFromMesh with the difference that pointData contains (INDEX, Value) pairs, while lsFromMesh expects coordinates rather than indices
 
const GridTypegetGrid () const
 get reference to the grid on which the levelset is defined
 
GridTypegetGrid ()
 get mutable reference to the grid on which the level set is defined
 
DomainTypegetDomain ()
 get const reference to the underlying hrleDomain data structure
 
const DomainTypegetDomain () const
 
unsigned getNumberOfSegments () const
 returns the number of segments, the levelset is split into. This is useful for algorithm parallelisation
 
unsigned getNumberOfPoints () const
 returns the number of defined points
 
int getLevelSetWidth () const
 
void setLevelSetWidth (int width)
 
void clearMetaData ()
 
PointDataTypegetPointData ()
 get reference to point data saved in the level set
 
const PointDataTypegetPointData () const
 
VoidPointMarkersTypegetVoidPointMarkers ()
 get reference to the voidPoints markers for all points
 
const VoidPointMarkersTypegetVoidPointMarkers () const
 
void print (std::ostream &out=std::cout)
 prints basic information and all memebers of the levelset structure
 
std::ostream & serialize (std::ostream &stream)
 Serializes the Domain into a binary stream.
 
std::istream & deserialize (std::istream &stream)
 Deserialize Domain from binary stream.
 

Static Public Attributes

static constexpr int dimensions = D
 
static constexpr T POS_VALUE = std::numeric_limits<T>::max()
 
static constexpr T NEG_VALUE = std::numeric_limits<T>::lowest()
 

Detailed Description

template<class T, int D>
class viennals::Domain< T, D >

Class containing all information about the level set, including the dimensions of the domain, boundary conditions and all data.

Member Typedef Documentation

◆ BoundaryType

template<class T , int D>
typedef BoundaryConditionEnum<D> viennals::Domain< T, D >::BoundaryType

◆ DomainType

template<class T , int D>
typedef hrleDomain<T, D> viennals::Domain< T, D >::DomainType

◆ GridType

template<class T , int D>
typedef hrleGrid<D> viennals::Domain< T, D >::GridType

◆ NormalVectorType

template<class T , int D>
typedef std::vector<std::array<T, D> > viennals::Domain< T, D >::NormalVectorType

◆ PointDataType

template<class T , int D>
typedef PointData<T> viennals::Domain< T, D >::PointDataType

◆ PointValueVectorType

template<class T , int D>
typedef std::vector<std::pair<hrleVectorType<hrleIndexType, D>, T> > viennals::Domain< T, D >::PointValueVectorType

◆ ValueType

template<class T , int D>
typedef T viennals::Domain< T, D >::ValueType

◆ VoidPointMarkersType

template<class T , int D>
typedef std::vector<bool> viennals::Domain< T, D >::VoidPointMarkersType

Constructor & Destructor Documentation

◆ Domain() [1/6]

template<class T , int D>
viennals::Domain< T, D >::Domain ( hrleCoordType gridDelta = 1.0)
inline

initalise an empty infinite Domain

◆ Domain() [2/6]

template<class T , int D>
viennals::Domain< T, D >::Domain ( hrleCoordType * bounds,
BoundaryType * boundaryConditions,
hrleCoordType gridDelta = 1.0 )
inline

◆ Domain() [3/6]

template<class T , int D>
viennals::Domain< T, D >::Domain ( std::vector< hrleCoordType > bounds,
std::vector< unsigned > boundaryConditions,
hrleCoordType gridDelta = 1.0 )
inline

◆ Domain() [4/6]

template<class T , int D>
viennals::Domain< T, D >::Domain ( PointValueVectorType pointData,
hrleCoordType * bounds,
BoundaryType * boundaryConditions,
hrleCoordType gridDelta = 1.0 )
inline

initialise Domain with domain size "bounds", filled with point/value pairs in pointData

◆ Domain() [5/6]

template<class T , int D>
viennals::Domain< T, D >::Domain ( GridType passedGrid)
inline

◆ Domain() [6/6]

template<class T , int D>
viennals::Domain< T, D >::Domain ( SmartPointer< Domain< T, D > > passedDomain)
inline

Member Function Documentation

◆ clearMetaData()

template<class T , int D>
void viennals::Domain< T, D >::clearMetaData ( )
inline

◆ deepCopy()

template<class T , int D>
void viennals::Domain< T, D >::deepCopy ( const SmartPointer< Domain< T, D > > passedDomain)
inline

copy all values of "passedDomain" to this Domain

◆ deserialize()

template<class T , int D>
std::istream & viennals::Domain< T, D >::deserialize ( std::istream & stream)
inline

Deserialize Domain from binary stream.

◆ finalize() [1/2]

template<class T , int D>
void viennals::Domain< T, D >::finalize ( )
inline

this function finalizes the levelset, so it is ready for use by other algorithms

◆ finalize() [2/2]

template<class T , int D>
void viennals::Domain< T, D >::finalize ( int newWidth)
inline

this function sets a new levelset width and finalizes the levelset, so it is ready for use by other algorithms

◆ getDomain() [1/2]

template<class T , int D>
DomainType & viennals::Domain< T, D >::getDomain ( )
inline

get const reference to the underlying hrleDomain data structure

◆ getDomain() [2/2]

template<class T , int D>
const DomainType & viennals::Domain< T, D >::getDomain ( ) const
inline

◆ getGrid() [1/2]

template<class T , int D>
GridType & viennals::Domain< T, D >::getGrid ( )
inline

get mutable reference to the grid on which the level set is defined

◆ getGrid() [2/2]

template<class T , int D>
const GridType & viennals::Domain< T, D >::getGrid ( ) const
inline

get reference to the grid on which the levelset is defined

◆ getLevelSetWidth()

template<class T , int D>
int viennals::Domain< T, D >::getLevelSetWidth ( ) const
inline

◆ getNumberOfPoints()

template<class T , int D>
unsigned viennals::Domain< T, D >::getNumberOfPoints ( ) const
inline

returns the number of defined points

◆ getNumberOfSegments()

template<class T , int D>
unsigned viennals::Domain< T, D >::getNumberOfSegments ( ) const
inline

returns the number of segments, the levelset is split into. This is useful for algorithm parallelisation

◆ getPointData() [1/2]

template<class T , int D>
PointDataType & viennals::Domain< T, D >::getPointData ( )
inline

get reference to point data saved in the level set

◆ getPointData() [2/2]

template<class T , int D>
const PointDataType & viennals::Domain< T, D >::getPointData ( ) const
inline

◆ getVoidPointMarkers() [1/2]

template<class T , int D>
VoidPointMarkersType & viennals::Domain< T, D >::getVoidPointMarkers ( )
inline

get reference to the voidPoints markers for all points

◆ getVoidPointMarkers() [2/2]

template<class T , int D>
const VoidPointMarkersType & viennals::Domain< T, D >::getVoidPointMarkers ( ) const
inline

◆ insertPoints()

template<class T , int D>
void viennals::Domain< T, D >::insertPoints ( PointValueVectorType pointData,
bool sort = true )
inline

re-initalise Domain with the point/value pairs in pointData This is similar to lsFromMesh with the difference that pointData contains (INDEX, Value) pairs, while lsFromMesh expects coordinates rather than indices

◆ print()

template<class T , int D>
void viennals::Domain< T, D >::print ( std::ostream & out = std::cout)
inline

prints basic information and all memebers of the levelset structure

◆ serialize()

template<class T , int D>
std::ostream & viennals::Domain< T, D >::serialize ( std::ostream & stream)
inline

Serializes the Domain into a binary stream.

◆ setLevelSetWidth()

template<class T , int D>
void viennals::Domain< T, D >::setLevelSetWidth ( int width)
inline

Member Data Documentation

◆ dimensions

template<class T , int D>
int viennals::Domain< T, D >::dimensions = D
staticconstexpr

◆ NEG_VALUE

template<class T , int D>
T viennals::Domain< T, D >::NEG_VALUE = std::numeric_limits<T>::lowest()
staticconstexpr

◆ POS_VALUE

template<class T , int D>
T viennals::Domain< T, D >::POS_VALUE = std::numeric_limits<T>::max()
staticconstexpr

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