NeoN
A framework for CFD software
Loading...
Searching...
No Matches
backwardEuler.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2023 - 2025 NeoN authors
2//
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
11#include "NeoN/dsl/solver.hpp"
14
16
18{
19
21
22template<typename SolutionVectorType>
24 public TimeIntegratorBase<SolutionVectorType>::template Register<
25 BackwardEuler<SolutionVectorType>>
26{
27
28public:
29
30 using ValueType = typename SolutionVectorType::VectorValueType;
33
34 BackwardEuler(const Dictionary& schemeDict, const Dictionary& solutionDict)
35 : Base(schemeDict, solutionDict)
36 {}
37
38 static std::string name() { return "backwardEuler"; }
39
40 static std::string doc() { return "first order time integration method"; }
41
42 static std::string schema() { return "none"; }
43
44 void solve(dsl::Expression<ValueType>&, SolutionVectorType&, scalar, scalar) override
45 {
46 NF_ERROR_EXIT("Not implemented, use NeoN::dsl::detail::iterative_solve_impl");
47 };
48
49 std::unique_ptr<TimeIntegratorBase<SolutionVectorType>> clone() const override
50 {
51 return std::make_unique<BackwardEuler>(*this);
52 }
53
54 bool explicitIntegration() const override { return false; }
55};
56
57} // namespace NeoN
A class representing a dictionary that stores key-value pairs.
BackwardEuler(const Dictionary &schemeDict, const Dictionary &solutionDict)
void solve(dsl::Expression< ValueType > &, SolutionVectorType &, scalar, scalar) override
TimeIntegratorBase< SolutionVectorType >::template Register< BackwardEuler< SolutionVectorType > > Base
std::unique_ptr< TimeIntegratorBase< SolutionVectorType > > clone() const override
typename SolutionVectorType::VectorValueType ValueType
bool explicitIntegration() const override
A template class for registering derived classes with a base class.
#define NF_ERROR_EXIT(message)
Macro for printing an error message and aborting the program.
Definition error.hpp:110
float scalar
Definition scalar.hpp:16