PeriDyno 1.0.0
Loading...
Searching...
No Matches
FixedPoints.h
Go to the documentation of this file.
1#pragma once
3
4namespace dyno {
5
6 template<typename TDataType>
8 {
10 public:
11 typedef typename TDataType::Real Real;
12 typedef typename TDataType::Coord Coord;
13
15 ~FixedPoints() override;
16
17 void addFixedPoint(int id, Coord pt);
18 void removeFixedPoint(int id);
19
20 void clear();
21
22 protected:
23
24 void constrain() override;
25
27
28 public:
32 //DeviceArrayField<Coord> m_position;
33
37 //DeviceArrayField<Coord> m_velocity;
38
39 DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "");
40
41 DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "");
42
45
46 protected:
47 virtual bool initializeImpl() override;
48
50
51 private:
53
54 bool bUpdateRequired = false;
55
56 std::map<int, Coord> m_fixedPts;
57
58 std::vector<int> m_bFixed_host;
59 std::vector<Coord> m_fixed_positions_host;
60
63 };
64}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
virtual bool initializeImpl() override
TDataType::Coord Coord
Definition FixedPoints.h:12
std::vector< Coord > m_fixed_positions_host
Definition FixedPoints.h:59
void removeFixedPoint(int id)
~FixedPoints() override
DeviceArrayField< Coord > FixedPos
Definition FixedPoints.h:44
DEF_ARRAY_IN(Coord, Velocity, DeviceType::GPU, "")
std::vector< int > m_bFixed_host
Definition FixedPoints.h:58
std::map< int, Coord > m_fixedPts
Definition FixedPoints.h:56
DeviceArrayField< int > FixedIds
Definition FixedPoints.h:43
DArray< Coord > m_fixed_positions
Definition FixedPoints.h:62
void addFixedPoint(int id, Coord pt)
TDataType::Real Real
Definition FixedPoints.h:11
DArray< int > m_bFixed
Definition FixedPoints.h:61
DEF_ARRAY_IN(Coord, Position, DeviceType::GPU, "")
Particle position.
void constrainPositionToPlane(Coord pos, Coord dir)
void constrain() override
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Array< T, DeviceType::GPU > DArray
Definition Array.inl:89
FArray< T, DeviceType::GPU > DeviceArrayField
Definition Field.h:279
std::string FieldID
Base class for modules.
Definition OBase.h:35