interpolationCellPointFace.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::interpolationCellPointFace
28 
29 Description
30  Foam::interpolationCellPointFace
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef interpolationCellPointFace_H
35 #define interpolationCellPointFace_H
36 
37 #include "interpolation.H"
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 
44 /*---------------------------------------------------------------------------*\
45  Class interpolationCellPointFace Declaration
46 \*---------------------------------------------------------------------------*/
47 
48 template<class Type>
50 :
51  public interpolation<Type>
52 {
53  // Private data
54 
55  //- Interpolated volfield
57 
58  //- Linearly interpolated volfield
60 
61  bool findTet
62  (
63  const vector& position,
64  const label nFace,
65  vector tetPoints[],
66  label tetLabelCandidate[],
67  label tetPointLabels[],
68  scalar phi[],
69  scalar phiCandidate[],
70  label& closestFace,
71  scalar& minDistance
72  ) const;
73 
74  bool findTriangle
75  (
76  const vector& position,
77  const label nFace,
78  label tetPointLabels[],
79  scalar phi[]
80  ) const;
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("cellPointFace");
87 
88 
89  // Constructors
90 
91  //- Construct from components
93  (
95  );
96 
97 
98  // Member Functions
99 
100  //- Interpolate field to the given point in the given cell
101  Type interpolate
102  (
103  const vector& position,
104  const label celli,
105  const label facei = -1
106  ) const;
107 };
108 
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #ifdef NoRepository
118 #endif
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
interpolationCellPointFace.C
interpolation.H
Foam::interpolationCellPointFace::TypeName
TypeName("cellPointFace")
Runtime type information.
Foam::interpolation::psi
const GeometricField< Type, fvPatchField, volMesh > & psi() const
Return the field to be interpolated.
Definition: interpolation.H:127
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::interpolation
Abstract base class for interpolation.
Definition: mappedPatchFieldBase.H:96
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::tetPoints
Tet storage. Null constructable (unfortunately tetrahedron<point, point> is not)
Definition: tetPoints.H:53
Foam::Vector< scalar >
Foam::interpolationCellPointFace::interpolate
Type interpolate(const vector &position, const label celli, const label facei=-1) const
Interpolate field to the given point in the given cell.
Definition: interpolationCellPointFace.C:62
Foam::interpolationCellPointFace::interpolationCellPointFace
interpolationCellPointFace(const GeometricField< Type, fvPatchField, volMesh > &psi)
Construct from components.
Definition: interpolationCellPointFace.C:40
Foam::interpolationCellPointFace
Foam::interpolationCellPointFace.
Definition: interpolationCellPointFace.H:48
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53