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

d2dt2Scheme.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::d2dt2Scheme
00026 
00027 Description
00028     Abstract base class for d2dt2 schemes.
00029 
00030 SourceFiles
00031     d2dt2Scheme.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef d2dt2Scheme_H
00036 #define d2dt2Scheme_H
00037 
00038 #include <OpenFOAM/tmp.H>
00039 #include <OpenFOAM/dimensionedType.H>
00040 #include <finiteVolume/volFieldsFwd.H>
00041 #include <finiteVolume/surfaceFieldsFwd.H>
00042 #include <OpenFOAM/typeInfo.H>
00043 #include <OpenFOAM/runTimeSelectionTables.H>
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 template<class Type>
00051 class fvMatrix;
00052 
00053 class fvMesh;
00054 
00055 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00056 
00057 namespace fv
00058 {
00059 
00060 /*---------------------------------------------------------------------------*\
00061                            Class d2dt2Scheme Declaration
00062 \*---------------------------------------------------------------------------*/
00063 
00064 template<class Type>
00065 class d2dt2Scheme
00066 :
00067     public refCount
00068 {
00069 
00070 protected:
00071 
00072     // Protected data
00073 
00074         const fvMesh& mesh_;
00075 
00076 
00077     // Private Member Functions
00078 
00079         //- Disallow copy construct
00080         d2dt2Scheme(const d2dt2Scheme&);
00081 
00082         //- Disallow default bitwise assignment
00083         void operator=(const d2dt2Scheme&);
00084 
00085 
00086 public:
00087 
00088     //- Runtime type information
00089     virtual const word& type() const = 0;
00090 
00091 
00092     // Declare run-time constructor selection tables
00093 
00094         declareRunTimeSelectionTable
00095         (
00096             tmp,
00097             d2dt2Scheme,
00098             Istream,
00099             (const fvMesh& mesh, Istream& schemeData),
00100             (mesh, schemeData)
00101         );
00102 
00103 
00104     // Constructors
00105 
00106         //- Construct from mesh
00107         d2dt2Scheme(const fvMesh& mesh)
00108         :
00109             mesh_(mesh)
00110         {}
00111 
00112         //- Construct from mesh and Istream
00113         d2dt2Scheme(const fvMesh& mesh, Istream&)
00114         :
00115             mesh_(mesh)
00116         {}
00117 
00118 
00119     // Selectors
00120 
00121         //- Return a pointer to a new d2dt2Scheme created on freestore
00122         static tmp<d2dt2Scheme<Type> > New
00123         (
00124             const fvMesh& mesh,
00125             Istream& schemeData
00126         );
00127 
00128 
00129     // Destructor
00130 
00131         virtual ~d2dt2Scheme();
00132 
00133 
00134     // Member Functions
00135 
00136         //- Return mesh reference
00137         const fvMesh& mesh() const
00138         {
00139             return mesh_;
00140         }
00141 
00142         virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcD2dt2
00143         (
00144             const GeometricField<Type, fvPatchField, volMesh>&
00145         ) = 0;
00146 
00147         virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcD2dt2
00148         (
00149             const volScalarField&,
00150             const GeometricField<Type, fvPatchField, volMesh>&
00151         ) = 0;
00152 
00153         virtual tmp<fvMatrix<Type> > fvmD2dt2
00154         (
00155             GeometricField<Type, fvPatchField, volMesh>&
00156         ) = 0;
00157 
00158         virtual tmp<fvMatrix<Type> > fvmD2dt2
00159         (
00160             const dimensionedScalar&,
00161             GeometricField<Type, fvPatchField, volMesh>&
00162         ) = 0;
00163 
00164         virtual tmp<fvMatrix<Type> > fvmD2dt2
00165         (
00166             const volScalarField&,
00167             GeometricField<Type, fvPatchField, volMesh>&
00168         ) = 0;
00169 };
00170 
00171 
00172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00173 
00174 } // End namespace fv
00175 
00176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00177 
00178 } // End namespace Foam
00179 
00180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00181 
00182 // Add the patch constructor functions to the hash tables
00183 
00184 #define makeFvD2dt2TypeScheme(SS, Type)                                        \
00185                                                                                \
00186 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0);                              \
00187                                                                                \
00188 d2dt2Scheme<Type>::addIstreamConstructorToTable<SS<Type> >                     \
00189     add##SS##Type##IstreamConstructorToTable_;
00190 
00191 
00192 #define makeFvD2dt2Scheme(SS)                                                  \
00193                                                                                \
00194 makeFvD2dt2TypeScheme(SS, scalar)                                              \
00195 makeFvD2dt2TypeScheme(SS, vector)                                              \
00196 makeFvD2dt2TypeScheme(SS, sphericalTensor)                                     \
00197 makeFvD2dt2TypeScheme(SS, symmTensor)                                          \
00198 makeFvD2dt2TypeScheme(SS, tensor)
00199 
00200 
00201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00202 
00203 #ifdef NoRepository
00204 #   include <finiteVolume/d2dt2Scheme.C>
00205 #endif
00206 
00207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00208 
00209 #endif
00210 
00211 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines