Microflow 3D  v1.0
MF::Database::Thread Class Reference

MFThread is an object that collects some number of Nodes of the same type which shares the same additional properties i.e. name, initial and boundary values and they are processed in the same way by functions during a pre-collision and collision steps. More...

#include <Thread.h>

Collaboration diagram for MF::Database::Thread:

Public Member Functions

 Thread (uint64_t NodeID, uint32_t NrOfNodes)
 
 ~Thread ()=default
 
MF::Database::NodegetPropTableNodePointer (const std::size_t &nodeNr, const uint8_t &LinkNr)
 
MF::Database::NodegetSecPropTableNodePointer (const std::size_t &nodeNr, const uint8_t &LinkNr)
 Returns a pointer to a linked node from a propagation table. More...
 
MF::Database::NodegetPropTableNodePointer (const MF::Database::Node *nodePointer, const uint8_t &LinkNr)
 Returns a pointer to a linked node from a second propagation table. More...
 
std::size_t getNodeNr (const MF::Database::Node *nodePointer)
 Returns a pointer to a linked node from a propagation table. More...
 
MF::Database::NodegetPropTableNodeRef (const std::size_t &nodeNr, const uint8_t &LinkNr)
 Converts a node pointer to a node number. More...
 
MF::Database::NodegetSecondPropTableNodeRef (const std::size_t &nodeNr, const uint8_t &LinkNr)
 Returns a reference to a linked node from a propagation table. More...
 
void setNodePtrInPropTable (const std::size_t &nodeNr, const uint8_t &LinkNr, MF::Database::Node *nodePtr)
 Returns a reference to a linked node from a second propagation table. More...
 
void setNodePtrInSecondPropTable (const std::size_t &nodeNr, const uint8_t &LinkNr, MF::Database::Node *nodePtr)
 Sets a pointer to a linked node in a propagation table. More...
 
MF::Database::NodegetPropTableNodeRef (const MF::Database::Node *nodePointer, const uint8_t &LinkNr)
 Sets a pointer to a linked node in a second propagation table. More...
 
MF::Database::NodegetNodeRef (const std::size_t &nodeNr)
 Returns a reference to a linked node from a propagation table. More...
 
MF::Database::NodegetNodePointer (const std::size_t &nodeNr)
 Returns a reference to node of nodeNr. More...
 
int32_t & getNodeCoordX (const std::size_t &nodeNr)
 Returns a pointer to node of nodeNr. More...
 
int32_t & getNodeCoordY (const std::size_t &nodeNr)
 Returns X coordinate of node nodeNr. More...
 
int32_t & getNodeCoordZ (const std::size_t &nodeNr)
 Returns Y coordinate of node nodeNr. More...
 
void setNodeCoordX (const std::size_t &nodeNr, const int32_t &X)
 Returns Z coordinate of node nodeNr. More...
 
void setNodeCoordY (const std::size_t &nodeNr, const int32_t &Y)
 Sets X coordinate of node nodeNr. More...
 
void setNodeCoordZ (const std::size_t &nodeNr, const int32_t &Z)
 Sets Y coordinate of node nodeNr. More...
 
uint32_t getNumberOfNodes ()
 Sets Z coordinate of node nodeNr. More...
 
MF::Database::NodegetLinkedNodePointer (const std::size_t &nodeNr, const uint8_t f)
 Returns the number of nodes in the thread. More...
 
void DoCollisionOnly (const int &CPU_ThreadsNr)
 Invokes the collision function for all nodes. More...
 
void DoPreCollisionOnly (const int &CPU_ThreadsNr)
 Invokes ONLY the pre-collision function for all nodes. More...
 
void DoPreANDCollision (const int &CPU_ThreadsNr)
 Invokes the pre-collision and collision functions for all nodes. More...
 
void DoPropagation (const int &CPU_ThreadsNr)
 Do the propagation for all nodes. More...
 

Static Public Member Functions

static std::shared_ptr< MF::Database::ThreadNew (const std::shared_ptr< MF::GU::LatticeParametersD3Q19 > &LatticeParameters_Ptr, uint64_t NodeID, uint32_t NrOfNodes)
 MFThread allocator. More...
 

