OpenFOAM: API Guide
v2112
The open source CFD toolbox
MapFaAreaField.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) 2016-2017 Wikki Ltd
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
Class
27
Foam::MapFaAreaField
28
29
Description
30
Map area internal field on topology change. This is a partial
31
template specialisation, see MapGeometricFields.
32
33
Author
34
Zeljko Tukovic, FMENA
35
Hrvoje Jasak, Wikki Ltd.
36
37
\*---------------------------------------------------------------------------*/
38
39
#ifndef MapFaAreaField_H
40
#define MapFaAreaField_H
41
42
#include "
Field.H
"
43
#include "
areaFaMesh.H
"
44
45
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47
namespace
Foam
48
{
49
50
template
<
class
Type,
class
MeshMapper>
51
class
MapInternalField
<Type, MeshMapper,
areaMesh
>
52
{
53
public
:
54
55
MapInternalField
()
56
{}
57
58
void
operator()
59
(
60
Field<Type>
&
field
,
61
const
MeshMapper& mapper
62
)
const
;
63
};
64
65
66
template
<
class
Type,
class
MeshMapper>
67
void
MapInternalField<Type, MeshMapper, areaMesh>::operator
()
68
(
69
Field<Type>
&
field
,
70
const
MeshMapper& mapper
71
)
const
72
{
73
if
(
field
.size() != mapper.areaMap().sizeBeforeMapping())
74
{
75
FatalErrorInFunction
76
<<
"Incompatible size before mapping. Field size: "
<<
field
.size()
77
<<
" map size: "
<< mapper.areaMap().sizeBeforeMapping()
78
<<
abort
(
FatalError
);
79
}
80
81
field
.autoMap(mapper.areaMap());
82
}
83
84
85
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86
87
}
// End namespace Foam
88
89
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90
91
#endif
92
93
// ************************************************************************* //
Foam::MapInternalField::MapInternalField
MapInternalField()
Definition:
MapGeometricFields.H:51
Foam::MapInternalField< Type, MeshMapper, areaMesh >::MapInternalField
MapInternalField()
Definition:
MapFaAreaField.H:54
Foam::Field
Generic templated field type.
Definition:
Field.H:63
Field.H
field
rDeltaTY field()
Foam::areaMesh
Mesh data needed to do the Finite Area discretisation.
Definition:
areaFaMesh.H:53
Foam::FatalError
error FatalError
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::abort
errorManip< error > abort(error &err)
Definition:
errorManip.H:144
areaFaMesh.H
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
src
finiteArea
interpolation
mapping
faFieldMappers
MapFaAreaField.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.