PeriDyno 1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
NormalForce.h
Go to the documentation of this file.
1
16
17
18
19
20#pragma once
22#include "Topology/TriangleSet.h"
23
24namespace dyno {
25
26 /*
27 * \brief Particle volume force along normal direction of neighbor mesh.
28 */
29
30 template<typename TDataType>
32 {
33
34 DECLARE_TCLASS(NormalForce, TDataType)
35
36 public:
37 typedef typename TDataType::Real Real;
38 typedef typename TDataType::Coord Coord;
39
41 ~NormalForce() override ;
42
43 DEF_ARRAY_OUT(Coord, NormalForce, DeviceType::GPU, "");
44
45 DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "");
46
47 DEF_ARRAY_IN(Coord, ParticleNormal, DeviceType::GPU, "");
48
49 DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "");
50
52
53 DEF_VAR(Real, Strength, 10.0f, "");
54
55 DEF_VAR_IN(Real, TimeStep, "Time step size");
56
57 DEF_ARRAYLIST_IN(int, TriangleNeighborIds, DeviceType::GPU, "triangle neighbors");
58
59 DEF_ARRAY_IN(int, ParticleMeshID, DeviceType::GPU, "triangle neighbors");
60
61
62 void constrain() override;
63
64 private:
66
67 };
68
70}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
DArray< bool > mNormalForceFlag
Definition NormalForce.h:65
DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "")
TDataType::Coord Coord
Definition NormalForce.h:38
TDataType::Real Real
Definition NormalForce.h:37
DEF_INSTANCE_IN(TriangleSet< TDataType >, TriangleSet, "")
~NormalForce() override
void constrain() override
DEF_VAR(Real, Strength, 10.0f, "")
DEF_ARRAY_IN(int, ParticleMeshID, DeviceType::GPU, "triangle neighbors")
DEF_ARRAYLIST_IN(int, TriangleNeighborIds, DeviceType::GPU, "triangle neighbors")
DEF_ARRAY_OUT(Coord, NormalForce, DeviceType::GPU, "")
DEF_ARRAY_IN(Coord, ParticleNormal, DeviceType::GPU, "")
DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "")
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