PeriDyno 1.2.1
Loading...
Searching...
No Matches
ParticleFluid.h
Go to the documentation of this file.
1
16#pragma once
17#include "ParticleSystem.h"
18
20
21#include "Topology/PointSet.h"
22
23namespace dyno
24{
25 template<typename TDataType>
26 class ParticleFluid : public ParticleSystem<TDataType>
27 {
29 public:
30 typedef typename TDataType::Real Real;
31 typedef typename TDataType::Coord Coord;
32
34 ~ParticleFluid() override;
35
36 DEF_VAR(Real, SamplingDistance, 0.005, "Sampling distance");
37
38 DEF_VAR(Real, SmoothingLength, 1.5, "The smoothing length is preferably set to a value between 1.5 and 2.5");
39
40 DEF_VAR(bool, ReshuffleParticles, false, "");
41
42 public:
44
45 DEF_NODE_PORTS(ParticleSystem<TDataType>, InitialState, "Initial Fluid Particles");
46
47 DEF_VAR_STATE(Real, SamplingDistance, 0.005, "The state of sampling distance");
48
49 DEF_VAR_STATE(Real, SmoothingLength, 0.01, "The state of smoothing length");
50
51 protected:
52 void resetStates() override;
53
54 void preUpdateStates() override;
55
56 private:
57 void loadInitialStates();
58
59 void reshuffleParticles();
60 };
61}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
DEF_VAR(bool, ReshuffleParticles, false, "")
TDataType::Coord Coord
DEF_VAR_STATE(Real, SamplingDistance, 0.005, "The state of sampling distance")
void preUpdateStates() override
DEF_VAR(Real, SmoothingLength, 1.5, "The smoothing length is preferably set to a value between 1.5 and 2.5")
DEF_VAR_STATE(Real, SmoothingLength, 0.01, "The state of smoothing length")
void resetStates() override
DEF_NODE_PORTS(ParticleSystem< TDataType >, InitialState, "Initial Fluid Particles")
DEF_VAR(Real, SamplingDistance, 0.005, "Sampling distance")
DEF_NODE_PORTS(ParticleEmitter< TDataType >, ParticleEmitter, "Particle Emitters")
TDataType::Real Real
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25