PeriDyno 1.0.0
Loading...
Searching...
No Matches
PaticleUniformAnalysis.h
Go to the documentation of this file.
1#pragma once
2
7
8//#include "Collision/Attribute.h"
9//#include "ParticleSystem/Module/Kernel.h"
11
12
13namespace dyno {
14
15 template<typename TDataType> class SummationDensity;
16
17 template<typename TDataType>
19 {
21
22 public:
23 typedef typename TDataType::Real Real;
24 typedef typename TDataType::Coord Coord;
25 typedef typename TDataType::Matrix Matrix;
28
29 DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "Input particle position");
30
31 DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "Input particle position");
32
33 DEF_ARRAYLIST_IN(int, NeighborIds, DeviceType::GPU, "");
34
35 void constrain() override;
36 bool initializeImpl() override;
37
38 void setNamePrefix(std::string prefix);
39 void setOutputPath(std::string path);
40
41 DEF_VAR_IN(Real, SmoothingLength, "Smoothing Length");
42 DEF_VAR_IN(Real, SamplingDistance, "Particle sampling distance");
43
44 private:
45 int mFileIndex = 0;
46
47 std::string mOutpuPath;
48 std::string mOutputPrefix = "PaticleUniformAnalysis";
49
55
56 std::unique_ptr<std::fstream> m_output;
57 bool initial = true;
62 //std::fstream m_output;
64
65 std::shared_ptr<SummationDensity<TDataType>> mSummation;
66 };
67
69}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "Input particle position")
DEF_VAR_IN(Real, SmoothingLength, "Smoothing Length")
DEF_ARRAYLIST_IN(int, NeighborIds, DeviceType::GPU, "")
void setNamePrefix(std::string prefix)
void setOutputPath(std::string path)
std::shared_ptr< SummationDensity< TDataType > > mSummation
bool initializeImpl() override
DEF_VAR_IN(Real, SamplingDistance, "Particle sampling distance")
std::unique_ptr< std::fstream > m_output
DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "Input particle position")
The standard summation density.
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Array< T, DeviceType::GPU > DArray
Definition Array.inl:89
unsigned int uint
Definition VkProgram.h:14