Go to the documentation of this file.
7 #ifndef INCLUDE_JET_SPH_SYSTEM_DATA3_H_
8 #define INCLUDE_JET_SPH_SYSTEM_DATA3_H_
161 void serialize(std::vector<uint8_t>* buffer)
const override;
177 double _targetSpacing = 0.1;
181 double _kernelRadiusOverTargetSpacing = 1.8;
184 double _kernelRadius;
199 #endif // INCLUDE_JET_SPH_SYSTEM_DATA3_H_
SphSystemData3()
Constructs empty SPH system.
3-D particle system data.
Definition: particle_system_data3.h:45
std::shared_ptr< SphSystemData3 > SphSystemData3Ptr
Shared pointer for the SphSystemData3 type.
Definition: sph_system_data3.h:195
void setRelativeKernelRadius(double relativeRadius)
Sets the relative kernel radius.
void setKernelRadius(double kernelRadius)
Sets the absolute kernel radius.
1-D read-only array accessor class.
Definition: array_accessor1.h:184
void setTargetSpacing(double spacing)
Sets the target particle spacing in meters.
3-D SPH particle system data.
Definition: sph_system_data3.h:23
size_t numberOfParticles() const
Returns the number of particles.
double relativeKernelRadius() const
Returns the relative kernel radius.
void setRadius(double newRadius) override
Sets the radius.
ConstArrayAccessor1< double > pressures() const
Returns the pressure array accessor (immutable).
void buildNeighborLists()
Builds neighbor lists with kernel radius.
double kernelRadius() const
Returns the kernel radius in meters unit.
void updateDensities()
Updates the density array with the latest particle positions.
SphSystemData3(size_t numberOfParticles)
Constructs SPH system data with given number of particles.
void serialize(std::vector< uint8_t > *buffer) const override
Serializes this SPH system data to the buffer.
Definition: advection_solver2.h:18
ArrayAccessor1< double > densities()
Returns the density array accessor (mutable).
Vector3D interpolate(const Vector3D &origin, const ConstArrayAccessor1< Vector3D > &values) const
Returns interpolated vector value at given origin point.
Vector3D laplacianAt(size_t i, const ConstArrayAccessor1< Vector3D > &values) const
Returns the laplacian of the given values at i-th particle.
void deserialize(const std::vector< uint8_t > &buffer) override
Deserializes this SPH system data from the buffer.
ConstArrayAccessor1< double > densities() const
Returns the density array accessor (immutable).
virtual ~SphSystemData3()
Destructor.
double interpolate(const Vector3D &origin, const ConstArrayAccessor1< double > &values) const
Returns interpolated value at given origin point.
void buildNeighborSearcher()
Builds neighbor searcher with kernel radius.
void setMass(double newMass) override
Sets the mass of a particle.
3-D vector class.
Definition: vector3.h:25
void set(const SphSystemData3 &other)
Copies from other SPH system data.
ArrayAccessor1< double > pressures()
Returns the pressure array accessor (mutable).
void setTargetDensity(double targetDensity)
Sets the target density of this particle system.
SphSystemData3(const SphSystemData3 &other)
Copy constructor.
Vector3D gradientAt(size_t i, const ConstArrayAccessor1< double > &values) const
Returns the gradient of the given values at i-th particle.
double targetDensity() const
Returns the target density of this particle system.
double sumOfKernelNearby(const Vector3D &position) const
Returns sum of kernel function evaluation for each nearby particle.
constexpr double kWaterDensity
Water density.
Definition: constants.h:304
double laplacianAt(size_t i, const ConstArrayAccessor1< double > &values) const
Returns the laplacian of the given values at i-th particle.
double targetSpacing() const
Returns the target particle spacing in meters.
1-D array accessor class.
Definition: array_accessor1.h:27
SphSystemData3 & operator=(const SphSystemData3 &other)
Copies from other SPH system data.