initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / finiteVolume / convectionSchemes / multivariateGaussConvectionScheme / multivariateGaussConvectionScheme.C
blobd147d461eee5457780ef5c548e5f9aec4b0a562e
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 Description
26     
27 \*---------------------------------------------------------------------------*/
29 #include "multivariateGaussConvectionScheme.H"
30 #include "gaussConvectionScheme.H"
31 #include "fvMatrices.H"
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 namespace Foam
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 namespace fv
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 template<class Type>
46 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
47 multivariateGaussConvectionScheme<Type>::interpolate
49     const surfaceScalarField& faceFlux,
50     const GeometricField<Type, fvPatchField, volMesh>& vf
51 ) const
53     return gaussConvectionScheme<Type>
54     (
55         this->mesh(),
56         faceFlux,
57         tinterpScheme_()(vf)
58     ).interpolate(faceFlux, vf);
62 template<class Type>
63 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
64 multivariateGaussConvectionScheme<Type>::flux
66     const surfaceScalarField& faceFlux,
67     const GeometricField<Type, fvPatchField, volMesh>& vf
68 ) const
70     return gaussConvectionScheme<Type>
71     (
72         this->mesh(),
73         faceFlux,
74         tinterpScheme_()(vf)
75     ).flux(faceFlux, vf);
79 template<class Type>
80 tmp<fvMatrix<Type> >
81 multivariateGaussConvectionScheme<Type>::fvmDiv
83     const surfaceScalarField& faceFlux,
84     GeometricField<Type, fvPatchField, volMesh>& vf
85 ) const
87     return gaussConvectionScheme<Type>
88     (
89         this->mesh(),
90         faceFlux,
91         tinterpScheme_()(vf)
92     ).fvmDiv(faceFlux, vf);
96 template<class Type>
97 tmp<GeometricField<Type, fvPatchField, volMesh> >
98 multivariateGaussConvectionScheme<Type>::fvcDiv
100     const surfaceScalarField& faceFlux,
101     const GeometricField<Type, fvPatchField, volMesh>& vf
102 ) const
104     return gaussConvectionScheme<Type>
105     (
106         this->mesh(),
107         faceFlux,
108         tinterpScheme_()(vf)
109     ).fvcDiv(faceFlux, vf);
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 } // End namespace fv
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 } // End namespace Foam
121 // ************************************************************************* //