pointMVC.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2025 OpenFOAM Foundation
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::interpolations::pointMVC
26 
27 Description
28  Uses volPointInterpolation to create values on the points. Then does a Mean
29  Value Coordinates (MVC) interpolation.
30 
31 SourceFiles
32  pointMVCI.H
33  pointMVC.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef pointMVC_H
38 #define pointMVC_H
39 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace interpolations
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class pointMVC Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class Type>
54 class pointMVC
55 :
56  public fieldInterpolation<Type, pointMVC<Type>>,
57  public volPointInterpolation<Type>
58 {
59 public:
60 
61  //- Runtime type information
62  TypeName("pointMVC");
63 
64 
65  // Constructors
66 
67  //- Construct from components
68  pointMVC(const VolField<Type>& psi);
69 
70  //- Copy construct
71  pointMVC(const pointMVC<Type>& i);
72 
73  //- Clone
74  virtual autoPtr<interpolation<Type>> clone() const
75  {
77  (
78  new pointMVC<Type>(*this)
79  );
80  }
81 
82 
83  // Member Functions
84 
85  //- Inherit interpolate from interpolation
87 
88  //- Interpolate field to the given point in the given cell
89  inline Type interpolate
90  (
91  const vector& position,
92  const label celli,
93  const label facei = -1
94  ) const;
95 };
96 
97 
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 
100 } // End namespace interpolations
101 } // End namespace Foam
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 #include "pointMVCI.H"
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #ifdef NoRepository
110  #include "pointMVC.C"
111 #endif
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Abstract base class for interpolation.
Uses volPointInterpolation to create values on the points. Then does a Mean Value Coordinates (MVC) i...
Definition: pointMVC.H:57
virtual autoPtr< interpolation< Type > > clone() const
Clone.
Definition: pointMVC.H:73
pointMVC(const VolField< Type > &psi)
Construct from components.
Definition: pointMVC.C:32
TypeName("pointMVC")
Runtime type information.
Type interpolate(const vector &position, const label celli, const label facei=-1) const
Interpolate field to the given point in the given cell.
Definition: pointMVCI.H:33
Base class for interpolations that require a vol-point interpolated field.
const volScalarField & psi
point position(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the position given the coordinates and tet topology.
Definition: trackingI.H:224
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59