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

Mesh with level set data as packages. Note that the mesh containing the data packages are cell-based but within the data package, the data is grid-based. Note that the level set data is initialized after the constructor. More...

#include <level_set.h>

Inherits SPH::MeshWithGridDataPackages< BaseLevelSet, LevelSetDataPackage >.

Inherited by SPH::RefinedMesh< LevelSet >.

Public Member Functions

 LevelSet (BoundingBox tentative_bounds, Real data_spacing, size_t buffer_size, Shape &shape, SPHAdaptation &sph_adaptation)
 
 LevelSet (BoundingBox tentative_bounds, Real data_spacing, Shape &shape, SPHAdaptation &sph_adaptation)
 
virtual void cleanInterface (Real small_shift_factor) override
 
virtual bool probeIsWithinMeshBound (const Vecd &position) override
 
virtual Real probeSignedDistance (const Vecd &position) override
 
virtual Vecd probeNormalDirection (const Vecd &position) override
 
virtual Vecd probeLevelSetGradient (const Vecd &position) override
 
virtual Real probeKernelIntegral (const Vecd &position, Real h_ratio=1.0) override
 
virtual Vecd probeKernelGradientIntegral (const Vecd &position, Real h_ratio=1.0) override
 
virtual void writeMeshFieldToPlt (std::ofstream &output_file) override
 
bool isWithinCorePackage (Vecd position)
 
Real computeKernelIntegral (const Vecd &position)
 
Vecd computeKernelGradientIntegral (const Vecd &position)
 
- Public Member Functions inherited from SPH::MeshWithGridDataPackages< BaseLevelSet, LevelSetDataPackage >
 MeshWithGridDataPackages (BoundingBox tentative_bounds, Real data_spacing, size_t buffer_size, Args &&...args)
 
void allocateMeshDataMatrix ()
 
void deleteMeshDataMatrix ()
 
DataType probeMesh (const Vecd &position)
 
virtual Real DataSpacing () override
 
- Public Member Functions inherited from SPH::BaseLevelSet
 BaseLevelSet (Shape &shape, SPHAdaptation &sph_adaptation)
 
- Public Member Functions inherited from SPH::BaseMeshField
 BaseMeshField (const std::string &name)
 
std::string Name ()
 
- Public Member Functions inherited from SPH::Mesh
 Mesh (BoundingBox tentative_bounds, Real grid_spacing, size_t buffer_width)
 
 Mesh (Vecd mesh_lower_bound, Vecu number_of_cells, Real grid_spacing)
 
Vecu NumberOfCells ()
 
size_t MeshBufferSize ()
 
- Public Member Functions inherited from SPH::BaseMesh
 BaseMesh (Vecu number_of_grid_points)
 
 BaseMesh (Vecd mesh_lower_bound, Real grid_spacing, Vecu number_of_grid_points)
 
 BaseMesh (BoundingBox tentative_bounds, Real grid_spacing, size_t buffer_width)
 
Vecd MeshLowerBound ()
 
Real GridSpacing ()
 
Vecu NumberOfGridPoints ()
 
Vecu NumberOfGridPointsFromNumberOfCells (const Vecu &number_of_cells)
 
Vecu NumberOfCellsFromNumberOfGridPoints (const Vecu &number_of_grid_points)
 
Vecd GridPositionFromCellPosition (const Vecd &cell_position)
 
Vecu CellIndexFromPosition (const Vecd &position)
 
Vecd CellPositionFromIndex (const Vecu &cell_index)
 
Vecd GridPositionFromIndex (const Vecu &grid_index)
 
Vecu transfer1DtoMeshIndex (const Vecu &number_of_mesh_indexes, size_t i)
 
size_t transferMeshIndexTo1D (const Vecu &number_of_mesh_indexes, const Vecu &mesh_index)
 
size_t MortonCode (const size_t &i)
 
size_t transferMeshIndexToMortonOrder (const Vecu &mesh_index)
 

Public Attributes

ConcurrentVector< LevelSetDataPackage * > core_data_pkgs_
 
Real global_h_ratio_
 
