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

Base class for all adaptations. The base class defines essential global parameters. It is also used for single-resolution method. In the constructor parameter, system_refinement_ratio defines the relation between present resolution to the system reference resolution. The derived classes are defined for more complex adaptations. More...

#include <adaptation.h>

Inherited by SPH::ParticleWithLocalRefinement.

Public Member Functions

 SPHAdaptation (SPHBody *sph_body, Real h_spacing_ratio=1.3, Real system_refinement_ratio=1.0)
 
int LocalRefinementLevel ()
 
Real ReferenceSpacing ()
 
Real ReferenceSmoothingLength ()
 
KernelgetKernel ()
 
void resetAdaptationRatios (Real h_spacing_ratio, Real new_system_refinement_ratio=1.0)
 
template<class KernelType , typename... ConstructorArgs>
void resetKernel (ConstructorArgs &&...args)
 
Real MinimumSpacing ()
 
Real computeReferenceNumberDensity (Vec2d zero, Real h_ratio)
 
Real computeReferenceNumberDensity (Vec3d zero, Real h_ratio)
 
Real ReferenceNumberDensity ()
 
virtual Real SmoothingLengthRatio (size_t particle_index_i)
 
virtual UniquePtr< BaseCellLinkedListcreateCellLinkedList (const BoundingBox &domain_bounds, RealBody &real_body)
 
virtual UniquePtr< BaseLevelSetcreateLevelSet (Shape &shape, Real refinement_ratio)
 

Protected Member Functions

Real RefinedSpacing (Real coarse_particle_spacing, int refinement_level)
 

Protected Attributes

Real h_spacing_ratio_
 
Real system_refinement_ratio_
 
int local_refinement_level_
 
Real spacing_ref_
 
Real h_ref_
 
UniquePtr< Kernelkernel_ptr_
 
Real spacing_min_
 
Real h_ratio_max_
 
Real number_density_min_
 
Real number_density_max_
 

Detailed Description

Base class for all adaptations. The base class defines essential global parameters. It is also used for single-resolution method. In the constructor parameter, system_refinement_ratio defines the relation between present resolution to the system reference resolution. The derived classes are defined for more complex adaptations.

Member Data Documentation

◆ h_ratio_max_

Real SPH::SPHAdaptation::h_ratio_max_
protected

the ratio between the reference smoothing length to the minimum smoothing length

◆ h_ref_

Real SPH::SPHAdaptation::h_ref_
protected

reference smoothing length

◆ h_spacing_ratio_

Real SPH::SPHAdaptation::h_spacing_ratio_
protected

ratio of reference kernel smoothing length to particle spacing

◆ kernel_ptr_

UniquePtr<Kernel> SPH::SPHAdaptation::kernel_ptr_
protected

unique pointer of kernel function owned this class

◆ local_refinement_level_

int SPH::SPHAdaptation::local_refinement_level_
protected

refinement level respect to reference particle spacing

◆ spacing_min_

Real SPH::SPHAdaptation::spacing_min_
protected

minimum particle spacing determined by local refinement level

◆ spacing_ref_

Real SPH::SPHAdaptation::spacing_ref_
protected

reference particle spacing used to determine local particle spacing

◆ system_refinement_ratio_

Real SPH::SPHAdaptation::system_refinement_ratio_
protected

ratio of system resolution to body resolution, set to 1.0 by default


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