PeriDyno 1.0.0
Loading...
Searching...
No Matches
VariationalApproximateProjection.h
Go to the documentation of this file.
1
16#pragma once
17
18#include "Collision/Attribute.h"
19
20//ParticleSystem
22
23namespace dyno
24{
25 template<typename TDataType> class SummationDensity;
26 template<typename TDataType> class Reduction;
27 template<typename TDataType> class Arithmetic;
28
36 template<typename TDataType>
38 {
40 public:
41 typedef typename TDataType::Real Real;
42 typedef typename TDataType::Coord Coord;
43
46
47 public:
48 DEF_VAR(Real, RestDensity, Real(1000), "");
49
50 DEF_VAR_IN(Real, TimeStep, "Time step size");
51
52 DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "");
53
54 DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "");
55
56 DEF_ARRAY_IN(Coord, Normal, DeviceType::GPU, "");
57
58 DEF_ARRAY_IN(Attribute, Attribute, DeviceType::GPU, "");
59
60 DEF_ARRAYLIST_IN(int, NeighborIds, DeviceType::GPU, "");
61
62
63 protected:
64 void compute() override;
65
66 private:
70
73 //Real mRestDensity = 1000.0f;
74
75 //Refer to "A Nonlocal Variational Particle Framework for Incompressible Free Surface Flows" for their exact meanings
80
83
84 //Indicate whether a particle is near the free surface boundary.
86
87 //Internal variables used to solve the linear system of equations with a conjugate gradient method.
91
94
95 std::shared_ptr<SummationDensity<TDataType>> mDensityCalculator;
96 };
97
99}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
particle attribute 0x00000000: [31-30]material; [29]motion; [28]Dynamic; [27-8]undefined yet,...
Definition Attribute.h:26
The standard summation density.
DEF_ARRAY_IN(Attribute, Attribute, DeviceType::GPU, "")
DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "")
DEF_ARRAYLIST_IN(int, NeighborIds, DeviceType::GPU, "")
std::shared_ptr< SummationDensity< TDataType > > mDensityCalculator
DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "")
DEF_ARRAY_IN(Coord, Normal, DeviceType::GPU, "")
DEF_VAR(Real, RestDensity, Real(1000), "")
DEF_VAR_IN(Real, TimeStep, "Time step size")
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Array< T, DeviceType::GPU > DArray
Definition Array.inl:89