Data Fields

std::shared_ptr< MF::Database::Threadm_Thread_Ptr {nullptr}
 Shared Ptr to MFThread. More...
 
std::string m_ThreadName {""}
 Name of MFThread. More...
 
uint16_t m_NodeType {0}
 Node type number. More...
 
uint16_t m_uidThreadNr {0}
 MFThread number +1 from thread config file. Automatically created threads have uidThreadNr = 0, threads defined in thread_config file have uidThreadNr > 0 (+1);. More...
 
uint16_t m_ThreadCount {0}
 For partitioned MFThreads, it is a part number. For non partitioned MFThreads = 0;. More...
 
uint8_t m_ComponentNr {0}
 Component number for multicomponent systems. Max. 255. More...
 
uint8_t m_PhaseNr {0}
 Phase number for multiphase flows. Max. 255. More...
 
bool m_DoPreCollision {false}
 Flag for pre-collision stage. If true, thread is processed during pre-collision stage. More...
 
bool m_DoCollision {false}
 Flag for collision stage. If true, thread is processed during collision stage. More...
 
bool m_DoPropagation {true}
 Flag for propagation stage. If true, thread is processed during propagation stage. More...
 
bool m_IsInletBalanceSurface {false}
 Flag used during post-processing stage. If true, nodes lie on the inlet surface. Value used for manual calculations of mean velocity and mass balance. More...
 
bool m_IsOutletBalanceSurface {false}
 Flag used during post-processing stage. If true, nodes lie on the outlet surface. Value used for manual calculations of mean velocity and mass balance. More...
 
MF::Database::Vec3< double > m_BoundaryValue_ULB {0, 0, 0}
 Initial or boundary value of LB velocity (x,y,z). More...
 
double m_BoundaryValue_RhoLB {1.0}
 Initial or boundary value of Rho LB. More...
 
MF::Database::Vec3< double > m_XYZForce_LB {0.0,0.0,0.0}
 Components X, Y, Z of the volumetric force, e.g. gravitational force [N/m3]. More...
 
void(* m_pBoundaryFunction )(MF::Database::Node *)
 
MF::Database::Vec4< double >(* m_pVRLBFunction )(const MF::Database::Node *)
 Boundary function pointer. More...
 
void(* m_pColideFunc )(MF::Database::Node *)
 Velocity and rho function pointer. More...
 
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr {nullptr}
 < Collision function pointer. More...
 
std::shared_ptr< NodePropArraym_PropagationTable_Ptr {nullptr}
 Propagation table of pointers to nodes. First half. More...
 
std::shared_ptr< NodePropArraym_SecondHalfPropagationTable_Ptr {nullptr}
 Propagation table of pointers to nodes. Second half. More...
 
std::shared_ptr< std::vector< MF::Database::Vec3< int32_t > > > m_Coordinate_Ptr = {nullptr}
 Original nodes coordinates in a sparse geometry. More...
 

Static Public Attributes

static std::shared_ptr< MF::GU::LatticeParametersD3Q19m_LatticeParameters_Ptr
 Lattice parameters shared pointer. More...
 

Detailed Description

MFThread is an object that collects some number of Nodes of the same type which shares the same additional properties i.e. name, initial and boundary values and they are processed in the same way by functions during a pre-collision and collision steps.

Pointers to those functions are kept by the MFThread object. Nodes are stored in a std::vector<Node> type dense array.

Parameters
NodeEncTypeIDThe combined nodeType + MFThread number (+1).
NrOfNodesThe number of nodes that belongs to thread.
Note
Each computational Node has to belong to exactly one MFThread.

Definition at line 37 of file Thread.h.

Constructor & Destructor Documentation

◆ Thread()

MF::Database::Thread::Thread ( uint64_t  NodeID,
uint32_t  NrOfNodes 
)
inline

Definition at line 39 of file Thread.h.

References m_ComponentNr, m_Coordinate_Ptr, m_NodeArray_Ptr, m_NodeType, m_PhaseNr, m_PropagationTable_Ptr, m_SecondHalfPropagationTable_Ptr, m_ThreadCount, m_uidThreadNr, MF::GB::NodeID::Node, MF::GB::NodeID::node_id, MF::GB::NodeID::NodeID, and ~Thread().

