38#include <boost/core/ignore_unused.hpp>
66 "Reaction-diffusion requires an implicit-explicit timestepping"
67 " (e.g. IMEXOrder2)");
69 "Reaction-diffusion requires use of continuous Galerkin"
105 for (
int i = 0; i < outarray.size(); ++i)
107 Vmath::Zero(outarray[i].size(), &outarray[i][0], 1);
114 x->Apply(
m_fields, inarray, outarray, time);
130 int nvariables = inarray.size();
135 for (i = 0; i < nvariables; ++i)
137 m_fields[i]->FwdTrans(inarray[i], coeffs);
138 m_fields[i]->BwdTrans(coeffs, outarray[i]);
150 boost::ignore_unused(time);
154 int nvariables = inarray.size();
155 int npoints =
m_fields[0]->GetNpoints();
161 for (
int i = 0; i < nvariables; ++i)
#define ASSERTL0(condition, msg)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
void DefineImplicitSolve(FuncPointerT func, ObjectPointerT obj)
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
SOLVER_UTILS_EXPORT int GetNcoeffs()
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
SOLVER_UTILS_EXPORT void SetBoundaryConditions(NekDouble time)
Evaluates the boundary conditions at the given time.
static SOLVER_UTILS_EXPORT std::vector< ForcingSharedPtr > Load(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields=0)
Base class for unsteady solvers.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
LibUtilities::TimeIntegrationSchemeSharedPtr m_intScheme
Wrapper to the time integration scheme.
virtual SOLVER_UTILS_EXPORT void v_InitObject(bool DeclareField=true) override
Init object for UnsteadySystem class.
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
std::vector< SolverUtils::ForcingSharedPtr > m_forcing
Forcing terms.
UnsteadyReactionDiffusion(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the right-hand side for the unsteady reaction diffusion problem.
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the projection for the unsteady diffusion problem.
virtual ~UnsteadyReactionDiffusion()
Destructor.
virtual void v_InitObject(bool DeclareFields=true) override
Initialisation object for the unsteady reaction-diffusion problem.
void DoImplicitSolve(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, NekDouble time, NekDouble lambda)
Implicit solution of the unsteady diffusion problem.
static std::string className
Name of class.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ eIMEX
Implicit Explicit General Linear Method.
EquationSystemFactory & GetEquationSystemFactory()
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::map< ConstFactorType, NekDouble > ConstFactorMap
StdRegions::ConstFactorMap factors
The above copyright notice and this permission notice shall be included.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Zero(int n, T *x, const int incx)
Zero vector.