OGS
ODESolverBuilder.h
Go to the documentation of this file.
1
11
#pragma once
12
13
14
#include "
BaseLib/Error.h
"
15
#include "
ODESolver.h
"
16
#include "
ConcreteODESolver.h
"
17
18
#ifdef CVODE_FOUND
19
#include "
CVodeSolver.h
"
20
#endif
21
22
namespace
BaseLib
23
{
24
class
ConfigTree;
25
}
26
27
namespace
MathLib
28
{
29
namespace
ODE
30
{
33
38
template
<
unsigned
NumEquations>
39
std::unique_ptr<ODESolver<NumEquations>>
createODESolver
(
40
BaseLib::ConfigTree
const
& config)
41
{
42
#ifdef CVODE_FOUND
43
return
std::unique_ptr<ODESolver<NumEquations>>(
44
new
ConcreteODESolver<CVodeSolver, NumEquations>
(config));
45
#endif
46
(void)config;
// Unused parameter warning if no library is available.
47
48
OGS_FATAL
(
49
"No ODE solver could be created. Maybe it is because you did not build"
50
" OGS6 with support for any external ODE solver library."
);
51
}
52
54
55
}
// namespace ODE
56
}
// namespace MathLib
CVodeSolver.h
ConcreteODESolver.h
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
ODESolver.h
BaseLib::ConfigTree
Definition
ConfigTree.h:107
MathLib::ODE::ConcreteODESolver
Definition
ConcreteODESolver.h:57
MathLib::ODE::createODESolver
std::unique_ptr< ODESolver< NumEquations > > createODESolver(BaseLib::ConfigTree const &config)
Definition
ODESolverBuilder.h:39
BaseLib
Definition
TestDefinition.h:21
MathLib
Definition
CreateComponent.h:32
MathLib
ODE
ODESolverBuilder.h
Generated by
1.10.0