- Public Attributes inherited from SPH::MeshWithGridDataPackages< BaseLevelSet, LevelSetDataPackage >
MyMemoryPool< LevelSetDataPackagedata_pkg_pool_
 
MeshDataMatrix< LevelSetDataPackage *> data_pkg_addrs_
 
ConcurrentVector< LevelSetDataPackage *> inner_data_pkgs_
 

Protected Member Functions

void finishDataPackages ()
 
void reinitializeLevelSet ()
 
void markNearInterface (Real small_shift_factor)
 
void redistanceInterface ()
 
void updateLevelSetGradient ()
 
void updateLevelSetGradientForAPackage (LevelSetDataPackage *inner_data_pkg, Real dt=0.0)
 
void updateKernelIntegrals ()
 
void updateKernelIntegralsForAPackage (LevelSetDataPackage *inner_data_pkg, Real dt=0.0)
 
void stepReinitializationForAPackage (LevelSetDataPackage *inner_data_pkg, Real dt=0.0)
 
void markNearInterfaceForAPackage (LevelSetDataPackage *core_data_pkg, Real dt=0.0)
 
void redistanceInterfaceForAPackage (LevelSetDataPackage *core_data_pkg, Real dt=0.0)
 
bool isInnerPackage (const Vecu &cell_index)
 
LevelSetDataPackagecreateDataPackage (const Vecu &cell_index, const Vecd &cell_position)
 
void initializeDataInACell (const Vecu &cell_index, Real dt)
 
void initializeAddressesInACell (const Vecu &cell_index, Real dt)
 
void tagACellIsInnerPackage (const Vecu &cell_index, Real dt)
 
- Protected Member Functions inherited from SPH::MeshWithGridDataPackages< BaseLevelSet, LevelSetDataPackage >
void initializeASingularDataPackage (ConstructorArgs &&...args)
 
void assignDataPackageAddress (const Vecu &cell_index, LevelSetDataPackage *data_pkg)
 
LevelSetDataPackageDataPackageFromCellIndex (const Vecu &cell_index)
 
DataType DataValueFromGlobalIndex (const Vecu &global_grid_index)
 
void initializePackageAddressesInACell (const Vecu &cell_index)
 
std::pair< int, int > CellShiftAndDataIndex (int data_addrs_index_component)
 
- Protected Member Functions inherited from SPH::BaseLevelSet
Real computeHeaviside (Real phi, Real half_width)
 
- Protected Member Functions inherited from SPH::Mesh
void copyMeshProperties (Mesh *another_mesh)
 

Protected Attributes

Kernelkernel_
 
- Protected Attributes inherited from SPH::MeshWithGridDataPackages< BaseLevelSet, LevelSetDataPackage >
Real data_spacing_
 
const int pkg_size_
 
const int pkg_addrs_buffer_
 
const int pkg_operations_
 
const int pkg_addrs_size_
 
std::mutex mutex_my_pool
 
BaseMesh global_mesh_
 
StdVec< LevelSetDataPackage *> singular_data_pkgs_addrs_
 
- Protected Attributes inherited from SPH::BaseLevelSet
Shapeshape_
 
SPHAdaptationsph_adaptation_
 
- Protected Attributes inherited from SPH::BaseMeshField
std::string name_
 
- Protected Attributes inherited from SPH::Mesh
size_t buffer_width_
 
Vecu number_of_cells_
 
- Protected Attributes inherited from SPH::BaseMesh
Vecd mesh_lower_bound_
 
Real grid_spacing_
 
Vecu number_of_grid_points_
 

Detailed Description

Mesh with level set data as packages. Note that the mesh containing the data packages are cell-based but within the data package, the data is grid-based. Note that the level set data is initialized after the constructor.

Member Function Documentation

◆ writeMeshFieldToPlt()

void SPH::LevelSet::writeMeshFieldToPlt ( std::ofstream &  output_file)
overridevirtual

output mesh data for Tecplot visualization

Implements SPH::BaseMeshField.

Member Data Documentation

◆ core_data_pkgs_

ConcurrentVector<LevelSetDataPackage *> SPH::LevelSet::core_data_pkgs_

packages near to zero level set.


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