surfaceInterpolation.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-2019 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::surfaceInterpolation
26 
27 Description
28  Cell to surface interpolation scheme. Included in fvMesh.
29 
30 SourceFiles
31  surfaceInterpolation.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef surfaceInterpolation_H
36 #define surfaceInterpolation_H
37 
38 #include "tmp.H"
39 #include "scalar.H"
40 #include "volFieldsFwd.H"
41 #include "surfaceFieldsFwd.H"
42 #include "className.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class surfaceInterpolation Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55  // Private Data
56 
57  // Reference to fvMesh
58  const fvMesh& mesh_;
59 
60  // Demand-driven data
61 
62  //- Linear difference weighting factors
63  mutable surfaceScalarField* weights_;
64 
65  //- Cell-centre difference coefficients
66  mutable surfaceScalarField* deltaCoeffs_;
67 
68  //- Non-orthogonal cell-centre difference coefficients
69  mutable surfaceScalarField* nonOrthDeltaCoeffs_;
70 
71  //- Non-orthogonality correction vectors
72  mutable surfaceVectorField* nonOrthCorrectionVectors_;
73 
74 
75  // Private Member Functions
76 
77  //- Construct central-differencing weighting factors
78  void makeWeights() const;
79 
80  //- Construct face-gradient difference factors
81  void makeDeltaCoeffs() const;
82 
83  //- Construct face-gradient difference factors
84  void makeNonOrthDeltaCoeffs() const;
85 
86  //- Construct non-orthogonality correction vectors
87  void makeNonOrthCorrectionVectors() const;
88 
89 
90 protected:
91 
92  // Protected Member Functions
93 
94  // Storage management
95 
96  //- Clear all geometry and addressing
97  void clearOut();
98 
99 
100 public:
101 
102  // Declare name of the class and its debug switch
103  ClassName("surfaceInterpolation");
104 
105 
106  // Constructors
107 
108  //- Construct given an fvMesh
109  explicit surfaceInterpolation(const fvMesh&);
110 
111 
112  //- Destructor
114 
115 
116  // Member Functions
117 
118  //- Return reference to linear difference weighting factors
119  const surfaceScalarField& weights() const;
120 
121  //- Return reference to cell-centre difference coefficients
122  const surfaceScalarField& deltaCoeffs() const;
123 
124  //- Return reference to non-orthogonal cell-centre difference
125  // coefficients
126  const surfaceScalarField& nonOrthDeltaCoeffs() const;
127 
128  //- Return reference to non-orthogonality correction vectors
130 
131  //- Do what is necessary if the mesh has moved
132  bool movePoints();
133 };
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
bool movePoints()
Do what is necessary if the mesh has moved.
Generic GeometricField class.
Cell to surface interpolation scheme. Included in fvMesh.
const surfaceVectorField & nonOrthCorrectionVectors() const
Return reference to non-orthogonality correction vectors.
const surfaceScalarField & nonOrthDeltaCoeffs() const
Return reference to non-orthogonal cell-centre difference.
const surfaceScalarField & weights() const
Return reference to linear difference weighting factors.
surfaceInterpolation(const fvMesh &)
Construct given an fvMesh.
void clearOut()
Clear all geometry and addressing.
ClassName("surfaceInterpolation")
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
Namespace for OpenFOAM.