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

Wrapper class for Riemann solver scalars. More...

#include <HomogeneousRSScalar.hpp>

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

Public Member Functions

 HomoRSVector (RSVecFuncType func, int nPlanes, 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
 
string m_desc
 

Detailed Description

Wrapper class for Riemann solver scalars.

Definition at line 85 of file HomogeneousRSScalar.hpp.

Constructor & Destructor Documentation

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

Definition at line 88 of file HomogeneousRSScalar.hpp.

Member Function Documentation

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

Definition at line 99 of file HomogeneousRSScalar.hpp.

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

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

100  {
101  if (m_planeNumber == 0)
102  {
103  m_tmp = m_func();
104  }
105 
106  const int nDim = m_tmp.num_elements();
107  const int nPts = m_tmp[0].num_elements() / m_numPlanes;
108  const int offset = m_planeNumber * nPts;
109  m_tmp2 = Array<OneD, Array<OneD, NekDouble> >(nDim);
110 
111  for (int i = 0; i < m_tmp.num_elements(); ++i)
112  {
113  m_tmp2[i] = Array<OneD, NekDouble>(nPts, m_tmp[i] + offset);
114  }
115 
117 
118  return m_tmp2;
119  }
Array< OneD, Array< OneD, NekDouble > > m_tmp2
Array< OneD, Array< OneD, NekDouble > > m_tmp

Member Data Documentation

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

Definition at line 127 of file HomogeneousRSScalar.hpp.

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

Definition at line 122 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

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

Definition at line 124 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

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

Definition at line 123 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

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

Definition at line 125 of file HomogeneousRSScalar.hpp.

Referenced by Exec().

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

Definition at line 126 of file HomogeneousRSScalar.hpp.

Referenced by Exec().