FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
Fiber::SkeletonID Class Reference

Identifier for Skeletons within a Grid. More...

#include <SkeletonID.hpp>

Inheritance diagram for Fiber::SkeletonID:
Fiber::Skeleton Fiber::SkeletonExistence

Public Member Functions

 SkeletonID (int dimension, int index_depth=0)
 Constructor via dimensionality and index depth.
 
 SkeletonID (const std::nullptr_t &)
 
 SkeletonID (const DynamicSize &theDomainSize, int IndexDepth, const DynamicSize &theRefinementSize)
 
 SkeletonID (const SkeletonID &Sid, int index_depth_increment)
 Construct a skeleton ID with the same properties but its index depth incremented by a certain amount.
 
 ~SkeletonID ()
 Destructor.
 
const SkeletonIDID () const
 Shortcut to ease type conversion in child classes.
 
bool operator< (const SkeletonID &S) const
 Ordering operator, mostly used for stl::map.
 
int IndexDepth () const
 Index depth of this skeleton.
 
const DynamicSizeDomainSize () const
 
const DynamicSizeSize () const
 
const DynamicSizeRefinementSize () const
 
const DynamicSizegetRefinementSize () const
 
template<class T >
DynamicSizesetSize (int N, const T values[])
 
template<class T >
DynamicSizesetRefinementSize (int N, const T values[])
 
template<int N>
auto setSize (const MultiIndex< N > &I)
 
template<int N>
DynamicSizesetRefinementSize (const MultiIndex< N > &I)
 
int Dims () const
 Dimensionality of this skeleton.
 
int getRank () const
 Dimensionality of this skeleton.
 
bool hasCompatibleHigherDims (const DynamicSize &DS) const
 
int NumberOfRefinementLevels () const
 Number of available refinement levels This usually matches Dims, but in case of Dims=0 also allows a refinement level.
 
index_t Refinement (unsigned int i) const
 
bool isIsotropicRefinementFactor (index_t F) const
 Check if the given skeleton ID corresponds to a refinement by factor F in all dimensions.
 
index_t getHomogeneousLevel () const
 IF this skeleton ID refers to a refinement level that is same in all dimensions, return that single integer.
 
index_t getTotalRefinement () const
 
unsigned getDomainSize (unsigned i) const
 
bool setSize (unsigned i, index_t extension)
 
template<int N>
bool setSize (MultiIndex< N > &MI) const
 
bool setSize (const DynamicSize &DS) const
 
const DynamicSizesetRefinementSize (const DynamicSize &DS)
 
bool setRefinement (unsigned i, index_t extension)
 
void setIsotropicRefinement (index_t ref_level)
 Set the same refinement level in all dimensions of the skeleton dimensionality.
 
bool hasRefinement ()
 
std::string Name () const
 Create a textual representation of the inherent parameters of the Skeleton ID.
 
bool operator! () const
 check for mere validity of this SkeletonID
 
 operator bool () const
 check for validity of this SkeletonID
 

Static Public Member Functions

static SkeletonID nextRefinement (const SkeletonID &Sid, int refinement_increment)
 Create a SkeletonID that is refined by a certain increment.
 
static SkeletonID refinedSkeleton (const SkeletonID &Sid, int refinement_value)
 Create a SkeletonID that is refined by a certain value.
 

Friends

std::ostream & operator<< (std::ostream &os, const SkeletonID &SID)
 
bool operator== (const SkeletonID &L, const SkeletonID &R)
 Check if SkeletonIDs are identical.
 
bool operator!= (const SkeletonID &L, const SkeletonID &R)
 Check if two SkeletonIDs differ.
 

Detailed Description

Identifier for Skeletons within a Grid.

Note
This stuff should rather go into the Skeleton class itself, and the Grid should use a set<> or similar.
Examples
Sphere.cpp, XF_LineSetHierarchical.cpp, XF_LineSetHierarchicalRegularized.cpp, and trimesh.cpp.

Member Function Documentation

◆ getHomogeneousLevel()

index_t Fiber::SkeletonID::getHomogeneousLevel ( ) const
inline

IF this skeleton ID refers to a refinement level that is same in all dimensions, return that single integer.

If the refinement in these dimensions do not match, return a negative value.

References Fiber::DynamicSize::getRank().

Referenced by Fiber::Grid::findHighestHomogenousRefinement(), and Fiber::Grid::findHighestHomogenousVertexRefinement().

◆ setIsotropicRefinement()

void Fiber::SkeletonID::setIsotropicRefinement ( index_t  ref_level)
inline

Set the same refinement level in all dimensions of the skeleton dimensionality.

e.g. for a point skeleton of dim=3 and indexdepth=0 the isotropic refinement is e.g. 1x1x1 or 2x2x2.