Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
finiteVolume
cfdTools
general
fieldSources
basicSource
basicSource
basicSourceList.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 | Copyright (C) 2010-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Class
25
Foam::basicSourceList
26
27
Description
28
List of explict sources
29
30
SourceFile
31
basicSourceList.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef basicSourceList_H
36
#define basicSourceList_H
37
38
#include <
OpenFOAM/PtrList.H
>
39
#include <
OpenFOAM/DimensionedField.H
>
40
#include "
basicSource.H
"
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
47
/*---------------------------------------------------------------------------*\
48
Class basicSourceList Declaration
49
\*---------------------------------------------------------------------------*/
50
51
class
basicSourceList
52
:
53
public
PtrList
<basicSource>
54
{
55
private
:
56
57
// Private data
58
59
//- Reference to the mesh database
60
const
fvMesh
& mesh_;
61
62
63
// Private Member Functions
64
65
//- Disallow default bitwise copy construct
66
basicSourceList
(
const
basicSourceList
&);
67
68
//- Disallow default bitwise assignment
69
void
operator=(
const
basicSourceList
&);
70
71
72
public
:
73
74
// Constructors
75
76
//- Construct from components with list of field names
77
basicSourceList
(
const
fvMesh
&
mesh
,
const
dictionary
& dict);
78
79
80
//- Destructor
81
virtual
~basicSourceList
()
82
{}
83
84
85
// Member Functions
86
87
// Evaluation
88
89
//- Add all explicit sources
90
void
addExplicitSources
();
91
92
//- Add source to scalar field
93
void
addSu
(
DimensionedField<scalar, volMesh>
& field);
94
95
//- Add source to vector field
96
void
addSu
(
DimensionedField<vector, volMesh>
& field);
97
98
//- Add source terms to scalar fvMatrix
99
void
addSu
(
fvMatrix<scalar>
& Eq);
100
101
//- Add source terms to vector fvMatrix
102
void
addSu
(
fvMatrix<vector>
& Eq);
103
104
105
// I-O
106
107
//- Read dictionary
108
virtual
bool
read
(
const
dictionary
& dict);
109
110
//- Write data to Istream
111
virtual
bool
writeData
(
Ostream
& os)
const
;
112
113
//- Ostream operator
114
friend
Ostream
&
operator
<<
115
(
116
Ostream
& os,
117
const
basicSourceList
& sources
118
);
119
120
};
121
122
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124
}
// End namespace Foam
125
126
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128
#endif
129
130
// ************************************************************************* //