PeriDyno 1.0.0
Loading...
Searching...
No Matches
ParticleRelaxtionOnMesh.h
Go to the documentation of this file.
1
16
17
18#pragma once
19
20#include "Topology/PointSet.h"
21#include "ParticleSystem/ParticleSystem.h"
25#include "./ParticleSystem/Module/ParticleIntegrator.h"
29#include "Collision/NeighborPointQuery.h"
30#include "Topology/TriangleSet.h"
31
33
34namespace dyno
35{
36
37 /*
38 * @brief£ºGenerate points benhind triangle meshes,
39 * @biref: and slightly shift the particles benhind triangle meshes to obtain more regular distribution.
40 *
41 */
42
43
44 template<typename TDataType>
45 class ParticleRelaxtionOnMesh : public PointsBehindMesh<TDataType>
46 {
48
49 public:
50 typedef typename TDataType::Real Real;
51 typedef typename TDataType::Coord Coord;
52
54
56
57 DEF_VAR(int, IterationNumber, 30, "");
58
59 DEF_VAR(Real, NormalForceStrength, 0.05, "");
60
61 DEF_VAR(Real, MeshCollisionThickness, 0.003, "");
62
63 DEF_VAR(Real, PointNeighborLength, 0.006, "");
64
65 DEF_VAR(Real, MeshNeighborLength, 0.012, "");
66
67 DEF_VAR(Real, ViscosityStrength, 50.0f, "");
68
69 DEF_VAR_STATE(Real, Delta, 0.03, "");
70
71 DEF_VAR(int, DensityIteration, 5, "");
72
73 protected:
74
75 void resetStates() override;
76
78
80
82 private:
83
85
86 DEF_ARRAY_STATE(Coord, Velocity, DeviceType::GPU, "Particle velocity");
87
88 DEF_ARRAY_STATE(Coord, Force, DeviceType::GPU, "Force on each particle");
89
90
91 std::shared_ptr<NeighborPointQuery<TDataType>> ptr_nbrQuery;
92 std::shared_ptr<IterativeDensitySolver<TDataType>> ptr_density;
93 std::shared_ptr<ImplicitViscosity<TDataType>> ptr_viscosity;
94 std::shared_ptr<NeighborTriangleQuery<TDataType>> ptr_nbrQueryTri;
95 std::shared_ptr<TriangularMeshConstraint<TDataType>> ptr_meshCollision;
96 std::shared_ptr<NormalForce<TDataType>> ptr_normalForce;
97
98 };
99
100
101}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
DEF_VAR(Real, PointNeighborLength, 0.006, "")
DEF_VAR(Real, ViscosityStrength, 50.0f, "")
DEF_ARRAY_STATE(Coord, Force, DeviceType::GPU, "Force on each particle")
DEF_VAR(Real, MeshNeighborLength, 0.012, "")
std::shared_ptr< ImplicitViscosity< TDataType > > ptr_viscosity
std::shared_ptr< NormalForce< TDataType > > ptr_normalForce
DEF_VAR(int, IterationNumber, 30, "")
std::shared_ptr< IterativeDensitySolver< TDataType > > ptr_density
DEF_VAR(int, DensityIteration, 5, "")
std::shared_ptr< NeighborPointQuery< TDataType > > ptr_nbrQuery
DEF_ARRAY_STATE(Coord, Velocity, DeviceType::GPU, "Particle velocity")
DEF_VAR(Real, NormalForceStrength, 0.05, "")
std::shared_ptr< TriangularMeshConstraint< TDataType > > ptr_meshCollision
DEF_VAR_STATE(Real, Delta, 0.03, "")
DEF_VAR(Real, MeshCollisionThickness, 0.003, "")
std::shared_ptr< NeighborTriangleQuery< TDataType > > ptr_nbrQueryTri
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25