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

Wrapper class for Riemann solver scalars. More...

#include <HomogeneousRSScalar.hpp>

Public Member Functions

 HomoRSVector (RSVecFuncType func, int nPlanes, std::string desc="")
 
const Array< OneD, const Array< OneD, NekDouble > > & Exec ()
 

Private Attributes

RSVecFuncType m_func
 
int m_planeNumber
 
int m_numPlanes
 
Array< OneD, Array< OneD, NekDouble > > m_tmp
 
Array< OneD, Array< OneD, NekDouble > > m_tmp2
 
std::string m_desc
 

Detailed Description

Wrapper class for Riemann solver scalars.

Definition at line 78 of file HomogeneousRSScalar.hpp.

Constructor & Destructor Documentation

◆ HomoRSVector()

Nektar::SolverUtils::HomoRSVector::HomoRSVector ( RSVecFuncType  func,
int  nPlanes,
std::string  desc = "" 
)
inline

Member Function Documentation

◆ Exec()

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

Definition at line 87 of file HomogeneousRSScalar.hpp.

88 {
89 if (m_planeNumber == 0)
90 {
91 m_tmp = m_func();
92 }
93
94 const int nDim = m_tmp.size();
95 const int nPts = m_tmp[0].size() / m_numPlanes;
96 const int offset = m_planeNumber * nPts;
97 m_tmp2 = Array<OneD, Array<OneD, NekDouble>>(nDim);
98
99 for (int i = 0; i < m_tmp.size(); ++i)
100 {
101 m_tmp2[i] = Array<OneD, NekDouble>(nPts, m_tmp[i] + offset);
102 }
103
105
106 return m_tmp2;
107 }
Array< OneD, Array< OneD, 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_desc

std::string Nektar::SolverUtils::HomoRSVector::m_desc
private

Definition at line 115 of file HomogeneousRSScalar.hpp.

◆ m_func

RSVecFuncType Nektar::SolverUtils::HomoRSVector::m_func
private

Definition at line 110 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

◆ m_numPlanes

int Nektar::SolverUtils::HomoRSVector::m_numPlanes
private

Definition at line 112 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

◆ m_planeNumber

int Nektar::SolverUtils::HomoRSVector::m_planeNumber
private

Definition at line 111 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

◆ m_tmp

Array<OneD, Array<OneD, NekDouble> > Nektar::SolverUtils::HomoRSVector::m_tmp
private

Definition at line 113 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

◆ m_tmp2

Array<OneD, Array<OneD, NekDouble> > Nektar::SolverUtils::HomoRSVector::m_tmp2
private

Definition at line 114 of file HomogeneousRSScalar.hpp.

Referenced by Exec().