initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / finiteVolume / convectionSchemes / multivariateGaussConvectionScheme / multivariateGaussConvectionScheme.H
blobb8ccb25ed562211d395f9543f672abe73f8e5f7d
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::fv::multivariateGaussConvectionScheme
28 Description
29     Basic second-order convection using face-gradients and Gauss' theorem.
31 SourceFiles
32     multivariateGaussConvectionScheme.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef multivariateGaussConvectionScheme_H
37 #define multivariateGaussConvectionScheme_H
39 #include "convectionScheme.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 namespace fv
51 /*---------------------------------------------------------------------------*\
52                        Class multivariateGaussConvectionScheme Declaration
53 \*---------------------------------------------------------------------------*/
55 template<class Type>
56 class multivariateGaussConvectionScheme
58     public fv::convectionScheme<Type>
60     // Private data
62         tmp<multivariateSurfaceInterpolationScheme<Type> > tinterpScheme_;
65 public:
67     //- Runtime type information
68     TypeName("Gauss");
71     // Constructors
73         //- Construct from flux and Istream
74         multivariateGaussConvectionScheme
75         (
76             const fvMesh& mesh,
77             const typename multivariateSurfaceInterpolationScheme<Type>::
78                 fieldTable& fields,
79             const surfaceScalarField& faceFlux,
80             Istream& is
81         )
82         :
83             convectionScheme<Type>(mesh, faceFlux),
84             tinterpScheme_
85             (
86                 multivariateSurfaceInterpolationScheme<Type>::New
87                 (
88                     mesh, fields, faceFlux, is
89                 )
90             )
91         {}
94     // Member Functions
96         tmp<multivariateSurfaceInterpolationScheme<Type> >
97         interpolationScheme() const
98         {
99             return tinterpScheme_;
100         }
102         tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
103         (
104             const surfaceScalarField&,
105             const GeometricField<Type, fvPatchField, volMesh>&
106         ) const;
108         tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
109         (
110             const surfaceScalarField&,
111             const GeometricField<Type, fvPatchField, volMesh>&
112         ) const;
114         tmp<fvMatrix<Type> > fvmDiv
115         (
116             const surfaceScalarField&,
117             GeometricField<Type, fvPatchField, volMesh>&
118         ) const;
120         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDiv
121         (
122             const surfaceScalarField&,
123             const GeometricField<Type, fvPatchField, volMesh>&
124         ) const;
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 } // End namespace fv
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 } // End namespace Foam
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 #ifdef NoRepository
139 #   include "multivariateGaussConvectionScheme.C"
140 #endif
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 #endif
146 // ************************************************************************* //