36 #ifndef NEKTAR_SOLVERUTILS_RIEMANNSOLVER
37 #define NEKTAR_SOLVERUTILS_RIEMANNSOLVER
45 #include <boost/function.hpp>
46 #include <boost/call_traits.hpp>
50 template <
typename Dim,
typename DataType>
55 typedef boost::function<
57 typedef boost::function<
59 typedef boost::function<
71 template<
typename FuncPo
interT,
typename ObjectPo
interT>
84 template<
typename FuncPo
interT,
typename ObjectPo
interT>
97 template<
typename FuncPo
interT,
typename ObjectPo
interT>
102 m_params[name] = boost::bind(func, obj);
110 template<
typename FuncPo
interT,
typename ObjectPo
interT>
115 m_auxScal[name] = boost::bind(func, obj);
118 template<
typename FuncPo
interT,
typename ObjectPo
interT>
123 m_auxVec[name] = boost::bind(func, obj);
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...
boost::function< const Array< OneD, const NekDouble > &()> RSScalarFuncType
SOLVER_UTILS_EXPORT bool CheckScalars(std::string name)
Determine whether a scalar has been defined in m_scalars.
boost::function< const Array< OneD, const Array< OneD, NekDouble > > &()> RSVecFuncType
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.
boost::shared_ptr< RiemannSolver > RiemannSolverSharedPtr
A shared pointer to an EquationSystem object.
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
LibUtilities::NekFactory< std::string, RiemannSolver > RiemannSolverFactory
Datatype of the NekFactory used to instantiate classes derived from the RiemannSolver class...
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.
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.
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::map< std::string, RSVecFuncType > m_auxVec
Map of auxiliary vector function types.
SOLVER_UTILS_EXPORT RiemannSolver()
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
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.
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.
boost::function< NekDouble()> RSParamFuncType
Provides a generic Factory class.