39  {
40  MF::GB::NodeID nodeTMP;
41  nodeTMP.node_id.NodeID = NodeID;
42  m_NodeArray_Ptr = std::make_shared<std::vector<MF::Database::Node>>(NrOfNodes);
43  m_PropagationTable_Ptr = std::make_shared<NodePropArray>(NrOfNodes);
44  m_SecondHalfPropagationTable_Ptr = std::make_shared<NodePropArray>(NrOfNodes);
45  m_Coordinate_Ptr = std::make_shared<std::vector<MF::Database::Vec3<int32_t>>>(NrOfNodes);
46  m_NodeType = nodeTMP.node_id.Node.nodeType;
47  m_uidThreadNr = nodeTMP.node_id.Node.uidThreadNr;
48  m_ThreadCount = nodeTMP.node_id.Node.ThreadCount;
49  m_ComponentNr = nodeTMP.node_id.Node.ComponentNr;
50  m_PhaseNr = nodeTMP.node_id.Node.PhaseNr; };
struct MF::GB::NodeID::@0::@1 Node
uint16_t m_uidThreadNr
MFThread number +1 from thread config file. Automatically created threads have uidThreadNr = 0...
Definition: Thread.h:69
std::shared_ptr< NodePropArray > m_SecondHalfPropagationTable_Ptr
Propagation table of pointers to nodes. Second half.
Definition: Thread.h:89
A class that allows to determine the proper NodeID from combined nodeType, uidThreadNr, ThreadCount, ComponentNr and PhaseNr.
Definition: NodeID.h:18
std::shared_ptr< std::vector< MF::Database::Vec3< int32_t > > > m_Coordinate_Ptr
Original nodes coordinates in a sparse geometry.
Definition: Thread.h:90
uint16_t m_NodeType
Node type number.
Definition: Thread.h:68
uint8_t m_ComponentNr
Component number for multicomponent systems. Max. 255.
Definition: Thread.h:71
uint64_t NodeID
Definition: NodeID.h:29
union MF::GB::NodeID::@0 node_id
std::shared_ptr< NodePropArray > m_PropagationTable_Ptr
Propagation table of pointers to nodes. First half.
Definition: Thread.h:88
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr
< Collision function pointer.
Definition: Thread.h:87
uint16_t m_ThreadCount
For partitioned MFThreads, it is a part number. For non partitioned MFThreads = 0;.
Definition: Thread.h:70
uint8_t m_PhaseNr
Phase number for multiphase flows. Max. 255.
Definition: Thread.h:72

◆ ~Thread()

MF::Database::Thread::~Thread ( )
default

Referenced by Thread().

Member Function Documentation

◆ DoCollisionOnly()

void MF::Database::Thread::DoCollisionOnly ( const int &  CPU_ThreadsNr)
inline

Invokes the collision function for all nodes.

Parameters
CPU_ThreadsNrThe number of CPU thread to be used.
Note
Function is parallelized by means of OpenMP.

Definition at line 134 of file Thread.h.

References m_NodeArray_Ptr.

134  {
135  std::size_t node;
136  omp_set_num_threads(CPU_ThreadsNr);
137  #pragma omp parallel for default(none) schedule(guided) //OpenMP compilation directive
138  for (node = 0; node < m_NodeArray_Ptr->size(); node++) {
139  (*m_pColideFunc)(&(*m_NodeArray_Ptr)[node]);
140  }
141  };
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr
< Collision function pointer.
Definition: Thread.h:87

◆ DoPreANDCollision()

void MF::Database::Thread::DoPreANDCollision ( const int &  CPU_ThreadsNr)
inline

Invokes the pre-collision and collision functions for all nodes.

Parameters
CPU_ThreadsNrThe number of CPU thread to be used.
Note
Function is parallelized by means of OpenMP.

Definition at line 160 of file Thread.h.

References m_NodeArray_Ptr.

