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 tetPointMapperCellDecomp
29 Point mapper for the face tetFem decomposition
32 tetPointMapperCellDecomp.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef tetPointMapperCellDecomp_H
37 #define tetPointMapperCellDecomp_H
39 #include "morphFieldMapper.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 // Class forward declarations
47 class tetPolyMeshCellDecomp;
52 /*---------------------------------------------------------------------------*\
53 Class tetPointMapperCellDecomp Declaration
54 \*---------------------------------------------------------------------------*/
56 class tetPointMapperCellDecomp
58 public morphFieldMapper
63 const tetPolyMeshCellDecomp& mesh_;
65 //- Reference to mapPolyMesh
66 const mapPolyMesh& mpm_;
68 //- Reference to point mapper
69 const pointMapper& pointMap_;
71 //- Reference to face mapper
72 const cellMapper& cellMap_;
75 //- Size of target object
79 // Demand-driven private data
81 //- Is the mapping direct
82 mutable bool* directPtr_;
84 //- Direct addressing (only one for of addressing is used)
85 mutable labelList* directAddrPtr_;
87 //- Interpolated addressing (only one for of addressing is used)
88 mutable labelListList* interpolationAddrPtr_;
90 //- Interpolation weights
91 mutable scalarListList* weightsPtr_;
93 //- Are there any inserted (unmapped) objects
94 mutable bool* insertedObjectsPtr_;
97 mutable labelList* insertedObjectLabelsPtr_;
101 // Private Member Functions
103 //- Disallow default bitwise copy construct
104 tetPointMapperCellDecomp(const tetPointMapperCellDecomp&);
106 //- Disallow default bitwise assignment
107 void operator=(const tetPointMapperCellDecomp&);
110 //- Calculate addressing
111 void calcAddressing() const;
113 //- Clear out local storage
121 //- Construct from components
122 tetPointMapperCellDecomp
124 const tetPolyMeshCellDecomp& mesh,
125 const mapPolyMesh& meshMap,
126 const pointMapper& pMapper,
127 const cellMapper& cMapper
133 virtual ~tetPointMapperCellDecomp();
139 virtual label size() const;
141 //- Return size of field before mapping
142 virtual label sizeBeforeMapping() const;
144 //- Is the mapping direct
145 virtual bool direct() const;
147 //- Return direct addressing
148 virtual const unallocLabelList& directAddressing() const;
150 //- Return interpolated addressing
151 virtual const labelListList& addressing() const;
153 //- Return interpolation weights
154 virtual const scalarListList& weights() const;
156 //- Are there any inserted faces
157 bool insertedObjects() const;
159 //- Return list of inserted faces
160 const labelList& insertedObjectLabels() const;
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 } // End namespace Foam
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 // ************************************************************************* //