Nektar++
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
Nektar::SolverUtils::MobilePoint Class Reference

#include <EvaluatePoints.h>

Public Member Functions

 MobilePoint (int dim, int sRank, const Array< OneD, NekDouble > global)
 
void SetLocalCoords (int eId, const Array< OneD, NekDouble > &local)
 
void SetGlobalCoords (const Array< OneD, NekDouble > &global)
 
void SetData (int nPhys, const Array< OneD, NekDouble > data)
 
Array< OneD, NekDoubleGetData ()
 
Array< OneD, NekDoubleGetGlobalCoords ()
 
Array< OneD, NekDoubleGetLocalCoords ()
 

Static Public Member Functions

static MobilePointSharedPtr create (int dim, int sRank, const Array< OneD, NekDouble > global)
 Creates an instance of this class. More...
 

Public Attributes

int m_sRank
 
Array< OneD, NekDoublem_global
 
int m_eId
 
Array< OneD, NekDoublem_local
 
Array< OneD, NekDoublem_data
 

Friends

class MemoryManager< MobilePoint >
 

Detailed Description

Definition at line 147 of file EvaluatePoints.h.

Constructor & Destructor Documentation

◆ MobilePoint()

Nektar::SolverUtils::MobilePoint::MobilePoint ( int  dim,
int  sRank,
const Array< OneD, NekDouble global 
)
inline

Definition at line 166 of file EvaluatePoints.h.

167 : m_sRank(sRank)
168 {
169 m_global = Array<OneD, NekDouble>(dim);
170 Vmath::Vcopy(dim, global, 1, m_global, 1);
171 m_local = Array<OneD, NekDouble>(dim);
172 }
Array< OneD, NekDouble > m_global
Array< OneD, NekDouble > m_local
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.hpp:825

References m_global, m_local, and Vmath::Vcopy().

Member Function Documentation

◆ create()

static MobilePointSharedPtr Nektar::SolverUtils::MobilePoint::create ( int  dim,
int  sRank,
const Array< OneD, NekDouble global 
)
inlinestatic

Creates an instance of this class.

Definition at line 158 of file EvaluatePoints.h.

160 {
163 return p;
164 }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< MobilePoint > MobilePointSharedPtr

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.

◆ GetData()

Array< OneD, NekDouble > Nektar::SolverUtils::MobilePoint::GetData ( )
inline

Definition at line 194 of file EvaluatePoints.h.

195 {
196 return m_data;
197 }
Array< OneD, NekDouble > m_data

References m_data.

◆ GetGlobalCoords()

Array< OneD, NekDouble > Nektar::SolverUtils::MobilePoint::GetGlobalCoords ( )
inline

Definition at line 199 of file EvaluatePoints.h.

200 {
201 return m_global;
202 }

References m_global.

◆ GetLocalCoords()

Array< OneD, NekDouble > Nektar::SolverUtils::MobilePoint::GetLocalCoords ( )
inline

Definition at line 204 of file EvaluatePoints.h.

205 {
206 return m_local;
207 }

References m_local.

◆ SetData()

void Nektar::SolverUtils::MobilePoint::SetData ( int  nPhys,
const Array< OneD, NekDouble data 
)
inline

Definition at line 185 of file EvaluatePoints.h.

186 {
187 if (m_data.size() < nPhys)
188 {
189 m_data = Array<OneD, NekDouble>(nPhys);
190 }
191 Vmath::Vcopy(nPhys, data, 1, m_data, 1);
192 }

References m_data, and Vmath::Vcopy().

◆ SetGlobalCoords()

void Nektar::SolverUtils::MobilePoint::SetGlobalCoords ( const Array< OneD, NekDouble > &  global)
inline

Definition at line 180 of file EvaluatePoints.h.

181 {
182 Vmath::Vcopy(m_global.size(), global, 1, m_global, 1);
183 }

References m_global, and Vmath::Vcopy().

◆ SetLocalCoords()

void Nektar::SolverUtils::MobilePoint::SetLocalCoords ( int  eId,
const Array< OneD, NekDouble > &  local 
)
inline

Definition at line 174 of file EvaluatePoints.h.

175 {
176 m_eId = eId;
177 Vmath::Vcopy(m_local.size(), local, 1, m_local, 1);
178 }

References m_eId, m_local, and Vmath::Vcopy().

Friends And Related Function Documentation

◆ MemoryManager< MobilePoint >

friend class MemoryManager< MobilePoint >
friend

Definition at line 144 of file EvaluatePoints.h.

Member Data Documentation

◆ m_data

Array<OneD, NekDouble> Nektar::SolverUtils::MobilePoint::m_data

Definition at line 155 of file EvaluatePoints.h.

Referenced by GetData(), and SetData().

◆ m_eId

int Nektar::SolverUtils::MobilePoint::m_eId

Definition at line 153 of file EvaluatePoints.h.

Referenced by SetLocalCoords().

◆ m_global

Array<OneD, NekDouble> Nektar::SolverUtils::MobilePoint::m_global

Definition at line 152 of file EvaluatePoints.h.

Referenced by GetGlobalCoords(), MobilePoint(), and SetGlobalCoords().

◆ m_local

Array<OneD, NekDouble> Nektar::SolverUtils::MobilePoint::m_local

Definition at line 154 of file EvaluatePoints.h.

Referenced by GetLocalCoords(), MobilePoint(), and SetLocalCoords().

◆ m_sRank

int Nektar::SolverUtils::MobilePoint::m_sRank

Definition at line 151 of file EvaluatePoints.h.