PeriDyno 1.0.0
Loading...
Searching...
No Matches
EnergyAnalysis.h
Go to the documentation of this file.
1#pragma once
2
7
8
9namespace dyno {
10
11
12 template<typename TDataType>
14 {
16
17 public:
18 typedef typename TDataType::Real Real;
19 typedef typename TDataType::Coord Coord;
20 typedef typename TDataType::Matrix Matrix;
22 ~EnergyAnalysis() override;
23
24 DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "Input particle position");
25
26 DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "Input particle position");
27
28 DEF_ARRAYLIST_IN(int, NeighborIds, DeviceType::GPU, "");
29
30 void constrain() override;
31 bool initializeImpl() override;
32
33 void setNamePrefix(std::string prefix);
34 void setOutputPath(std::string path);
35
36 private:
37 int mFileIndex = 0;
38
39 std::string mOutpuPath;
40 std::string mOutputPrefix = "NeighborCountAnalysis";
41
44
45 std::unique_ptr<std::fstream> m_output;
46 bool initial = true;
51 //std::fstream m_output;
52 };
53
55}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
~EnergyAnalysis() override
TDataType::Real Real
Reduction< float > * m_reduce_real
TDataType::Coord Coord
void setOutputPath(std::string path)
DEF_ARRAYLIST_IN(int, NeighborIds, DeviceType::GPU, "")
DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "Input particle position")
std::string mOutputPrefix
Reduction< Real > * m_reduce
void constrain() override
DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "Input particle position")
void setNamePrefix(std::string prefix)
DArray< Real > m_Count
TDataType::Matrix Matrix
bool initializeImpl() override
Arithmetic< Real > * m_arithmetic
std::unique_ptr< std::fstream > m_output
DArray< Real > m_Energy
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