ViennaLS
Loading...
Searching...
No Matches
viennals Namespace Reference

Classes

class  Advect
 This class is used to advance level sets over time. Level sets are passed to the constructor in an std::vector, with the last element being the level set to advect, or "top level set", while the others are then adjusted afterwards. In order to ensure that advection works correctly, the "top level set" has to include all lower level sets: LS_top = LS_top U LS_i for i = {0 ... n}, where n is the number of level sets. The velocities used to advect the level set are given in a concrete implementation of the lsVelocityField (check Advection examples for guidance) More...
 
class  BooleanOperation
 This class is used to perform boolean operations on two level sets and write the resulting level set into the first passed level set. When the boolean operation is set to CUSTOM, a comparator must be set using setBooleanOperationComparator. This comparator returns one value generated from the level set value supplied by each level set. E.g.: for a union, the comparator will always return the smaller of the two values. The function signature for the comparator is defined in the public ComparatorType. More...
 
class  Box
 Class describing a square box from one coordinate to another. More...
 
class  BoxDistribution
 Concrete implementation of GeometricAdvectDistribution for a rectangular box distribution. More...
 
class  CalculateCurvatures
 
class  CalculateNormalVectors
 This algorithm is used to compute the normal vectors for all points with level set values <= 0.5. The result is saved in the lsPointData of the lsDomain and can be retrieved with lsDomain.getPointData().getVectorData("Normals"). Since neighbors in each cartesian direction are necessary for the calculation, the level set width must be >=3. More...
 
class  Check
 This class is used to find errors in the underlying level set structure, like invalid neighbours of different signs. More...
 
class  ConvexHull
 This algorithm creates a convex hull mesh from a point cloud. This is done using the gift wrapping approach. The points in the point cloud MUST be unique, otherwise this will fail. More...
 
class  Cylinder
 Class describing a square box from one coordinate to another. More...
 
class  DetectFeatures
 This class detects features of the level set function. This class offers two methods to determine features of the surface: based on the mean curvature, and based on the angle between surface normals. The curvature-based algorithm is the default as it leads to more accurate results and should be preferred in general. More...
 
class  Domain
 Class containing all information about the level set, including the dimensions of the domain, boundary conditions and all data. More...
 
class  Expand
 Expands the leveleSet to the specified number of layers. The largest value in the levelset is thus width*0.5 Returns the number of added points. More...
 
class  Extrude
 Extrudes a 2D Level Set into a 3D domain. The axis in which should be extruded can be set and boundary conditions in the 3D domain must be specified. More...
 
class  FromMesh
 Import the regular grid, on which the level set values are defined, from an explicit Mesh<>. The Vertices must be defined, as well as a scalar data field "LSValues". If used for custom read-in, make sure all vertices are lexicographically sorted. More...
 
class  FromSurfaceMesh
 Construct a level set from an explicit mesh. More...
 
class  FromVolumeMesh
 This class creates a level set from a tetrahedral mesh. If the mesh contains a scalar data array called "Material", one level set for each material will be created and stored in the supplied std::vector<Domain<T,D>> object. More...
 
class  GeometricAdvect
 This class advects the level set according to a given distribution. This distribution is overlayed at every grid point of the old surface. All cells within this distribution are then filled, with cells at the edge marked with the correct level set values. Therefore, the surface can be shifted long distances in one step. This algorithm is therefore preferable to normal advection if there is growth/reduction by a purely geometric directional distribution. More...
 
class  GeometricAdvectDistribution
 Base class for distributions used by lsGeometricAdvect. All functions are pure virtual and must be implemented by any advection distribution. More...
 
class  MakeGeometry
 Create level sets describing basic geometric forms. More...
 
class  MarkVoidPoints
 This class is used to mark points of the level set which are enclosed in a void. More...
 
class  MaterialMap
 
class  Mesh
 This class holds an explicit mesh, which is always given in 3 dimensions. If it describes a 2D mesh, the third dimension is set to 0. Vertices, Lines, Triangles, Tetras & Hexas are supported as geometric elements. More...
 
class  Plane
 Class describing a plane via a point in it and the plane normal. More...
 
class  PointCloud
 Class describing a point cloud, which can be used to create geometries from its convex hull mesh. More...
 
class  PointData
 This class holds data associated with points in space. More...
 
class  Prune
 Removes all level set points, which do not have at least one oppositely signed neighbour (Meaning they do not lie directly at the interface). Afterwards the level set will occupy the least memory possible. More...
 
class  Reader
 
class  Reduce
 Reduce the level set size to the specified width. This means all level set points with value <= 0.5*width are removed, reducing the memory footprint of the lsDomain. More...
 
