SPHinXsys  alpha version
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SPH::LevelSetShape Class Reference

A shape using level set to define geometry. More...

#include <level_set_shape.h>

Inherits SPH::Shape.

Public Member Functions

 LevelSetShape (SPHBody *sph_body, Shape &shape, Real refinement_ratio=1.0)
 
virtual bool checkContain (const Vecd &input_pnt, bool BOUNDARY_INCLUDED=true) override
 
virtual Vecd findClosestPoint (const Vecd &input_pnt) override
 
Vecd findLevelSetGradient (const Vecd &input_pnt)
 
Real computeKernelIntegral (const Vecd &input_pnt, Real h_ratio=1.0)
 
Vecd computeKernelGradientIntegral (const Vecd &input_pnt, Real h_ratio=1.0)
 
LevelSetShapecleanLevelSet (Real small_shift_factor=1.0)
 
void writeLevelSet (SPHBody &sph_body)
 
- Public Member Functions inherited from SPH::Shape
 Shape (const std::string &shape_name)
 
std::string getName ()
 
void setName (const std::string &name)
 
BoundingBox getBounds ()
 
virtual bool isValid ()
 
bool checkNotFar (const Vecd &input_pnt, Real threshold)
 
bool checkNearSurface (const Vecd &input_pnt, Real threshold)
 
Real findSignedDistance (const Vecd &input_pnt)
 
Vecd findNormalDirection (const Vecd &input_pnt)
 

Protected Member Functions

virtual BoundingBox findBounds () override
 

Protected Attributes

BaseLevelSetlevel_set_
 
- Protected Attributes inherited from SPH::Shape
std::string name_
 
BoundingBox bounding_box_
 
bool is_bounds_found_
 

Detailed Description

A shape using level set to define geometry.

Constructor & Destructor Documentation

◆ LevelSetShape()

SPH::LevelSetShape::LevelSetShape ( SPHBody sph_body,
Shape shape,
Real  refinement_ratio = 1.0 
)

refinement_ratio is between body reference resolution and level set resolution

Member Function Documentation

◆ cleanLevelSet()

LevelSetShape * SPH::LevelSetShape::cleanLevelSet ( Real  small_shift_factor = 1.0)

small_shift_factor = 1.0 by default, can be increased for difficult geometries for smoothing

Member Data Documentation

◆ level_set_

BaseLevelSet* SPH::LevelSetShape::level_set_
protected

narrow bounded level set mesh.


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