33 #include "base_data_package.h" 66 Real number_density_min_;
67 Real number_density_max_;
70 explicit SPHAdaptation(
SPHBody *sph_body, Real h_spacing_ratio = 1.3, Real system_refinement_ratio = 1.0);
75 Real ReferenceSmoothingLength() {
return h_ref_; };
77 void resetAdaptationRatios(Real h_spacing_ratio, Real new_system_refinement_ratio = 1.0);
78 template <
class KernelType,
typename... ConstructorArgs>
79 void resetKernel(ConstructorArgs &&...args)
81 kernel_ptr_.reset(
new KernelType(
h_ref_, std::forward<ConstructorArgs>(args)...));
84 Real computeReferenceNumberDensity(Vec2d zero, Real h_ratio);
85 Real computeReferenceNumberDensity(Vec3d zero, Real h_ratio);
86 Real ReferenceNumberDensity();
87 virtual Real SmoothingLengthRatio(
size_t particle_index_i) {
return 1.0; };
89 virtual UniquePtr<BaseCellLinkedList> createCellLinkedList(
const BoundingBox &domain_bounds, RealBody &real_body);
90 virtual UniquePtr<BaseLevelSet> createLevelSet(Shape &shape, Real refinement_ratio);
93 Real RefinedSpacing(Real coarse_particle_spacing,
int refinement_level);
108 Real system_refinement_ratio,
109 int local_refinement_level);
112 size_t getCellLinkedListTotalLevel();
113 size_t getLevelSetTotalLevel();
114 virtual Real SmoothingLengthRatio(
size_t particle_index_i)
override 120 virtual UniquePtr<BaseCellLinkedList> createCellLinkedList(
const BoundingBox &domain_bounds, RealBody &real_body)
override;
121 virtual UniquePtr<BaseLevelSet> createLevelSet(Shape &shape, Real refinement_ratio)
override;
132 Real system_refinement_ratio,
133 int local_refinement_level);
136 Real getLocalSpacing(
Shape &shape,
const Vecd &position);
139 #endif // ADAPTATION_H 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.
Definition: adaptation.h:55
Real spacing_min_
Definition: adaptation.h:64
Real h_ratio_max_
Definition: adaptation.h:65
Base class for all volumetric geometries Note that checkContain and findClosest point are basic funct...
Definition: base_geometry.h:64
Here gives the classes for managing cell linked lists. This is the basic class for building the parti...
Base class for particle with local refinement.
Definition: adaptation.h:102
Real system_refinement_ratio_
Definition: adaptation.h:59
int local_refinement_level_
Definition: adaptation.h:60
Adaptive resolutions within a SPH body according to the distance to the body surface.
Definition: adaptation.h:128
Real h_ref_
Definition: adaptation.h:62
Set up of basic data structure.
StdLargeVec< Real > h_ratio_
Definition: adaptation.h:105
SPHBody is a base body with basic data and functions. Its derived class can be a real fluid body...
Definition: base_body.h:61
Level set is a function which is defined as signed distance to a surface or interface.
Real spacing_ref_
Definition: adaptation.h:61
Definition: solid_body_supplementary.cpp:9
Real h_spacing_ratio_
Definition: adaptation.h:58
UniquePtr< Kernel > kernel_ptr_
Definition: adaptation.h:63