class  RemoveStrayPoints
 This algorithm can be used to remove all LS values which are not part of a so-called top surface. This surface is detected using the MarkVoidPoints algorithm, according to the method chosen by the user. This method is set using setVoidTopSurface, which is equivalent to the corresponding member function of lsMarkVoidPoints. More...
 
class  Sphere
 Class describing a sphere via origin and radius. More...
 
class  SphereDistribution
 Concrete implementation of GeometricAdvectDistribution for a spherical advection distribution. More...
 
class  ToDiskMesh
 This class creates a mesh from the level set with all grid points with a level set value <= 0.5. These grid points are shifted in space towards the direction of their normal vector by grid delta * LS value. Grid delta and the origin grid point are saved for each point. This allows for a simple setup of disks for ray tracing. More...
 
class  ToMesh
 Extract the regular grid, on which the level set values are defined, to an explicit Mesh<>. The Vertices will contain the level set value stored at its location. (This is very useful for debugging) More...
 
class  ToSurfaceMesh
 Extract an explicit Mesh<> instance from an lsDomain. The interface is then described by explciit surface elements: Lines in 2D, Triangles in 3D. More...
 
class  ToVoxelMesh
 Creates a mesh, which consists only of quads/hexas for completely filled grid cells in the level set. Interfaces will not be smooth but stepped. (This can be used to create meshes for finite difference algorithms) More...
 
class  TransformMesh
 
class  VelocityField
 Abstract class defining the interface for the velocity field used during advection using lsAdvect. More...
 
class  VTKReader
 Class handling the import of VTK file types. More...
 
class  VTKWriter
 Class handling the output of an Mesh<> to VTK file types. More...
 
class  Writer
 

Typedefs

template<int D>
using BoundaryConditionEnum = typename hrleGrid<D>::boundaryType
 

Enumerations

enum struct  IntegrationSchemeEnum : unsigned {
  ENGQUIST_OSHER_1ST_ORDER = 0 , ENGQUIST_OSHER_2ND_ORDER = 1 , LAX_FRIEDRICHS_1ST_ORDER = 2 , LAX_FRIEDRICHS_2ND_ORDER = 3 ,
  LOCAL_LAX_FRIEDRICHS_ANALYTICAL_1ST_ORDER = 4 , LOCAL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER = 5 , LOCAL_LOCAL_LAX_FRIEDRICHS_2ND_ORDER = 6 , LOCAL_LAX_FRIEDRICHS_1ST_ORDER = 7 ,
  LOCAL_LAX_FRIEDRICHS_2ND_ORDER = 8 , STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER = 9
}
 Enumeration for the different Integration schemes used by the advection kernel. More...
 
enum struct  BooleanOperationEnum : unsigned {
  INTERSECT = 0 , UNION = 1 , RELATIVE_COMPLEMENT = 2 , INVERT = 3 ,
  CUSTOM = 4
}
 Enumeration for the different types of boolean operations which are supported. When INVERT, only first level set is inverted. When CUSTOM, the user has to supply a valid function pointer of the form const T (*comp)(const T &, const T &). For CUSTOM only the first level set pointer is checked for validity. More...
 
enum struct  CurvatureEnum : unsigned { MEAN_CURVATURE = 0 , GAUSSIAN_CURVATURE = 1 , MEAN_AND_GAUSSIAN_CURVATURE = 2 }
 
enum struct  CheckStatusEnum : unsigned { SUCCESS = 0 , FAILED = 1 , UNCHECKED = 2 }
 
enum struct  FeatureDetectionEnum : unsigned { CURVATURE = 0 , NORMALS_ANGLE = 1 }
 
enum struct  FileFormatEnum : unsigned { VTK_LEGACY = 0 , VTP = 1 , VTU = 2 , VTK_AUTO = 3 }
 
enum struct  VoidTopSurfaceEnum : unsigned { LEX_LOWEST = 0 , LEX_HIGHEST = 1 , LARGEST = 2 , SMALLEST = 3 }
 Enumeration describing which connected component to use as top surface during void point detection. All others points will be set as void poitns. LEX_* means the top surface is chosen according to the lexicographic first or last LS point, while LARGEST means that the connected component containing the largest number of points will be chosen. More...
 
enum struct  TransformEnum : unsigned { TRANSLATION = 0 , ROTATION = 1 , SCALE = 2 }
 Enumeration for the different types of transformation operations. More...
 

Functions

 PRECOMPILE_PRECISION (Mesh)
 
 PRECOMPILE_PRECISION (PointData)
 
