Nektar++
Public Member Functions | Private Attributes | List of all members
Nektar::SolverUtils::HomoRSScalar Class Reference

Wrapper class for Riemann solver scalars. More...

#include <HomogeneousRSScalar.hpp>

Public Member Functions

 HomoRSScalar (RSScalarFuncType func, int nPlanes)
 
const Array< OneD, const NekDouble > & Exec ()
 

Private Attributes

RSScalarFuncType m_func
 
int m_planeNumber
 
int m_numPlanes
 
Array< OneD, const NekDoublem_tmp
 
Array< OneD, const NekDoublem_tmp2
 

Detailed Description

Wrapper class for Riemann solver scalars.

Definition at line 45 of file HomogeneousRSScalar.hpp.

Constructor & Destructor Documentation

◆ HomoRSScalar()

Nektar::SolverUtils::HomoRSScalar::HomoRSScalar ( RSScalarFuncType  func,
int  nPlanes 
)
inline

Definition at line 48 of file HomogeneousRSScalar.hpp.

50  : m_func (func),
51  m_planeNumber(0),
52  m_numPlanes (nPlanes),
53  m_tmp ()
54  {
55  }
Array< OneD, const NekDouble > m_tmp

Member Function Documentation

◆ Exec()

const Array<OneD, const NekDouble>& Nektar::SolverUtils::HomoRSScalar::Exec ( )
inline

Definition at line 57 of file HomogeneousRSScalar.hpp.

58  {
59  if (m_planeNumber == 0)
60  {
61  m_tmp = m_func();
62  }
63 
64  const int nPts = m_tmp.size() / m_numPlanes;
65  const int offset = m_planeNumber * nPts;
66 
67  m_tmp2 = Array<OneD, NekDouble>(nPts, m_tmp + offset);
69 
70  return m_tmp2;
71  }
Array< OneD, const NekDouble > m_tmp2

References m_func, m_numPlanes, m_planeNumber, m_tmp, and m_tmp2.

Referenced by Nektar::SolverUtils::Advection3DHomogeneous1D::v_InitObject().

Member Data Documentation

◆ m_func

RSScalarFuncType Nektar::SolverUtils::HomoRSScalar::m_func
private

Definition at line 74 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

◆ m_numPlanes

int Nektar::SolverUtils::HomoRSScalar::m_numPlanes
private

Definition at line 76 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

◆ m_planeNumber

int Nektar::SolverUtils::HomoRSScalar::m_planeNumber
private

Definition at line 75 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

◆ m_tmp

Array<OneD, const NekDouble> Nektar::SolverUtils::HomoRSScalar::m_tmp
private

Definition at line 77 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

◆ m_tmp2

Array<OneD, const NekDouble> Nektar::SolverUtils::HomoRSScalar::m_tmp2
private

Definition at line 78 of file HomogeneousRSScalar.hpp.

Referenced by Exec().