OpenFOAM: API Guide
v2012
The open source CFD toolbox
ODESystem.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | www.openfoam.com
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
Copyright (C) 2011-2013 OpenFOAM Foundation
9
Copyright (C) 2019 OpenCFD Ltd.
10
-------------------------------------------------------------------------------
11
License
12
This file is part of OpenFOAM.
13
14
OpenFOAM is free software: you can redistribute it and/or modify it
15
under the terms of the GNU General Public License as published by
16
the Free Software Foundation, either version 3 of the License, or
17
(at your option) any later version.
18
19
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22
for more details.
23
24
You should have received a copy of the GNU General Public License
25
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27
Class
28
Foam::ODESystem
29
30
Description
31
Abstract base class for the systems of ordinary differential equations.
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef ODESystem_H
36
#define ODESystem_H
37
38
#include "
scalarField.H
"
39
#include "
scalarMatrices.H
"
40
41
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42
43
namespace
Foam
44
{
45
46
/*---------------------------------------------------------------------------*\
47
Class ODESystem Declaration
48
\*---------------------------------------------------------------------------*/
49
50
class
ODESystem
51
{
52
53
public
:
54
55
// Constructors
56
57
//- Construct null
58
ODESystem
()
59
{}
60
61
62
//- Destructor
63
virtual
~ODESystem
() =
default
;
64
65
66
// Member Functions
67
68
//- Return the number of equations in the system
69
virtual
label
nEqns
()
const
= 0;
70
71
//- Calculate the derivatives in dydx
72
virtual
void
derivatives
73
(
74
const
scalar
x
,
75
const
scalarField
&
y
,
76
scalarField
& dydx
77
)
const
= 0;
78
79
//- Calculate the Jacobian of the system
80
// Need by the stiff-system solvers
81
virtual
void
jacobian
82
(
83
const
scalar
x
,
84
const
scalarField
&
y
,
85
scalarField
& dfdx,
86
scalarSquareMatrix
& dfdy
87
)
const
= 0;
88
};
89
90
91
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92
93
}
// End namespace Foam
94
95
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96
97
#endif
98
99
// ************************************************************************* //
Foam::ODESystem::nEqns
virtual label nEqns() const =0
Return the number of equations in the system.
scalarField.H
Foam::Field< scalar >
Foam::ODESystem::~ODESystem
virtual ~ODESystem()=default
Destructor.
Foam::ODESystem::jacobian
virtual void jacobian(const scalar x, const scalarField &y, scalarField &dfdx, scalarSquareMatrix &dfdy) const =0
Calculate the Jacobian of the system.
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::SquareMatrix< scalar >
Foam::ODESystem::derivatives
virtual void derivatives(const scalar x, const scalarField &y, scalarField &dydx) const =0
Calculate the derivatives in dydx.
Foam::ODESystem
Abstract base class for the systems of ordinary differential equations.
Definition:
ODESystem.H:49
x
x
Definition:
LISASMDCalcMethod2.H:52
scalarMatrices.H
Foam::ODESystem::ODESystem
ODESystem()
Construct null.
Definition:
ODESystem.H:57
y
scalar y
Definition:
LISASMDCalcMethod1.H:14
src
ODE
ODESystem
ODESystem.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.