PeriDyno 1.0.0
Loading...
Searching...
No Matches
MakeParticleSystem.cpp
Go to the documentation of this file.
2
3namespace dyno
4{
5 template<typename TDataType>
10
11 template<typename TDataType>
15
16 template<typename TDataType>
18 {
19 auto& inTopo = this->inPoints()->getData();
20
21 Coord vel = this->varInitialVelocity()->getData();
22
23 std::vector<Coord> hostVel;
24 hostVel.assign(inTopo.getPoints().size(), vel);
25
26 auto pts = std::make_shared<PointSet<TDataType>>();
27 pts->copyFrom(inTopo);
28
29 this->statePointSet()->setDataPtr(pts);
30 this->statePosition()->assign(pts->getPoints());
31 this->stateVelocity()->assign(hostVel);
32
33 hostVel.clear();
34 }
35
37}
#define DEFINE_CLASS(name)
Definition Object.h:140
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25