19template<
typename SolutionVectorType>
22 BackwardEuler<SolutionVectorType>>
27 using ValueType =
typename SolutionVectorType::VectorValueType;
32 :
Base(schemeDict, solutionDict)
35 static std::string
name() {
return "backwardEuler"; }
37 static std::string
doc() {
return "first order time integration method"; }
39 static std::string
schema() {
return "none"; }
47 auto ls = la::createEmptyLinearSystem<ValueType, localIdx>(solutionVector.mesh(), sparsity);
53 solver.solve(ls, solutionVector.internalVector());
55 if (std::holds_alternative<NeoN::GPUExecutor>(eqn.
exec()))
61 std::unique_ptr<TimeIntegratorBase<SolutionVectorType>>
clone()
const override
63 return std::make_unique<BackwardEuler>(*
this);
A class representing a dictionary that stores key-value pairs.
void implicitOperation(la::LinearSystem< ValueType, localIdx > &ls)
Vector< ValueType > explicitOperation(localIdx nCells) const
const Executor & exec() const
BackwardEuler(const Dictionary &schemeDict, const Dictionary &solutionDict)
TimeIntegratorBase< SolutionVectorType >::template Register< BackwardEuler< SolutionVectorType > > Base
std::unique_ptr< TimeIntegratorBase< SolutionVectorType > > clone() const override
void solve(dsl::Expression< ValueType > &eqn, SolutionVectorType &solutionVector, scalar t, scalar dt) override
typename SolutionVectorType::VectorValueType ValueType
static std::string name()
static std::string schema()
A template class for registering derived classes with a base class.