42 "UnsteadyInviscidBurger",
44 "Inviscid Burger equation");
48 : UnsteadySystem(pSession),
49 AdvectionSystem(pSession)
59 AdvectionSystem::v_InitObject();
74 m_session->LoadSolverInfo(
"AdvectionType", advName,
"NonConservative");
85 m_session->LoadSolverInfo(
"AdvectionType", advName,
"WeakDG");
89 m_session->LoadSolverInfo(
"UpwindType", riemName,
"Upwind");
99 ASSERTL0(
false,
"Unsupported projection type.");
113 ASSERTL0(
false,
"Implicit unsteady Advection not set up.");
139 int nVariables =
m_fields.num_elements();
152 for(i = 0; i < nVariables; ++i)
160 m_fields[0]->ExtractTracePhys(physfield[0], Fwd);
192 int nVariables = inarray.num_elements();
205 for (i = 0; i < nVariables; ++i)
227 int nVariables = inarray.num_elements();
242 for(i = 0; i < nVariables; ++i)
244 Vmath::Vcopy(nQuadraturePts, inarray[i], 1, outarray[i], 1);
255 for(i = 0; i < nVariables; ++i)
257 m_fields[i]->FwdTrans(inarray[i], coeffs);
258 m_fields[i]->BwdTrans_IterPerExp(coeffs, outarray[i]);
263 ASSERTL0(
false,
"Unknown projection scheme");
281 for (
int i = 0; i < flux.num_elements(); ++i)
283 for (
int j = 0; j < flux[0].num_elements(); ++j)
287 Vmath::Smul(nq, 0.5, flux[i][j], 1, flux[i][j], 1);
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class.
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)
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.
UnsteadyInviscidBurger(const LibUtilities::SessionReaderSharedPtr &pSession)
Session reader.
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.
void Zero(int n, T *x, const int incx)
Zero vector.
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.
static std::string className
Name of class.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.