PeriDyno 1.0.0
Loading...
Searching...
No Matches
ProjectivePeridynamics.cpp
Go to the documentation of this file.
2
4
5//ParticleSystem
6#include "ParticleSystem/Module/ParticleIntegrator.h"
7
8#include "Collision/NeighborPointQuery.h"
9
10
11namespace dyno
12{
14
15 template<typename TDataType>
17 : GroupModule()
18 {
19 auto integrator = std::make_shared<ParticleIntegrator<TDataType>>();
20 this->inTimeStep()->connect(integrator->inTimeStep());
21 this->inY()->connect(integrator->inPosition());
22 this->inVelocity()->connect(integrator->inVelocity());
23 this->pushModule(integrator);
24
25 auto nbrQuery = std::make_shared<NeighborPointQuery<TDataType>>();
26 this->inHorizon()->connect(nbrQuery->inRadius());
27 this->inY()->connect(nbrQuery->inPosition());
28 this->pushModule(nbrQuery);
29
30 auto elasticity = std::make_shared<LinearElasticitySolver<TDataType>>();
31 this->inTimeStep()->connect(elasticity->inTimeStep());
32 this->inHorizon()->connect(elasticity->inHorizon());
33 this->inX()->connect(elasticity->inX());
34 this->inY()->connect(elasticity->inY());
35 this->inVelocity()->connect(elasticity->inVelocity());
36 this->inBonds()->connect(elasticity->inBonds());
37 this->pushModule(elasticity);
38 }
39
41}
#define DEFINE_CLASS(name)
Definition Object.h:140
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
void pushModule(std::shared_ptr< Module > m)
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25