11 #ifndef CUBBYFLOW_CUDA_SPH_SYSTEM_DATA3_HPP 12 #define CUBBYFLOW_CUDA_SPH_SYSTEM_DATA3_HPP 14 #ifdef CUBBYFLOW_USE_CUDA 21 class CUDASPHSystemData3 :
public CUDAParticleSystemData3
28 explicit CUDASPHSystemData3(
size_t numberOfParticles);
31 ~CUDASPHSystemData3()
override =
default;
34 CUDASPHSystemData3(
const CUDASPHSystemData3& other);
37 CUDASPHSystemData3(CUDASPHSystemData3&& other) noexcept;
40 CUDASPHSystemData3& operator=(
const CUDASPHSystemData3& other);
43 CUDASPHSystemData3& operator=(CUDASPHSystemData3&& other) noexcept;
46 ConstCUDAArrayView1<float> Densities()
const;
49 CUDAArrayView1<float> Densities();
52 ConstCUDAArrayView1<float> Pressures()
const;
55 CUDAArrayView1<float> Pressures();
66 void UpdateDensities();
69 float TargetDensity()
const;
72 void SetTargetDensity(
float targetDensity);
75 float TargetSpacing()
const;
83 void SetTargetSpacing(
float spacing);
91 float RelativeKernelRadius()
const;
101 void SetRelativeKernelRadius(
float relativeRadius);
104 float KernelRadius()
const;
114 void SetKernelRadius(
float kernelRadius);
120 void BuildNeighborSearcher();
123 void BuildNeighborListsAndUpdateDensities();
126 void Set(
const CUDASPHSystemData3& other);
133 float m_targetSpacing = 0.1f;
137 float m_kernelRadiusOverTargetSpacing = 1.8f;
140 float m_kernelRadius = 0.1f;
142 float m_mass = 1e-3f;
144 size_t m_pressureIdx = 0;
146 size_t m_densityIdx = 0;
153 using CUDASPHSystemData3Ptr = std::shared_ptr<CUDASPHSystemData3>;
constexpr float WATER_DENSITY_FLOAT
Water density.
Definition: Constants.hpp:302
Definition: pybind11Utils.hpp:20