Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
Nektar::SolverUtils::HomoRSScalar Class Reference

Wrapper class for Riemann solver scalars. More...

#include <HomogeneousRSScalar.hpp>

Collaboration diagram for Nektar::SolverUtils::HomoRSScalar:
Collaboration graph
[legend]

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 46 of file HomogeneousRSScalar.hpp.

Constructor & Destructor Documentation

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

Definition at line 49 of file HomogeneousRSScalar.hpp.

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

Member Function Documentation

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

Definition at line 58 of file HomogeneousRSScalar.hpp.

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

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

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

Member Data Documentation

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

Definition at line 75 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

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

Definition at line 77 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

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

Definition at line 76 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

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

Definition at line 78 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

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

Definition at line 79 of file HomogeneousRSScalar.hpp.

Referenced by Exec().