OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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