160  {
161  std::size_t node;
162  omp_set_num_threads(CPU_ThreadsNr); // Number of CPU threads to use
163  #pragma omp parallel for default(none) schedule(guided) //OpenMP compilation directive
164  for (node = 0; node < m_NodeArray_Ptr->size(); node++) {
165  (*m_pBoundaryFunction)(&(*m_NodeArray_Ptr)[node]);
166  (*m_pColideFunc)(&(*m_NodeArray_Ptr)[node]);
167  }
168  };
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr
< Collision function pointer.
Definition: Thread.h:87

◆ DoPreCollisionOnly()

void MF::Database::Thread::DoPreCollisionOnly ( const int &  CPU_ThreadsNr)
inline

Invokes ONLY the pre-collision function for all nodes.

Parameters
CPU_ThreadsNrThe number of CPU thread to be used.
Note
Function is parallelized by means of OpenMP.

Definition at line 147 of file Thread.h.

References m_NodeArray_Ptr.

147  {
148  std::size_t node;
149  omp_set_num_threads(CPU_ThreadsNr); // Number of CPU threads to use
150  #pragma omp parallel for default(none) schedule(guided) //OpenMP compilation directive
151  for (node = 0; node < m_NodeArray_Ptr->size(); node++) {
152  (*m_pBoundaryFunction)(&(*m_NodeArray_Ptr)[node]);
153  }
154  };
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr
< Collision function pointer.
Definition: Thread.h:87

◆ DoPropagation()

void MF::Database::Thread::DoPropagation ( const int &  CPU_ThreadsNr)
inline

Do the propagation for all nodes.

Parameters
CPU_ThreadsNrThe number of CPU thread to be used.
Note
Function is parallelized by means of OpenMP.

Definition at line 174 of file Thread.h.

References getPropTableNodePointer(), getPropTableNodeRef(), m_NodeArray_Ptr, and MFQ19_H.

174  {
175  std::size_t node;
176  uint64_t LinkNr;
177  omp_set_num_threads(CPU_ThreadsNr); // Number of CPU threads to use
178  #pragma omp parallel for schedule(static) default(none) private(LinkNr)//OpenMP compilation directive
179  for (node = 0; node < m_NodeArray_Ptr->size(); node++) {
180  for (LinkNr = 0; LinkNr < MFQ19_H; LinkNr++) {
181  if (getPropTableNodePointer(node, LinkNr) != nullptr) {
182  const auto link1 = m_LatticeParameters_Ptr->SwapDirections[LinkNr][0];
183  const auto link2 = m_LatticeParameters_Ptr->SwapDirections[LinkNr][1];
184  std::swap(getPropTableNodeRef(node, LinkNr).FQ19[link1],(*m_NodeArray_Ptr)[node].FQ19[link2]);
185  }
186  }
187  }
188  };
MF::Database::Node * getPropTableNodePointer(const std::size_t &nodeNr, const uint8_t &LinkNr)
Definition: Thread.h:93
MF::Database::Node & getPropTableNodeRef(const std::size_t &nodeNr, const uint8_t &LinkNr)
Converts a node pointer to a node number.
Definition: Thread.h:97
static std::shared_ptr< MF::GU::LatticeParametersD3Q19 > m_LatticeParameters_Ptr
Lattice parameters shared pointer.
Definition: Thread.h:65
#define MFQ19_H
Number of elements (linked directions) in propagation table for one node.
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr
< Collision function pointer.
Definition: Thread.h:87

◆ getLinkedNodePointer()

MF::Database::Node* MF::Database::Thread::getLinkedNodePointer ( const std::size_t &  nodeNr,
const uint8_t  f 
)
inline

Returns the number of nodes in the thread.

Returns pointer to neighboring node in direction f.

Extracts data from propagation table and second propagation table.

Parameters
nodeNrNode number.
fDirection f(i).

Definition at line 116 of file Thread.h.

References getNodePointer(), getPropTableNodePointer(), getSecPropTableNodePointer(), MFQ19_H, and MF::GU::LatticeParametersD3Q19::SwapDirections.

