OpenFOAM: API Guide
v2006
The open source CFD toolbox
MapPointField.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-2016 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
Class
27
Foam::MapPointField
28
29
Description
30
Map point field on topology change. This is a partial template
31
specialisation for GeoMesh=pointMesh
32
33
See also
34
MapGeometricFields
35
36
\*---------------------------------------------------------------------------*/
37
38
#ifndef MapPointField_H
39
#define MapPointField_H
40
41
#include "
Field.H
"
42
#include "
pointMesh.H
"
43
44
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46
namespace
Foam
47
{
48
49
template
<
class
Type,
class
MeshMapper>
50
class
MapInternalField
<Type, MeshMapper,
pointMesh
>
51
{
52
public
:
53
54
MapInternalField
()
55
{}
56
57
void
operator()
58
(
59
Field<Type>
&
field
,
60
const
MeshMapper& mapper
61
)
const
;
62
};
63
64
65
template
<
class
Type,
class
MeshMapper>
66
void
MapInternalField<Type, MeshMapper, pointMesh>::operator
()
67
(
68
Field<Type>
&
field
,
69
const
MeshMapper& mapper
70
)
const
71
{
72
if
(
field
.size() != mapper.pointMap().sizeBeforeMapping())
73
{
74
FatalErrorInFunction
75
<<
"Incompatible size before mapping. Field size: "
<<
field
.size()
76
<<
" map size: "
<< mapper.pointMap().sizeBeforeMapping()
77
<<
abort
(
FatalError
);
78
}
79
80
field
.autoMap(mapper.pointMap());
81
}
82
83
84
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85
86
}
// End namespace Foam
87
88
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
89
90
#endif
91
92
// ************************************************************************* //
Foam::MapInternalField::MapInternalField
MapInternalField()
Definition:
MapGeometricFields.H:51
Foam::Field
Generic templated field type.
Definition:
Field.H:63
Field.H
field
rDeltaTY field()
Foam::FatalError
error FatalError
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::pointMesh
Mesh representing a set of points created from polyMesh.
Definition:
pointMesh.H:50
Foam::abort
errorManip< error > abort(error &err)
Definition:
errorManip.H:137
Foam::MapInternalField< Type, MeshMapper, pointMesh >::MapInternalField
MapInternalField()
Definition:
MapPointField.H:53
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition:
error.H:372
Foam::MapInternalField
Generic internal field mapper. For "real" mapping, add template specialisations for mapping of intern...
Definition:
MapGeometricFields.H:47
pointMesh.H
src
OpenFOAM
meshes
pointMesh
pointMeshMapper
MapPointField.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.