Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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>

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.

: m_func (func),
m_numPlanes (nPlanes),
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::Diffusion3DHomogeneous1D::v_InitObject(), and Nektar::SolverUtils::Advection3DHomogeneous1D::v_InitObject().

{
if (m_planeNumber == 0)
{
}
const int nPts = m_tmp.num_elements() / m_numPlanes;
const int offset = m_planeNumber * nPts;
m_tmp2 = Array<OneD, NekDouble>(nPts, m_tmp + offset);
m_planeNumber = (m_planeNumber + 1) % m_numPlanes;
return 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().