116  {
117  for (auto k = 0; k < MFQ19_H; k++){
118  auto direction1 = MF::GU::LatticeParametersD3Q19::SwapDirections[k][0];
119  auto direction2 = MF::GU::LatticeParametersD3Q19::SwapDirections[k][1];
120  if (f == direction1)
121  return getPropTableNodePointer(nodeNr, k);
122  else if (f == direction2)
123  return getSecPropTableNodePointer(nodeNr, k);
124  else if (f == 0)
125  return getNodePointer(nodeNr);
126  }
127  return nullptr;
128  };
MF::Database::Node * getSecPropTableNodePointer(const std::size_t &nodeNr, const uint8_t &LinkNr)
Returns a pointer to a linked node from a propagation table.
Definition: Thread.h:94
MF::Database::Node * getPropTableNodePointer(const std::size_t &nodeNr, const uint8_t &LinkNr)
Definition: Thread.h:93
#define f(x)
#define MFQ19_H
Number of elements (linked directions) in propagation table for one node.
MF::Database::Node * getNodePointer(const std::size_t &nodeNr)
Returns a reference to node of nodeNr.
Definition: Thread.h:103
static constexpr uint8_t SwapDirections[MFQ19_H][2]
Indexes of swap directions of f(i) in D3Q19.

◆ getNodeCoordX()

int32_t& MF::Database::Thread::getNodeCoordX ( const std::size_t &  nodeNr)
inline

Returns a pointer to node of nodeNr.

Definition at line 104 of file Thread.h.

104 {return (*m_Coordinate_Ptr)[nodeNr].x;};
std::shared_ptr< std::vector< MF::Database::Vec3< int32_t > > > m_Coordinate_Ptr
Original nodes coordinates in a sparse geometry.
Definition: Thread.h:90

◆ getNodeCoordY()

int32_t& MF::Database::Thread::getNodeCoordY ( const std::size_t &  nodeNr)
inline

Returns X coordinate of node nodeNr.

Definition at line 105 of file Thread.h.

105 {return (*m_Coordinate_Ptr)[nodeNr].y;};
std::shared_ptr< std::vector< MF::Database::Vec3< int32_t > > > m_Coordinate_Ptr
Original nodes coordinates in a sparse geometry.
Definition: Thread.h:90

◆ getNodeCoordZ()

int32_t& MF::Database::Thread::getNodeCoordZ ( const std::size_t &  nodeNr)
inline

Returns Y coordinate of node nodeNr.

Definition at line 106 of file Thread.h.

106 {return (*m_Coordinate_Ptr)[nodeNr].z;};
std::shared_ptr< std::vector< MF::Database::Vec3< int32_t > > > m_Coordinate_Ptr
Original nodes coordinates in a sparse geometry.
Definition: Thread.h:90

◆ getNodeNr()

std::size_t MF::Database::Thread::getNodeNr ( const MF::Database::Node nodePointer)
inline

Returns a pointer to a linked node from a propagation table.

Definition at line 96 of file Thread.h.

References m_NodeArray_Ptr.

96 {return nodePointer - m_NodeArray_Ptr->data();};
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr
< Collision function pointer.
Definition: Thread.h:87

◆ getNodePointer()

MF::Database::Node* MF::Database::Thread::getNodePointer ( const std::size_t &  nodeNr)
inline

Returns a reference to node of nodeNr.

Definition at line 103 of file Thread.h.

Referenced by getLinkedNodePointer().

103 {return &(*m_NodeArray_Ptr)[nodeNr];};

◆ getNodeRef()

MF::Database::Node& MF::Database::Thread::getNodeRef ( const std::size_t &  nodeNr)
inline

Returns a reference to a linked node from a propagation table.

Definition at line 102 of file Thread.h.

References m_NodeArray_Ptr.

102 {return (*m_NodeArray_Ptr)[nodeNr];};
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr
< Collision function pointer.
Definition: Thread.h:87

◆ getNumberOfNodes()

uint32_t MF::Database::Thread::getNumberOfNodes ( )
inline

Sets Z coordinate of node nodeNr.

Definition at line 110 of file Thread.h.

References m_NodeArray_Ptr.

110 {return m_NodeArray_Ptr->size();};
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr
< Collision function pointer.
Definition: Thread.h:87

◆ getPropTableNodePointer() [1/2]

MF::Database::Node* MF::Database::Thread::getPropTableNodePointer ( const std::size_t &  nodeNr,
const uint8_t &  LinkNr 
)
inline

