www.cemf.ir
dynamicPointStructure.hpp
Go to the documentation of this file.
1 /*------------------------------- phasicFlow ---------------------------------
2  O C enter of
3  O O E ngineering and
4  O O M ultiscale modeling of
5  OOOOOOO F luid flow
6 ------------------------------------------------------------------------------
7  Copyright (C): www.cemf.ir
8  email: hamid.r.norouzi AT gmail.com
9 ------------------------------------------------------------------------------
10 Licence:
11  This file is part of phasicFlow code. It is a free software for simulating
12  granular and multiphase flows. You can redistribute it and/or modify it under
13  the terms of GNU General Public License v3 or any other later versions.
14 
15  phasicFlow is distributed to help others in their research in the field of
16  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 -----------------------------------------------------------------------------*/
20 
21 
22 #ifndef __dynamicPointStructure_hpp__
23 #define __dynamicPointStructure_hpp__
24 
25 #include "Time.hpp"
26 #include "pointFields.hpp"
27 #include "integration.hpp"
28 #include "uniquePtr.hpp"
29 
30 namespace pFlow
31 {
32 
34 :
35  //public pointStructure
36 public eventObserver
37 {
38 protected:
39 
41 
43 
45 
47 
49 
51 
52 public:
53 
54  TypeInfo("dynamicPointStructure");
55 
56  dynamicPointStructure(Time& time, const word& integrationMethod);
57 
58  dynamicPointStructure(const dynamicPointStructure& ps) = default;
59 
60 
61  // - no move construct
63 
64  // - copy assignment
65  //
66  // should be changed, may causs undefined behavior
69 
70  // - no move assignment
72 
73  // - destructor
74  virtual ~dynamicPointStructure() = default;
75 
76 
78  {
79  return pStruct_;
80  }
81 
82  inline const pointStructure& pStruct() const
83  {
84  return pStruct_;
85  }
86 
87  inline const realx3PointField_D& velocity()const
88  {
89  return velocity_;
90  }
91 
92  inline auto velocityHostAll()
93  {
94  return velocity_.hostVectorAll();
95  }
96 
97  inline auto pointPositionHostAll()
98  {
100  }
101 
102  auto markDeleteOutOfBox(const box& domain)
103  {
104  return pStruct_.markDeleteOutOfBox(domain);
105  }
106 
108 
110 
111 
112  // - update data structure by inserting/setting new points
113  // Notifies all the fields in the registered list of data structure
114  // and exclude the fields that re in the exclusionList
115  // retrun nullptr if it fails
116  /*FUNCTION_H
117  virtual uniquePtr<int32IndexContainer> insertPoints(
118  const realx3Vector& pos,
119  const List<eventObserver*>& exclusionList={nullptr}
120  )override;*/
121 
122  bool update(const eventMessage& msg) override;
123 
124 
125 };
126 
127 }
128 
129 
130 #endif
pFlow::dynamicPointStructure::velocity_
realx3PointField_D & velocity_
Definition: dynamicPointStructure.hpp:46
pFlow::dynamicPointStructure::velocity
const realx3PointField_D & velocity() const
Definition: dynamicPointStructure.hpp:87
pFlow::real
float real
Definition: builtinTypes.hpp:46
pFlow::eventMessage
Definition: eventMessage.hpp:29
pFlow::dynamicPointStructure::dynamicPointStructure
dynamicPointStructure(Time &time, const word &integrationMethod)
Definition: dynamicPointStructure.cpp:25
pFlow::dynamicPointStructure::integrationMethod_
word integrationMethod_
Definition: dynamicPointStructure.hpp:42
pFlow::pointStructure::markDeleteOutOfBox
FUNCTION_H size_t markDeleteOutOfBox(const box &domain)
Definition: pointStructure.cpp:286
pFlow::dynamicPointStructure::markDeleteOutOfBox
auto markDeleteOutOfBox(const box &domain)
Definition: dynamicPointStructure.hpp:102
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::pointStructure::pointPositionHostAll
INLINE_FUNCTION_H auto pointPositionHostAll()
Definition: pointStructure.hpp:262
pointFields.hpp
pFlow::dynamicPointStructure::pointPositionHostAll
auto pointPositionHostAll()
Definition: dynamicPointStructure.hpp:97
pFlow::sphereParticlesKernels::acceleration
void acceleration(realx3 g, deviceViewType1D< real > mass, deviceViewType1D< realx3 > force, deviceViewType1D< real > I, deviceViewType1D< realx3 > torque, IncludeFunctionType incld, deviceViewType1D< realx3 > lAcc, deviceViewType1D< realx3 > rAcc)
Definition: sphereParticlesKernels.hpp:34
pFlow::eventObserver
Definition: eventObserver.hpp:33
pFlow::dynamicPointStructure::predict
bool predict(real dt, realx3PointField_D &acceleration)
Definition: dynamicPointStructure.cpp:121
pFlow::dynamicPointStructure
Definition: dynamicPointStructure.hpp:33
pFlow
Definition: demComponent.hpp:28
pFlow::dynamicPointStructure::update
bool update(const eventMessage &msg) override
Definition: dynamicPointStructure.cpp:181
pFlow::dynamicPointStructure::~dynamicPointStructure
virtual ~dynamicPointStructure()=default
uniquePtr.hpp
pFlow::pointField
Definition: pointField.hpp:35
pFlow::pointStructure
Definition: pointStructure.hpp:44
pFlow::dynamicPointStructure::correct
bool correct(real dt, realx3PointField_D &acceleration)
Definition: dynamicPointStructure.cpp:135
pFlow::dynamicPointStructure::pStruct
pointStructure & pStruct()
Definition: dynamicPointStructure.hpp:77
Time.hpp
pFlow::dynamicPointStructure::integrationVel_
uniquePtr< integration > integrationVel_
Definition: dynamicPointStructure.hpp:50
pFlow::dynamicPointStructure::pStruct
const pointStructure & pStruct() const
Definition: dynamicPointStructure.hpp:82
pFlow::dynamicPointStructure::time_
Time & time_
Definition: dynamicPointStructure.hpp:40
pFlow::dynamicPointStructure::pStruct_
pointStructure & pStruct_
Definition: dynamicPointStructure.hpp:44
pFlow::box
Definition: box.hpp:32
pFlow::dynamicPointStructure::operator=
dynamicPointStructure & operator=(const dynamicPointStructure &)=default
pFlow::uniquePtr
Definition: uniquePtr.hpp:44
pFlow::dynamicPointStructure::integrationPos_
uniquePtr< integration > integrationPos_
Definition: dynamicPointStructure.hpp:48
integration.hpp
pFlow::dynamicPointStructure::TypeInfo
TypeInfo("dynamicPointStructure")
pFlow::dynamicPointStructure::velocityHostAll
auto velocityHostAll()
Definition: dynamicPointStructure.hpp:92
pFlow::Time
Definition: Time.hpp:39