Nektar++
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Nektar::LibUtilities::NekSys Class Reference

#include <NekSys.h>

Inheritance diagram for Nektar::LibUtilities::NekSys:
[legend]

Public Member Functions

 NekSys (const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey)
 
virtual ~NekSys ()=default
 
void InitObject ()
 
int SolveSystem (const int nGlobal, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const int nDir=0)
 
const NekSysOperatorsGetSysOperators ()
 
void SetSysOperators (const NekSysOperators &in)
 
void SetFlagWarnings (bool in)
 
void SetRhsMagnitude (const NekDouble mag)
 

Static Public Member Functions

static NekSysSharedPtr CreateInstance (const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey)
 

Protected Member Functions

virtual void v_InitObject ()
 
virtual void v_SetSysOperators (const NekSysOperators &in)
 
virtual int v_SolveSystem (const int nGlobal, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const int nDir)
 

Protected Attributes

LibUtilities::CommSharedPtr m_rowComm
 
bool m_converged
 
bool m_root
 
bool m_verbose
 
bool m_FlagWarnings
 
int m_SysDimen
 
NekSysOperators m_operator
 
NekDouble m_rhs_magnitude = NekConstants::kNekUnsetDouble
 

Friends

class MemoryManager< NekSys >
 Support creation through MemoryManager. More...
 

Detailed Description

Solves a nonlinear or linear system.

Definition at line 236 of file NekSys.h.

Constructor & Destructor Documentation

◆ NekSys()

Nektar::LibUtilities::NekSys::NekSys ( const LibUtilities::SessionReaderSharedPtr pSession,
const LibUtilities::CommSharedPtr vRowComm,
const int  nDimen,
const NekSysKey pKey 
)

Definition at line 46 of file NekSys.cpp.

49{
50 m_rowComm = vRowComm;
51 m_root = m_rowComm->GetRank() == 0;
52 m_FlagWarnings = true;
53 m_verbose = pSession->DefinesCmdLineArgument("verbose");
54 m_converged = false;
55 m_SysDimen = nDimen;
56}
LibUtilities::CommSharedPtr m_rowComm
Definition: NekSys.h:291

References m_converged, m_FlagWarnings, m_root, m_rowComm, m_SysDimen, and m_verbose.

◆ ~NekSys()

virtual Nektar::LibUtilities::NekSys::~NekSys ( )
virtualdefault

Member Function Documentation

◆ CreateInstance()

static NekSysSharedPtr Nektar::LibUtilities::NekSys::CreateInstance ( const LibUtilities::SessionReaderSharedPtr pSession,
const LibUtilities::CommSharedPtr vRowComm,
const int  nDimen,
const NekSysKey pKey 
)
inlinestatic

Definition at line 242 of file NekSys.h.

246 {
248 pSession, vRowComm, nDimen, pKey);
249 return p;
250 }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< NekSys > NekSysSharedPtr
Definition: NekSys.h:234

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

◆ GetSysOperators()

const NekSysOperators & Nektar::LibUtilities::NekSys::GetSysOperators ( )
inline

Definition at line 270 of file NekSys.h.

271 {
272 return m_operator;
273 }
NekSysOperators m_operator
Definition: NekSys.h:298

References m_operator.

◆ InitObject()

void Nektar::LibUtilities::NekSys::InitObject ( )
inline

Definition at line 258 of file NekSys.h.

259 {
260 v_InitObject();
261 }
virtual void v_InitObject()
Definition: NekSys.h:302

References v_InitObject().

◆ SetFlagWarnings()

void Nektar::LibUtilities::NekSys::SetFlagWarnings ( bool  in)
inline

Definition at line 280 of file NekSys.h.

281 {
282 m_FlagWarnings = in;
283 }

References m_FlagWarnings.

◆ SetRhsMagnitude()

void Nektar::LibUtilities::NekSys::SetRhsMagnitude ( const NekDouble  mag)
inline

Definition at line 285 of file NekSys.h.

286 {
287 m_rhs_magnitude = mag;
288 }

References m_rhs_magnitude.

◆ SetSysOperators()

void Nektar::LibUtilities::NekSys::SetSysOperators ( const NekSysOperators in)
inline

Definition at line 275 of file NekSys.h.

276 {
278 }
virtual void v_SetSysOperators(const NekSysOperators &in)
Definition: NekSys.h:306

References v_SetSysOperators().

◆ SolveSystem()

int Nektar::LibUtilities::NekSys::SolveSystem ( const int  nGlobal,
const Array< OneD, const NekDouble > &  pInput,
Array< OneD, NekDouble > &  pOutput,
const int  nDir = 0 
)
inline

Definition at line 263 of file NekSys.h.

266 {
267 return v_SolveSystem(nGlobal, pInput, pOutput, nDir);
268 }
virtual int v_SolveSystem(const int nGlobal, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const int nDir)
Definition: NekSys.h:311

References v_SolveSystem().

◆ v_InitObject()

virtual void Nektar::LibUtilities::NekSys::v_InitObject ( )
inlineprotectedvirtual

◆ v_SetSysOperators()

virtual void Nektar::LibUtilities::NekSys::v_SetSysOperators ( const NekSysOperators in)
inlineprotectedvirtual

Reimplemented in Nektar::LibUtilities::NekNonlinSysIter.

Definition at line 306 of file NekSys.h.

307 {
308 m_operator = in;
309 }

References m_operator.

Referenced by SetSysOperators(), and Nektar::LibUtilities::NekNonlinSysIter::v_SetSysOperators().

◆ v_SolveSystem()

virtual int Nektar::LibUtilities::NekSys::v_SolveSystem ( const int  nGlobal,
const Array< OneD, const NekDouble > &  pInput,
Array< OneD, NekDouble > &  pOutput,
const int  nDir 
)
inlineprotectedvirtual

Friends And Related Function Documentation

◆ MemoryManager< NekSys >

friend class MemoryManager< NekSys >
friend

Support creation through MemoryManager.

Definition at line 229 of file NekSys.h.

Member Data Documentation

◆ m_converged

bool Nektar::LibUtilities::NekSys::m_converged
protected

◆ m_FlagWarnings

bool Nektar::LibUtilities::NekSys::m_FlagWarnings
protected

◆ m_operator

NekSysOperators Nektar::LibUtilities::NekSys::m_operator
protected

◆ m_rhs_magnitude

NekDouble Nektar::LibUtilities::NekSys::m_rhs_magnitude = NekConstants::kNekUnsetDouble
protected

◆ m_root

bool Nektar::LibUtilities::NekSys::m_root
protected

◆ m_rowComm

LibUtilities::CommSharedPtr Nektar::LibUtilities::NekSys::m_rowComm
protected

◆ m_SysDimen

int Nektar::LibUtilities::NekSys::m_SysDimen
protected

◆ m_verbose

bool Nektar::LibUtilities::NekSys::m_verbose
protected