Definition at line 93 of file Thread.h.

References m_PropagationTable_Ptr.

Referenced by DoPropagation(), and getLinkedNodePointer().

93 {return (*m_PropagationTable_Ptr)[nodeNr][LinkNr];};
std::shared_ptr< NodePropArray > m_PropagationTable_Ptr
Propagation table of pointers to nodes. First half.
Definition: Thread.h:88

◆ getPropTableNodePointer() [2/2]

MF::Database::Node* MF::Database::Thread::getPropTableNodePointer ( const MF::Database::Node nodePointer,
const uint8_t &  LinkNr 
)
inline

Returns a pointer to a linked node from a second propagation table.

Definition at line 95 of file Thread.h.

References m_NodeArray_Ptr, and m_PropagationTable_Ptr.

95 {std::size_t nodeNr = nodePointer - m_NodeArray_Ptr->data(); return (*m_PropagationTable_Ptr)[nodeNr][LinkNr];};
std::shared_ptr< NodePropArray > m_PropagationTable_Ptr
Propagation table of pointers to nodes. First half.
Definition: Thread.h:88
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr
< Collision function pointer.
Definition: Thread.h:87

◆ getPropTableNodeRef() [1/2]

MF::Database::Node& MF::Database::Thread::getPropTableNodeRef ( const std::size_t &  nodeNr,
const uint8_t &  LinkNr 
)
inline

Converts a node pointer to a node number.

Definition at line 97 of file Thread.h.

Referenced by DoPropagation().

97 {return *(*m_PropagationTable_Ptr)[nodeNr][LinkNr];};

◆ getPropTableNodeRef() [2/2]

MF::Database::Node& MF::Database::Thread::getPropTableNodeRef ( const MF::Database::Node nodePointer,
const uint8_t &  LinkNr 
)
inline

Sets a pointer to a linked node in a second propagation table.

Definition at line 101 of file Thread.h.

References m_NodeArray_Ptr.

101 {std::size_t nodeNr = nodePointer - m_NodeArray_Ptr->data(); return *(*m_PropagationTable_Ptr)[nodeNr][LinkNr];};
std::shared_ptr< std::vector< MF::Database::Node > > m_NodeArray_Ptr
< Collision function pointer.
Definition: Thread.h:87

◆ getSecondPropTableNodeRef()

MF::Database::Node& MF::Database::Thread::getSecondPropTableNodeRef ( const std::size_t &  nodeNr,
const uint8_t &  LinkNr 
)
inline

Returns a reference to a linked node from a propagation table.

Definition at line 98 of file Thread.h.

98 {return *(*m_PropagationTable_Ptr)[nodeNr][LinkNr];};

◆ getSecPropTableNodePointer()

MF::Database::Node* MF::Database::Thread::getSecPropTableNodePointer ( const std::size_t &  nodeNr,
const uint8_t &  LinkNr 
)
inline

Returns a pointer to a linked node from a propagation table.

Definition at line 94 of file Thread.h.

References m_SecondHalfPropagationTable_Ptr.

Referenced by getLinkedNodePointer().

94 {return (*m_SecondHalfPropagationTable_Ptr)[nodeNr][LinkNr];};
std::shared_ptr< NodePropArray > m_SecondHalfPropagationTable_Ptr
Propagation table of pointers to nodes. Second half.
Definition: Thread.h:89

◆ New()

static std::shared_ptr<MF::Database::Thread> MF::Database::Thread::New ( const std::shared_ptr< MF::GU::LatticeParametersD3Q19 > &  LatticeParameters_Ptr,
uint64_t  NodeID,
uint32_t  NrOfNodes 
)
inlinestatic

MFThread allocator.

Allocates shared pointer to created MFThread object.

Parameters
NodeIDThe combined nodeType + MFThread number (+1).
NrOfNodesThe number of nodes that belongs to thread.

Definition at line 58 of file Thread.h.

References m_LatticeParameters_Ptr.

Referenced by MF::Database::ThreadArray::NewThread().

