1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::surfaceInterpolation
29 Cell to surface interpolation scheme. Included in fvMesh.
32 surfaceInterpolation.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef surfaceInterpolation_H
37 #define surfaceInterpolation_H
41 #include "fvSchemes.H"
42 #include "fvSolution.H"
43 #include "volFieldsFwd.H"
44 #include "surfaceFieldsFwd.H"
45 #include "className.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class surfaceInterpolation Declaration
54 \*---------------------------------------------------------------------------*/
56 class surfaceInterpolation
63 // Reference to fvMesh
68 //- Central-differencing weighting factors
69 mutable surfaceScalarField* weightingFactors_;
71 //- Face-gradient difference factors
72 mutable surfaceScalarField* differenceFactors_;
74 //- Is mesh orthogonal
75 mutable bool orthogonal_;
77 //- Non-orthogonality correction vectors
78 mutable surfaceVectorField* correctionVectors_;
81 // Private member functions
83 //- Construct central-differencing weighting factors
84 void makeWeights() const;
86 //- Construct face-gradient difference factors
87 void makeDeltaCoeffs() const;
89 //- Construct non-orthogonality correction vectors
90 void makeCorrectionVectors() const;
95 // Protected member functions
99 //- Clear all geometry and addressing
105 // Declare name of the class and its debug switch
106 ClassName("surfaceInterpolation");
111 //- Construct given an fvMesh
112 explicit surfaceInterpolation(const fvMesh&);
117 ~surfaceInterpolation();
122 //- Return reference to weighting factors array
123 const surfaceScalarField& weights() const;
125 //- Return reference to difference factors array
126 const surfaceScalarField& deltaCoeffs() const;
128 //- Return whether mesh is orthogonal or not
129 bool orthogonal() const;
131 //- Return reference to non-orthogonality correction vectors array
132 const surfaceVectorField& correctionVectors() const;
134 //- Do what is neccessary if the mesh has moved
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace Foam
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 // ************************************************************************* //