OpenFOAM logo
Open Source CFD Toolkit

gaussConvectionScheme.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2005 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     gaussConvectionScheme
00027 
00028 Description
00029     Basic second-order convection using face-gradients and Gauss' theorem.
00030 
00031 SourceFiles
00032     gaussConvectionScheme.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef gaussConvectionScheme_H
00037 #define gaussConvectionScheme_H
00038 
00039 #include "convectionScheme.H"
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00047 
00048 namespace fv
00049 {
00050 
00051 /*---------------------------------------------------------------------------*\
00052                        Class gaussConvectionScheme Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 template<class Type>
00056 class gaussConvectionScheme
00057 :
00058     public fv::convectionScheme<Type>
00059 {
00060     // Private data
00061 
00062         tmp<surfaceInterpolationScheme<Type> > tinterpScheme_;
00063 
00064 
00065     // Private Member Functions
00066 
00067         //- Disallow default bitwise copy construct
00068         gaussConvectionScheme(const gaussConvectionScheme&);
00069 
00070         //- Disallow default bitwise assignment
00071         void operator=(const gaussConvectionScheme&);
00072 
00073 
00074 public:
00075 
00076     //- Runtime type information
00077     TypeName("Gauss");
00078 
00079 
00080     // Constructors
00081 
00082         //- Construct from flux and interpolation scheme
00083         gaussConvectionScheme
00084         (
00085             const fvMesh& mesh,
00086             const surfaceScalarField& faceFlux,
00087             const tmp<surfaceInterpolationScheme<Type> >& scheme
00088         )
00089         :
00090             convectionScheme<Type>(mesh, faceFlux),
00091             tinterpScheme_(scheme)
00092         {}
00093 
00094         //- Construct from flux and Istream
00095         gaussConvectionScheme
00096         (
00097             const fvMesh& mesh,
00098             const surfaceScalarField& faceFlux,
00099             Istream& is
00100         )
00101         :
00102             convectionScheme<Type>(mesh, faceFlux),
00103             tinterpScheme_
00104             (
00105                 surfaceInterpolationScheme<Type>::New(mesh, faceFlux, is)
00106             )
00107         {}
00108 
00109 
00110     // Member Functions
00111 
00112         tmp<GeometricField<Type, fvPatchField, surfaceMesh> > interpolate
00113         (
00114             const surfaceScalarField&,
00115             const GeometricField<Type, fvPatchField, volMesh>&
00116         ) const;
00117 
00118         tmp<GeometricField<Type, fvPatchField, surfaceMesh> > flux
00119         (
00120             const surfaceScalarField&,
00121             const GeometricField<Type, fvPatchField, volMesh>&
00122         ) const;
00123 
00124         tmp<fvMatrix<Type> > fvmDiv
00125         (
00126             const surfaceScalarField&,
00127             GeometricField<Type, fvPatchField, volMesh>&
00128         ) const;
00129 
00130         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDiv
00131         (
00132             const surfaceScalarField&,
00133             const GeometricField<Type, fvPatchField, volMesh>&
00134         ) const;
00135 };
00136 
00137 
00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00139 
00140 } // End namespace fv
00141 
00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00143 
00144 } // End namespace Foam
00145 
00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00147 
00148 #ifdef NoRepository
00149 #   include "gaussConvectionScheme.C"
00150 #endif
00151 
00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00153 
00154 #endif
00155 
00156 // ************************************************************************* //
For further information go to www.openfoam.org