58  {
59  auto Thread_Ptr = std::make_shared<MF::Database::Thread>(NodeID, NrOfNodes);
60  Thread_Ptr->m_Thread_Ptr = Thread_Ptr;
61  MF::Database::Thread::m_LatticeParameters_Ptr = LatticeParameters_Ptr;
62  return Thread_Ptr;
63  }
static std::shared_ptr< MF::GU::LatticeParametersD3Q19 > m_LatticeParameters_Ptr
Lattice parameters shared pointer.
Definition: Thread.h:65

◆ setNodeCoordX()

void MF::Database::Thread::setNodeCoordX ( const std::size_t &  nodeNr,
const int32_t &  X 
)
inline

Returns Z coordinate of node nodeNr.

Definition at line 107 of file Thread.h.

107 {(*m_Coordinate_Ptr)[nodeNr].x = X;};

◆ setNodeCoordY()

void MF::Database::Thread::setNodeCoordY ( const std::size_t &  nodeNr,
const int32_t &  Y 
)
inline

Sets X coordinate of node nodeNr.

Definition at line 108 of file Thread.h.

108 {(*m_Coordinate_Ptr)[nodeNr].y = Y;};

◆ setNodeCoordZ()

void MF::Database::Thread::setNodeCoordZ ( const std::size_t &  nodeNr,
const int32_t &  Z 
)
inline

Sets Y coordinate of node nodeNr.

Definition at line 109 of file Thread.h.

109 {(*m_Coordinate_Ptr)[nodeNr].z = Z;};

◆ setNodePtrInPropTable()

void MF::Database::Thread::setNodePtrInPropTable ( const std::size_t &  nodeNr,
const uint8_t &  LinkNr,
MF::Database::Node nodePtr 
)
inline

Returns a reference to a linked node from a second propagation table.

Definition at line 99 of file Thread.h.

99 { (*m_PropagationTable_Ptr)[nodeNr][LinkNr] = nodePtr;};

◆ setNodePtrInSecondPropTable()

void MF::Database::Thread::setNodePtrInSecondPropTable ( const std::size_t &  nodeNr,
const uint8_t &  LinkNr,
MF::Database::Node nodePtr 
)
inline

Sets a pointer to a linked node in a propagation table.

Definition at line 100 of file Thread.h.

100 { (*m_SecondHalfPropagationTable_Ptr)[nodeNr][LinkNr] = nodePtr;};

Field Documentation

◆ m_BoundaryValue_RhoLB

double MF::Database::Thread::m_BoundaryValue_RhoLB {1.0}

Initial or boundary value of Rho LB.

Definition at line 80 of file Thread.h.

◆ m_BoundaryValue_ULB

MF::Database::Vec3<double> MF::Database::Thread::m_BoundaryValue_ULB {0, 0, 0}

Initial or boundary value of LB velocity (x,y,z).

Definition at line 79 of file Thread.h.

◆ m_ComponentNr

uint8_t MF::Database::Thread::m_ComponentNr {0}

Component number for multicomponent systems. Max. 255.

Definition at line 71 of file Thread.h.

Referenced by Thread().

◆ m_Coordinate_Ptr

std::shared_ptr<std::vector<MF::Database::Vec3<int32_t> > > MF::Database::Thread::m_Coordinate_Ptr = {nullptr}

Original nodes coordinates in a sparse geometry.

Definition at line 90 of file Thread.h.

Referenced by Thread().

◆ m_DoCollision

bool MF::Database::Thread::m_DoCollision {false}

Flag for collision stage. If true, thread is processed during collision stage.

Definition at line 74 of file Thread.h.

◆ m_DoPreCollision

bool MF::Database::Thread::m_DoPreCollision {false}

Flag for pre-collision stage. If true, thread is processed during pre-collision stage.

Definition at line 73 of file Thread.h.

◆ m_DoPropagation

bool MF::Database::Thread::m_DoPropagation {true}

Flag for propagation stage. If true, thread is processed during propagation stage.

Definition at line 75 of file Thread.h.

◆ m_IsInletBalanceSurface

bool MF::Database::Thread::m_IsInletBalanceSurface {false}

Flag used during post-processing stage. If true, nodes lie on the inlet surface. Value used for manual calculations of mean velocity and mass balance.

