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