initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / interpolation / surfaceInterpolation / surfaceInterpolation / surfaceInterpolation.H
blob867e8137df6cd98d0bd00acb73925e3d9d806064
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::surfaceInterpolation
28 Description
29     Cell to surface interpolation scheme. Included in fvMesh.
31 SourceFiles
32     surfaceInterpolation.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef surfaceInterpolation_H
37 #define surfaceInterpolation_H
39 #include "tmp.H"
40 #include "scalar.H"
41 #include "fvSchemes.H"
42 #include "fvSolution.H"
43 #include "volFieldsFwd.H"
44 #include "surfaceFieldsFwd.H"
45 #include "className.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace Foam
52 /*---------------------------------------------------------------------------*\
53                      Class surfaceInterpolation Declaration
54 \*---------------------------------------------------------------------------*/
56 class surfaceInterpolation
58     public fvSchemes,
59     public fvSolution
61     // Private data
63         // Reference to fvMesh
64         const fvMesh& mesh_;
66         // Demand-driven data
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;
93 protected:
95     // Protected member functions
97         // Storage management
99             //- Clear all geometry and addressing
100             void clearOut();
103 public:
105     // Declare name of the class and its debug switch
106     ClassName("surfaceInterpolation");
109     // Constructors
111         //- Construct given an fvMesh
112         explicit surfaceInterpolation(const fvMesh&);
115     // Destructor
117         ~surfaceInterpolation();
120     // Member functions
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
135         bool movePoints();
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace Foam
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 #endif
147 // ************************************************************************* //