42 string UnsteadyInviscidBurger::className
44 "UnsteadyInviscidBurger",
45 UnsteadyInviscidBurger::create,
46 "Inviscid Burger equation");
48 UnsteadyInviscidBurger::UnsteadyInviscidBurger(
76 m_session->LoadSolverInfo(
"AdvectionType", advName,
"NonConservative");
87 m_session->LoadSolverInfo(
"AdvectionType", advName,
"WeakDG");
91 m_session->LoadSolverInfo(
"UpwindType", riemName,
"Upwind");
101 ASSERTL0(
false,
"Unsupported projection type.");
115 ASSERTL0(
false,
"Implicit unsteady Advection not set up.");
141 int nVariables =
m_fields.num_elements();
154 for(i = 0; i < nVariables; ++i)
162 m_fields[0]->ExtractTracePhys(physfield[0], Fwd);
194 int nVariables = inarray.num_elements();
207 for (i = 0; i < nVariables; ++i)
229 int nVariables = inarray.num_elements();
244 for(i = 0; i < nVariables; ++i)
246 Vmath::Vcopy(nQuadraturePts, inarray[i], 1, outarray[i], 1);
257 for(i = 0; i < nVariables; ++i)
259 m_fields[i]->FwdTrans(inarray[i], coeffs);
260 m_fields[i]->BwdTrans_IterPerExp(coeffs, outarray[i]);
265 ASSERTL0(
false,
"Unknown projection scheme");
283 for (
int i = 0; i < flux.num_elements(); ++i)
285 for (
int j = 0; j < flux[0].num_elements(); ++j)
289 Vmath::Smul(nq, 0.5, flux[i][j], 1, flux[i][j], 1);
Array< OneD, NekDouble > m_traceVn
#define ASSERTL0(condition, msg)
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
SolverUtils::AdvectionSharedPtr m_advObject
Advection term.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
Array< OneD, NekDouble > & GetNormalVelocity()
Get the normal velocity.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Array holding trace normals for DG simulations in the forwards direction.
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
bool m_explicitAdvection
Indicates if explicit or implicit treatment of advection is used.
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
Base class for unsteady solvers.
RiemannSolverFactory & GetRiemannSolverFactory()
int m_spacedim
Spatial dimension (>= expansion dim).
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
virtual ~UnsteadyInviscidBurger()
Destructor.
void Neg(int n, T *x, const int incx)
Negate x = -x.
EquationSystemFactory & GetEquationSystemFactory()
SOLVER_UTILS_EXPORT void SetBoundaryConditions(NekDouble time)
Evaluates the boundary conditions at the given time.
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the RHS.
SOLVER_UTILS_EXPORT int GetNpoints()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
virtual void v_InitObject()
Initialise the object.
SOLVER_UTILS_EXPORT int GetTraceNpoints()
SOLVER_UTILS_EXPORT int GetNcoeffs()
void GetFluxVector(const Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &flux)
Evaluate the flux at each solution point.
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the projection.
virtual SOLVER_UTILS_EXPORT void v_InitObject()
Init object for UnsteadySystem class.
void Zero(int n, T *x, const int incx)
Zero vector.
A base class for PDEs which include an advection component.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.