OpenFOAM logo
Open Source CFD Toolkit

tetPolyPatchMapperFaceDecomp.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     tetPolyPatchMapperFaceDecomp
00027 
00028 Description
00029     Mapping class for a tetPolyPatchFieldFaceDecomp
00030 
00031 SourceFiles
00032     tetPolyPatchMapperFaceDecomp.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef tetPolyPatchMapperFaceDecomp_H
00037 #define tetPolyPatchMapperFaceDecomp_H
00038 
00039 #include "TetPointPatchFieldMapper.H"
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 // Class forward declarations
00047 class tetPolyPatchFaceDecomp;
00048 class mapPolyMesh;
00049 class pointMapper;
00050 class faceMapper;
00051 
00052 /*---------------------------------------------------------------------------*\
00053                 Class tetPolyPatchMapperFaceDecomp Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class tetPolyPatchMapperFaceDecomp
00057 :
00058     public TetPointPatchFieldMapper
00059 {
00060     // Private data
00061 
00062         //- Reference to patch
00063         const tetPolyPatchFaceDecomp& patch_;
00064 
00065         //- Reference to mapPolyMesh
00066         const mapPolyMesh& mpm_;
00067 
00068         //- Reference to point mapper
00069         const pointMapper& pMapper_;
00070 
00071         //- Reference to face mapper
00072         const faceMapper& fMapper_;
00073 
00074 
00075     // Demand-driven private data
00076 
00077         //- Is the mapping direct
00078         mutable bool* directPtr_;
00079 
00080         //- Direct addressing (only one for of addressing is used)
00081         mutable labelList* directAddrPtr_;
00082 
00083         //- Interpolated addressing (only one for of addressing is used)
00084         mutable labelListList* interpolationAddrPtr_;
00085 
00086         //- Interpolation weights
00087         mutable scalarListList* weightsPtr_;
00088 
00089 
00090     // Private Member Functions
00091 
00092         //- Disallow default bitwise copy construct
00093         tetPolyPatchMapperFaceDecomp
00094         (
00095             const tetPolyPatchMapperFaceDecomp&
00096         );
00097 
00098         //- Disallow default bitwise assignment
00099         void operator=(const tetPolyPatchMapperFaceDecomp&);
00100 
00101 
00102         //- Calculate addressing for mapping with inserted cells
00103         void calcAddressing() const;
00104 
00105         //- Clear out local storage
00106         void clearOut();
00107 
00108 
00109 public:
00110 
00111     // Static data members
00112 
00113     // Constructors
00114 
00115         //- Construct from mappers
00116         tetPolyPatchMapperFaceDecomp
00117         (
00118             const tetPolyPatchFaceDecomp& patch,
00119             const mapPolyMesh& meshMap,
00120             const pointMapper& pMapper,
00121             const faceMapper& fMapper
00122         );
00123 
00124 
00125     // Destructor
00126 
00127         virtual ~tetPolyPatchMapperFaceDecomp();
00128 
00129 
00130     // Member Functions
00131 
00132         //- Return size
00133         virtual label size() const;
00134 
00135         //- Return size of field before mapping
00136         virtual label sizeBeforeMapping() const;
00137 
00138         //- Is the mapping direct
00139         virtual bool direct() const;
00140 
00141         //- Return direct addressing
00142         virtual const unallocLabelList& directAddressing() const;
00143 
00144         //- Return interpolated addressing
00145         virtual const labelListList& addressing() const;
00146 
00147         //- Return interpolaion weights
00148         virtual const scalarListList& weights() const;
00149 
00150 };
00151 
00152 
00153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00154 
00155 } // End namespace Foam
00156 
00157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00158 
00159 #endif
00160 
00161 // ************************************************************************* //
For further information go to www.openfoam.org