PeriDyno 1.0.0
Loading...
Searching...
No Matches
SurfaceEnergyForce.h
Go to the documentation of this file.
1
16#pragma once
18
19namespace dyno {
20
25 template<typename TDataType>
26 class SurfaceEnergyForce : public ParticleApproximation<TDataType>
27 {
29 public:
30 typedef typename TDataType::Real Real;
31 typedef typename TDataType::Coord Coord;
32
35
36 DEF_VAR(Real, Kappa, Real(1), "Surface tension coefficient");
37
38 DEF_VAR(Real, RestDensity, Real(1000), "Rest density");
39
40 public:
41 DEF_VAR_IN(Real, TimeStep, "Time step size!");
42
43 DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "");
44
45 DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "");
46
51 DEF_ARRAYLIST_IN(int, NeighborIds, DeviceType::GPU, "Neighboring particles' ids");
52
53 public:
54 void compute() override;
55
56 private:
58 };
59
61}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
An implementation of the energy-based surface model proposed by He et al.[2024]. Refer to "Robust Sim...
DEF_VAR_IN(Real, TimeStep, "Time step size!")
DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "")
DEF_VAR(Real, RestDensity, Real(1000), "Rest density")
DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "")
DEF_ARRAYLIST_IN(int, NeighborIds, DeviceType::GPU, "Neighboring particles' ids")
Neighboring particles.
void compute() override
DEF_VAR(Real, Kappa, Real(1), "Surface tension coefficient")
~SurfaceEnergyForce() override
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Array< T, DeviceType::GPU > DArray
Definition Array.inl:89