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

extendedFaceToCellStencil.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::extendedFaceToCellStencil
00026 
00027 Description
00028     Note: transformations on coupled patches not supported. Problem is the
00029     positions of cells reachable through these patches.
00030 
00031 SourceFiles
00032     extendedFaceToCellStencil.C
00033     extendedFaceToCellStencilTemplates.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef extendedFaceToCellStencil_H
00038 #define extendedFaceToCellStencil_H
00039 
00040 #include <OpenFOAM/mapDistribute.H>
00041 #include <finiteVolume/volFields.H>
00042 #include <finiteVolume/surfaceFields.H>
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 class globalIndex;
00050 
00051 /*---------------------------------------------------------------------------*\
00052                            Class extendedFaceToCellStencil Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 class extendedFaceToCellStencil
00056 {
00057 protected:
00058 
00059     // Protected data
00060 
00061         const polyMesh& mesh_;
00062 
00063 private:
00064 
00065     // Private Member Functions
00066 
00067         //- Disallow default bitwise copy construct
00068         extendedFaceToCellStencil(const extendedFaceToCellStencil&);
00069 
00070         //- Disallow default bitwise assignment
00071         void operator=(const extendedFaceToCellStencil&);
00072 
00073 
00074 public:
00075 
00076     // Constructors
00077 
00078         //- Construct from mesh
00079         explicit extendedFaceToCellStencil(const polyMesh&);
00080 
00081 
00082     // Member Functions
00083 
00084         //- Use map to get the data into stencil order
00085         template<class T>
00086         static void collectData
00087         (
00088             const mapDistribute& map,
00089             const labelListList& stencil,
00090             const GeometricField<T, fvsPatchField, surfaceMesh>& fld,
00091             List<List<T> >& stencilFld
00092         );
00093 
00094         //- Sum surface field contributions to create cell values
00095         template<class Type>
00096         static tmp<GeometricField<Type, fvPatchField, volMesh> > weightedSum
00097         (
00098             const mapDistribute& map,
00099             const labelListList& stencil,
00100             const GeometricField<Type, fvsPatchField, surfaceMesh>& fld,
00101             const List<List<scalar> >& stencilWeights
00102         );
00103 };
00104 
00105 
00106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00107 
00108 } // End namespace Foam
00109 
00110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00111 
00112 #ifdef NoRepository
00113 #   include "extendedFaceToCellStencilTemplates.C"
00114 #endif
00115 
00116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00117 
00118 #endif
00119 
00120 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines