OGS 6.1.0-1721-g6382411ad
ODESolverBuilder.h
Go to the documentation of this file.
1
10
#pragma once
11
12
#include <logog/include/logog.hpp>
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
ConcreteODESolver.h
Error.h
MathLib::ODE::createODESolver
std::unique_ptr< ODESolver< NumEquations > > createODESolver(BaseLib::ConfigTree const &config)
Definition:
ODESolverBuilder.h:39
CVodeSolver.h
BaseLib::ConfigTree
Definition:
ConfigTree.h:95
MathLib
MathLib::ODE::ConcreteODESolver
Definition:
ConcreteODESolver.h:54
BaseLib
Build information.
Definition:
TestDefinition.h:18
OGS_FATAL
#define OGS_FATAL(fmt,...)
Definition:
Error.h:71
ODESolver.h
MathLib
ODE
ODESolverBuilder.h
Generated by
1.8.13