11 #ifndef CUBBYFLOW_CUDA_SPH_SYSTEM_DATA2_HPP 12 #define CUBBYFLOW_CUDA_SPH_SYSTEM_DATA2_HPP 14 #ifdef CUBBYFLOW_USE_CUDA 21 class CUDASPHSystemData2 :
public CUDAParticleSystemData2
28 explicit CUDASPHSystemData2(
size_t numberOfParticles);
31 ~CUDASPHSystemData2()
override =
default;
34 CUDASPHSystemData2(
const CUDASPHSystemData2& other);
37 CUDASPHSystemData2(CUDASPHSystemData2&& other) noexcept;
40 CUDASPHSystemData2& operator=(
const CUDASPHSystemData2& other);
43 CUDASPHSystemData2& operator=(CUDASPHSystemData2&& 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 CUDASPHSystemData2& 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 CUDASPHSystemData2Ptr = std::shared_ptr<CUDASPHSystemData2>;
constexpr float WATER_DENSITY_FLOAT
Water density.
Definition: Constants.hpp:302
Definition: pybind11Utils.hpp:20