Definition at line 76 of file Thread.h.

◆ m_IsOutletBalanceSurface

bool MF::Database::Thread::m_IsOutletBalanceSurface {false}

Flag used during post-processing stage. If true, nodes lie on the outlet surface. Value used for manual calculations of mean velocity and mass balance.

Definition at line 77 of file Thread.h.

◆ m_LatticeParameters_Ptr

std::shared_ptr<MF::GU::LatticeParametersD3Q19> MF::Database::Thread::m_LatticeParameters_Ptr
inlinestatic

Lattice parameters shared pointer.

Definition at line 65 of file Thread.h.

Referenced by New().

◆ m_NodeArray_Ptr

std::shared_ptr<std::vector<MF::Database::Node> > MF::Database::Thread::m_NodeArray_Ptr {nullptr}

< Collision function pointer.

Nodes array associated with the MFThread.

Definition at line 87 of file Thread.h.

Referenced by DoCollisionOnly(), DoPreANDCollision(), DoPreCollisionOnly(), DoPropagation(), getNodeNr(), getNodeRef(), getNumberOfNodes(), getPropTableNodePointer(), getPropTableNodeRef(), and Thread().

◆ m_NodeType

uint16_t MF::Database::Thread::m_NodeType {0}

Node type number.

Definition at line 68 of file Thread.h.

Referenced by Thread().

◆ m_pBoundaryFunction

void(* MF::Database::Thread::m_pBoundaryFunction) (MF::Database::Node *)
inline

Definition at line 83 of file Thread.h.

83 {nullptr};

◆ m_pColideFunc

void(* MF::Database::Thread::m_pColideFunc) (MF::Database::Node *)
inline

Velocity and rho function pointer.

Definition at line 85 of file Thread.h.

85 {nullptr};

◆ m_PhaseNr

uint8_t MF::Database::Thread::m_PhaseNr {0}

Phase number for multiphase flows. Max. 255.

Definition at line 72 of file Thread.h.

Referenced by Thread().

◆ m_PropagationTable_Ptr

std::shared_ptr<NodePropArray> MF::Database::Thread::m_PropagationTable_Ptr {nullptr}

Propagation table of pointers to nodes. First half.

Definition at line 88 of file Thread.h.

Referenced by getPropTableNodePointer(), and Thread().

◆ m_pVRLBFunction

MF::Database::Vec4<double>(* MF::Database::Thread::m_pVRLBFunction) (const MF::Database::Node *)
inline

Boundary function pointer.

Definition at line 84 of file Thread.h.

84 {nullptr};

◆ m_SecondHalfPropagationTable_Ptr

std::shared_ptr<NodePropArray> MF::Database::Thread::m_SecondHalfPropagationTable_Ptr {nullptr}

Propagation table of pointers to nodes. Second half.

Definition at line 89 of file Thread.h.

Referenced by getSecPropTableNodePointer(), and Thread().

◆ m_Thread_Ptr

std::shared_ptr<MF::Database::Thread> MF::Database::Thread::m_Thread_Ptr {nullptr}

Shared Ptr to MFThread.

Definition at line 66 of file Thread.h.

◆ m_ThreadCount

uint16_t MF::Database::Thread::m_ThreadCount {0}

For partitioned MFThreads, it is a part number. For non partitioned MFThreads = 0;.

Definition at line 70 of file Thread.h.

Referenced by Thread().

◆ m_ThreadName

std::string MF::Database::Thread::m_ThreadName {""}

Name of MFThread.

Definition at line 67 of file Thread.h.

◆ m_uidThreadNr

uint16_t MF::Database::Thread::m_uidThreadNr {0}

MFThread number +1 from thread config file. Automatically created threads have uidThreadNr = 0, threads defined in thread_config file have uidThreadNr > 0 (+1);.

Definition at line 69 of file Thread.h.

Referenced by Thread().

◆ m_XYZForce_LB

MF::Database::Vec3<double> MF::Database::Thread::m_XYZForce_LB {0.0,0.0,0.0}

Components X, Y, Z of the volumetric force, e.g. gravitational force [N/m3].

Definition at line 81 of file Thread.h.


The documentation for this class was generated from the following file: