1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 tetPolyPatchMapperCellDecomp
29 Mapping class for a tetPolyPatchFieldCellDecomp
32 tetPolyPatchMapperCellDecomp.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef tetPolyPatchMapperCellDecomp_H
37 #define tetPolyPatchMapperCellDecomp_H
39 #include "PointPatchFieldMapper.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 // Class forward declarations
47 class tetPolyPatchCellDecomp;
50 /*---------------------------------------------------------------------------*\
51 Class tetPolyPatchMapperCellDecomp Declaration
52 \*---------------------------------------------------------------------------*/
54 class tetPolyPatchMapperCellDecomp
56 public PointPatchFieldMapper
60 //- Reference to patch
61 const tetPolyPatchCellDecomp& patch_;
63 //- Reference to mapPolyMesh
64 const mapPolyMesh& mpm_;
67 // Demand-driven private data
69 //- Is the mapping direct
70 mutable bool* directPtr_;
72 //- Direct addressing (only one for of addressing is used)
73 mutable labelList* directAddrPtr_;
76 // Private Member Functions
78 //- Disallow default bitwise copy construct
79 tetPolyPatchMapperCellDecomp
81 const tetPolyPatchMapperCellDecomp&
84 //- Disallow default bitwise assignment
85 void operator=(const tetPolyPatchMapperCellDecomp&);
88 //- Calculate addressing for mapping with inserted cells
89 void calcAddressing() const;
91 //- Clear out local storage
97 // Static data members
101 //- Construct from mappers
102 tetPolyPatchMapperCellDecomp
104 const tetPolyPatchCellDecomp& patch,
105 const mapPolyMesh& meshMap
111 virtual ~tetPolyPatchMapperCellDecomp();
117 virtual label size() const;
119 //- Return size of field before mapping
120 virtual label sizeBeforeMapping() const;
122 //- Is the mapping direct
123 virtual bool direct() const
128 //- Return direct addressing
129 virtual const unallocLabelList& directAddressing() const;
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 } // End namespace Foam
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 // ************************************************************************* //