OpenFOAM: API Guide
v2112
The open source CFD toolbox
MapFvVolField.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-2015 OpenFOAM Foundation
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
Description
27
Map volume internal field on topology change. This is a partial
28
template specialisation, see MapGeometricFields.
29
30
\*---------------------------------------------------------------------------*/
31
32
#ifndef MapFvVolField_H
33
#define MapFvVolField_H
34
35
#include "
Field.H
"
36
#include "
volMesh.H
"
37
38
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39
40
namespace
Foam
41
{
42
43
template
<
class
Type,
class
MeshMapper>
44
class
MapInternalField
<Type, MeshMapper,
volMesh
>
45
{
46
public
:
47
48
MapInternalField
()
49
{}
50
51
void
operator()
52
(
53
DimensionedField<Type, volMesh>
&
field
,
54
const
MeshMapper& mapper
55
)
const
;
56
};
57
58
59
template
<
class
Type,
class
MeshMapper>
60
void
MapInternalField<Type, MeshMapper, volMesh>::operator()
61
(
62
DimensionedField<Type, volMesh>
&
field
,
63
const
MeshMapper& mapper
64
)
const
65
{
66
if
(
field
.size() != mapper.volMap().sizeBeforeMapping())
67
{
68
FatalErrorInFunction
69
<<
"Incompatible size before mapping. Field size: "
<<
field
.size()
70
<<
" map size: "
<< mapper.volMap().sizeBeforeMapping()
71
<<
abort
(
FatalError
);
72
}
73
74
field
.autoMap(mapper.volMap());
75
}
76
77
78
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79
80
}
// End namespace Foam
81
82
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83
84
#endif
85
86
// ************************************************************************* //
Foam::volMesh
Mesh data needed to do the Finite Volume discretisation.
Definition:
volMesh.H:51
volMesh.H
Foam::MapInternalField< Type, MeshMapper, volMesh >::MapInternalField
MapInternalField()
Definition:
MapFvVolField.H:48
Field.H
field
rDeltaTY field()
Foam::FatalError
error FatalError
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::abort
errorManip< error > abort(error &err)
Definition:
errorManip.H:144
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition:
error.H:453
Foam::MapInternalField
Generic internal field mapper. For "real" mapping, add template specialisations for mapping of intern...
Definition:
MapGeometricFields.H:47
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition:
DimensionedField.H:54
src
finiteVolume
interpolation
mapping
fvFieldMappers
MapFvVolField.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.