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

MFThreadArray is an std::vector object that stores shared pointers to MFThreads. More...

#include <ThreadArray.h>

Public Member Functions

 ThreadArray ()
 
 ~ThreadArray ()=default
 
std::shared_ptr< MF::Database::ThreadNewThread (uint64_t NodeID, uint32_t NrOfNodes)
 New MFThread allocator. More...
 

Static Public Member Functions

static std::shared_ptr< MF::Database::ThreadArrayNew (const std::shared_ptr< MF::GU::LatticeParametersD3Q19 > &LatticeParameters_Ptr)
 MFThreadArray allocator. More...
 

Data Fields

std::shared_ptr< std::vector< std::shared_ptr< MF::Database::Thread > > > m_ThreadsTable_Ptr
 Array of MFThreads shared pointer. More...
 

Static Public Attributes

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

Detailed Description

MFThreadArray is an std::vector object that stores shared pointers to MFThreads.

Definition at line 22 of file ThreadArray.h.

Constructor & Destructor Documentation

◆ ThreadArray()

MF::Database::ThreadArray::ThreadArray ( )
inline

Definition at line 25 of file ThreadArray.h.

References m_ThreadsTable_Ptr, and ~ThreadArray().

25 { m_ThreadsTable_Ptr = std::make_shared<std::vector<std::shared_ptr<MF::Database::Thread>>>();};
std::shared_ptr< std::vector< std::shared_ptr< MF::Database::Thread > > > m_ThreadsTable_Ptr
Array of MFThreads shared pointer.
Definition: ThreadArray.h:46

◆ ~ThreadArray()

MF::Database::ThreadArray::~ThreadArray ( )
default

Referenced by ThreadArray().

Member Function Documentation

◆ New()

static std::shared_ptr<MF::Database::ThreadArray> MF::Database::ThreadArray::New ( const std::shared_ptr< MF::GU::LatticeParametersD3Q19 > &  LatticeParameters_Ptr)
inlinestatic

MFThreadArray allocator.

Allocates shared pointer to created MFThreadArray object.

Definition at line 30 of file ThreadArray.h.

References m_LatticeParameters_Ptr.

Referenced by main().

30  {
31  auto ThreadArray_Ptr = std::make_shared<MF::Database::ThreadArray>();
33  return ThreadArray_Ptr;
34  }
static std::shared_ptr< MF::GU::LatticeParametersD3Q19 > m_LatticeParameters_Ptr
Lattice parameters shared pointer.
Definition: ThreadArray.h:45

◆ NewThread()

std::shared_ptr<MF::Database::Thread> MF::Database::ThreadArray::NewThread ( uint64_t  NodeID,
uint32_t  NrOfNodes 
)
inline

New MFThread allocator.

Adds shared pointer to created MFThread object to the MFThreadArray.

Parameters
NodeIDThe encoded node type ID.
NrOfNodesThe number of nodes that belongs to thread.

Definition at line 40 of file ThreadArray.h.

References m_LatticeParameters_Ptr, m_ThreadsTable_Ptr, and MF::Database::Thread::New().

40  {
41  auto Thread_Ptr = MF::Database::Thread::New(m_LatticeParameters_Ptr, NodeID, NrOfNodes);
42  m_ThreadsTable_Ptr->push_back(Thread_Ptr);
43  return Thread_Ptr;
44  }
std::shared_ptr< std::vector< std::shared_ptr< MF::Database::Thread > > > m_ThreadsTable_Ptr
Array of MFThreads shared pointer.
Definition: ThreadArray.h:46
static std::shared_ptr< MF::GU::LatticeParametersD3Q19 > m_LatticeParameters_Ptr
Lattice parameters shared pointer.
Definition: ThreadArray.h:45
static std::shared_ptr< MF::Database::Thread > New(const std::shared_ptr< MF::GU::LatticeParametersD3Q19 > &LatticeParameters_Ptr, uint64_t NodeID, uint32_t NrOfNodes)
MFThread allocator.
Definition: Thread.h:58

Field Documentation

◆ m_LatticeParameters_Ptr

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

Lattice parameters shared pointer.

Definition at line 45 of file ThreadArray.h.

Referenced by New(), and NewThread().

◆ m_ThreadsTable_Ptr

std::shared_ptr<std::vector<std::shared_ptr<MF::Database::Thread> > > MF::Database::ThreadArray::m_ThreadsTable_Ptr

Array of MFThreads shared pointer.

Definition at line 46 of file ThreadArray.h.

Referenced by NewThread(), and ThreadArray().


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