FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::fv::gaussConvectionScheme
00026 
00027 Description
00028     Basic second-order convection using face-gradients and Gauss' theorem.
00029 
00030 SourceFiles
00031     gaussConvectionScheme.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef gaussConvectionScheme_H
00036 #define gaussConvectionScheme_H
00037 
00038 #include <finiteVolume/convectionScheme.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace fv
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051                        Class gaussConvectionScheme Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 template<class Type>
00055 class gaussConvectionScheme
00056 :
00057     public fv::convectionScheme<Type>
00058 {
00059     // Private data
00060 
00061         tmp<surfaceInterpolationScheme<Type> > tinterpScheme_;
00062 
00063 
00064     // Private Member Functions
00065 
00066         //- Disallow default bitwise copy construct
00067         gaussConvectionScheme(const gaussConvectionScheme&);
00068 
00069         //- Disallow default bitwise assignment
00070         void operator=(const gaussConvectionScheme&);
00071 
00072 
00073 public:
00074 
00075     //- Runtime type information
00076     TypeName("Gauss");
00077 
00078 
00079     // Constructors
00080 
00081         //- Construct from flux and interpolation scheme
00082         gaussConvectionScheme
00083         (
00084             const fvMesh& mesh,
00085             const surfaceScalarField& faceFlux,
00086             const tmp<surfaceInterpolationScheme<Type> >& scheme
00087         )
00088         :
00089             convectionScheme<Type>(mesh, faceFlux),
00090             tinterpScheme_(scheme)
00091         {}
00092 
00093         //- Construct from flux and Istream
00094         gaussConvectionScheme
00095         (
00096             const fvMesh& mesh,
00097             const surfaceScalarField& faceFlux,
00098             Istream& is
00099         )
00100         :
00101             convectionScheme<Type>(mesh, faceFlux),
00102             tinterpScheme_
00103             (
00104                 surfaceInterpolationScheme<Type>::New(mesh, faceFlux, is)
00105             )
00106         {}
00107 
00108 
00109     // Member Functions
00110 
00111         tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
00112         (
00113             const surfaceScalarField&,
00114             const GeometricField<Type, fvPatchField, volMesh>&
00115         ) const;
00116 
00117         tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
00118         (
00119             const surfaceScalarField&,
00120             const GeometricField<Type, fvPatchField, volMesh>&
00121         ) const;
00122 
00123         tmp<fvMatrix<Type> > fvmDiv
00124         (
00125             const surfaceScalarField&,
00126             GeometricField<Type, fvPatchField, volMesh>&
00127         ) const;
00128 
00129         tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDiv
00130         (
00131             const surfaceScalarField&,
00132             const GeometricField<Type, fvPatchField, volMesh>&
00133         ) const;
00134 };
00135 
00136 
00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00138 
00139 } // End namespace fv
00140 
00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00142 
00143 } // End namespace Foam
00144 
00145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00146 
00147 #ifdef NoRepository
00148 #   include <finiteVolume/gaussConvectionScheme.C>
00149 #endif
00150 
00151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00152 
00153 #endif
00154 
00155 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines