35 #ifndef NEKTAR_SOLVERUTILS_RIEMANNSOLVER 36 #define NEKTAR_SOLVERUTILS_RIEMANNSOLVER 47 template <
typename Dim,
typename DataType>
52 typedef std::function<
54 typedef std::function<
56 typedef std::function<
68 template<
typename FuncPo
interT,
typename ObjectPo
interT>
81 template<
typename FuncPo
interT,
typename ObjectPo
interT>
94 template<
typename FuncPo
interT,
typename ObjectPo
interT>
107 template<
typename FuncPo
interT,
typename ObjectPo
interT>
115 template<
typename FuncPo
interT,
typename ObjectPo
interT>
void FromToRotation(Array< OneD, const NekDouble > &from, Array< OneD, const NekDouble > &to, NekDouble *mat)
A function for creating a rotation matrix that rotates a vector from into another vector to...
virtual SOLVER_UTILS_EXPORT ~RiemannSolver()
SOLVER_UTILS_EXPORT bool CheckScalars(std::string name)
Determine whether a scalar has been defined in m_scalars.
void SetParam(std::string name, FuncPointerT func, ObjectPointerT obj)
SOLVER_UTILS_EXPORT bool CheckVectors(std::string name)
Determine whether a vector has been defined in m_vectors.
SOLVER_UTILS_EXPORT void rotateFromNormal(const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &normals, const Array< OneD, const Array< OneD, NekDouble > > &vecLocs, Array< OneD, Array< OneD, NekDouble > > &outarray)
Rotate a vector field from trace normal.
void SetAuxVec(std::string name, FuncPointerT func, ObjectPointerT obj)
virtual void v_Solve(const int nDim, const Array< OneD, const Array< OneD, NekDouble > > &Fwd, const Array< OneD, const Array< OneD, NekDouble > > &Bwd, Array< OneD, Array< OneD, NekDouble > > &flux)=0
std::map< std::string, RSParamFuncType > & GetParams()
void SetVector(std::string name, FuncPointerT func, ObjectPointerT obj)
std::map< std::string, RSScalarFuncType > m_scalars
Map of scalar function types.
std::shared_ptr< RiemannSolver > RiemannSolverSharedPtr
A shared pointer to an EquationSystem object.
std::function< const Array< OneD, const Array< OneD, NekDouble > > &()> RSVecFuncType
void GenerateRotationMatrices(const Array< OneD, const Array< OneD, NekDouble > > &normals)
Generate rotation matrices for 3D expansions.
void SetParam(std::string name, RSParamFuncType fp)
void SetScalar(std::string name, RSScalarFuncType fp)
RiemannSolverFactory & GetRiemannSolverFactory()
SOLVER_UTILS_EXPORT void Solve(const int nDim, const Array< OneD, const Array< OneD, NekDouble > > &Fwd, const Array< OneD, const Array< OneD, NekDouble > > &Bwd, Array< OneD, Array< OneD, NekDouble > > &flux)
Perform the Riemann solve given the forwards and backwards spaces.
std::map< std::string, RSScalarFuncType > m_auxScal
Map of auxiliary scalar function types.
SOLVER_UTILS_EXPORT RiemannSolver(const LibUtilities::SessionReaderSharedPtr &pSession)
void SetAuxScal(std::string name, FuncPointerT func, ObjectPointerT obj)
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_rotStorage
Rotation storage.
SOLVER_UTILS_EXPORT bool CheckAuxScal(std::string name)
Determine whether a scalar has been defined in m_auxScal.
Array< OneD, Array< OneD, NekDouble > > m_rotMat
Rotation matrices for each trace quadrature point.
SOLVER_UTILS_EXPORT bool CheckAuxVec(std::string name)
Determine whether a vector has been defined in m_auxVec.
std::function< const Array< OneD, const NekDouble > &()> RSScalarFuncType
std::map< std::string, RSVecFuncType > m_auxVec
Map of auxiliary vector function types.
LibUtilities::NekFactory< std::string, RiemannSolver, const LibUtilities::SessionReaderSharedPtr & > RiemannSolverFactory
Datatype of the NekFactory used to instantiate classes derived from the RiemannSolver class...
bool m_requiresRotation
Indicates whether the Riemann solver requires a rotation to be applied to the velocity fields...
The RiemannSolver class provides an abstract interface under which solvers for various Riemann proble...
#define SOLVER_UTILS_EXPORT
std::function< NekDouble()> RSParamFuncType
void SetScalar(std::string name, FuncPointerT func, ObjectPointerT obj)
std::map< std::string, RSParamFuncType > m_params
Map of parameter function types.
SOLVER_UTILS_EXPORT bool CheckParams(std::string name)
Determine whether a parameter has been defined in m_params.
void SetVector(std::string name, RSVecFuncType fp)
std::map< std::string, RSVecFuncType > & GetVectors()
std::map< std::string, RSScalarFuncType > & GetScalars()
std::map< std::string, RSVecFuncType > m_vectors
Map of vector function types.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
SOLVER_UTILS_EXPORT void rotateToNormal(const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const Array< OneD, NekDouble > > &normals, const Array< OneD, const Array< OneD, NekDouble > > &vecLocs, Array< OneD, Array< OneD, NekDouble > > &outarray)
Rotate a vector field to trace normal.
Provides a generic Factory class.