template<class T , int D>
void PrepareStencilLocalLaxFriedrichs (std::vector< SmartPointer< Domain< T, D > > > &levelSets, std::vector< bool > isDepo)
 This function creates the specialized layer wrapping which produces better results for the SSLF integration scheme. isDepo must contain whether the corresponding level sets are used for deposition or not. This function assumes that the layers where deposition is not possible represent only masking layers and are not wrapped around other depo layers. Hint: Sometimes it is useful to introduce a new mask layer combining all masking materials and remove it after advection instead of trying to deal with numerous separate masking layers.
 
template<class T , int D>
void FinalizeStencilLocalLaxFriedrichs (std::vector< SmartPointer< Domain< T, D > > > &levelSets)
 After advection using the SLLF layer wrapping approach is done, restore the original layer wrapping used everywhere else.
 

Typedef Documentation

◆ BoundaryConditionEnum

template<int D>
using viennals::BoundaryConditionEnum = typename hrleGrid<D>::boundaryType

Enumeration Type Documentation

◆ BooleanOperationEnum

enum struct viennals::BooleanOperationEnum : unsigned
strong

Enumeration for the different types of boolean operations which are supported. When INVERT, only first level set is inverted. When CUSTOM, the user has to supply a valid function pointer of the form const T (*comp)(const T &, const T &). For CUSTOM only the first level set pointer is checked for validity.

Enumerator
INTERSECT 
UNION 
RELATIVE_COMPLEMENT 
INVERT 
CUSTOM 

◆ CheckStatusEnum

enum struct viennals::CheckStatusEnum : unsigned
strong
Enumerator
SUCCESS 
FAILED 
UNCHECKED 

◆ CurvatureEnum

enum struct viennals::CurvatureEnum : unsigned
strong
Enumerator
MEAN_CURVATURE 
GAUSSIAN_CURVATURE 
MEAN_AND_GAUSSIAN_CURVATURE 

◆ FeatureDetectionEnum

enum struct viennals::FeatureDetectionEnum : unsigned
strong
Enumerator
CURVATURE 
NORMALS_ANGLE 

◆ FileFormatEnum

enum struct viennals::FileFormatEnum : unsigned
strong
Enumerator
VTK_LEGACY 
VTP 
VTU 
VTK_AUTO 

◆ IntegrationSchemeEnum

enum struct viennals::IntegrationSchemeEnum : unsigned
strong

Enumeration for the different Integration schemes used by the advection kernel.

Enumerator
ENGQUIST_OSHER_1ST_ORDER 
ENGQUIST_OSHER_2ND_ORDER 
LAX_FRIEDRICHS_1ST_ORDER 
LAX_FRIEDRICHS_2ND_ORDER 
LOCAL_LAX_FRIEDRICHS_ANALYTICAL_1ST_ORDER 
LOCAL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER 
LOCAL_LOCAL_LAX_FRIEDRICHS_2ND_ORDER 
LOCAL_LAX_FRIEDRICHS_1ST_ORDER 
LOCAL_LAX_FRIEDRICHS_2ND_ORDER 
STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER 

◆ TransformEnum

enum struct viennals::TransformEnum : unsigned
strong

Enumeration for the different types of transformation operations.

Enumerator
TRANSLATION 
ROTATION 
SCALE 

◆ VoidTopSurfaceEnum

enum struct viennals::VoidTopSurfaceEnum : unsigned
strong

Enumeration describing which connected component to use as top surface during void point detection. All others points will be set as void poitns. LEX_* means the top surface is chosen according to the lexicographic first or last LS point, while LARGEST means that the connected component containing the largest number of points will be chosen.

Enumerator
LEX_LOWEST 
LEX_HIGHEST 
LARGEST 
SMALLEST 

Function Documentation

◆ FinalizeStencilLocalLaxFriedrichs()

template<class T , int D>
void viennals::FinalizeStencilLocalLaxFriedrichs ( std::vector< SmartPointer< Domain< T, D > > > & levelSets)

After advection using the SLLF layer wrapping approach is done, restore the original layer wrapping used everywhere else.

◆ PRECOMPILE_PRECISION() [1/2]

viennals::PRECOMPILE_PRECISION ( Mesh )

◆ PRECOMPILE_PRECISION() [2/2]

viennals::PRECOMPILE_PRECISION ( PointData )

◆ PrepareStencilLocalLaxFriedrichs()

template<class T , int D>
void viennals::PrepareStencilLocalLaxFriedrichs ( std::vector< SmartPointer< Domain< T, D > > > & levelSets,
std::vector< bool > isDepo )

This function creates the specialized layer wrapping which produces better results for the SSLF integration scheme. isDepo must contain whether the corresponding level sets are used for deposition or not. This function assumes that the layers where deposition is not possible represent only masking layers and are not wrapped around other depo layers. Hint: Sometimes it is useful to introduce a new mask layer combining all masking materials and remove it after advection instead of trying to deal with numerous separate masking layers.