Loading...
Searching...
No Matches
faEdgeMapper.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2016-2017 Wikki Ltd
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::faEdgeMapper
28
29Description
30 FA edge mapper. Currently, edge-based finite area data is not mapped,
31 but only resized, since edge-based mapping data is not available
32
33Author
34 Zeljko Tukovic, FMENA
35 Hrvoje Jasak, Wikki Ltd.
36
37SourceFiles
38 faEdgeMapper.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef Foam_faEdgeMapper_H
43#define Foam_faEdgeMapper_H
44
45#include "morphFieldMapper.H"
46#include "faMesh.H"
47#include "faceMapper.H"
48#include "mapPolyMesh.H"
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52namespace Foam
53{
55/*---------------------------------------------------------------------------*\
56 Class faEdgeMapper Declaration
57\*---------------------------------------------------------------------------*/
58
59class faEdgeMapper
60:
61 public morphFieldMapper
62{
63 // Private Data
64
65 //- Reference to mesh
66 // currently unused: const faMesh& mesh_;
67
68 //- Reference to mapPolyMesh
69 // currently unused: const mapPolyMesh& mpm_;
70
71 //- The size of the mapper = mesh_.nInternalEdges()
72 const label mapperLen_;
73
74 //- Size before mapping (old mesh size)
75 const label sizeBeforeMapping_;
76
77
78 // Demand-Driven Data
79
80 mutable bool hasUnmapped_;
81
82 //- Direct addressing
83 mutable std::unique_ptr<labelList> directAddrPtr_;
84
85
86 // Private Member Functions
87
88 //- Calculate addressing
89 void calcAddressing() const;
90
91public:
92
93 // Generated Methods
94
95 //- No copy construct
96 faEdgeMapper(const faEdgeMapper&) = delete;
97
98 //- No copy assignment
99 void operator=(const faEdgeMapper&) = delete;
100
101
102 // Constructors
103
104 //- Construct from components
106 (
107 const faMesh& mesh,
108 const mapPolyMesh& mpm
109 );
110
111
112 //- Destructor
113 virtual ~faEdgeMapper();
114
115
116 // Member Functions
117
118 //- Return mapper size
119 virtual label size() const;
120
121 //- Return size of field before mapping
122 virtual label sizeBeforeMapping() const
123 {
124 return sizeBeforeMapping_;
125 }
126
127 //- Is the mapping direct
128 virtual bool direct() const
129 {
130 return true;
131 }
132
133 virtual bool hasUnmapped() const
134 {
135 return hasUnmapped_;
136 }
137
138 //- Return direct addressing
139 virtual const labelUList& directAddressing() const;
140
141 //- Return interpolated addressing
142 virtual const labelListList& addressing() const;
144 //- Return interpolation weights
145 virtual const scalarListList& weights() const;
146
147 //- Are there any inserted edges
148 virtual bool insertedObjects() const
149 {
150 return false;
152
153 //- Return list of inserted edges
154 virtual const labelList& insertedObjectLabels() const
155 {
157 }
158};
159
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163} // End namespace Foam
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167#endif
168
169// ************************************************************************* //
static const List< label > & null() noexcept
Definition List.H:138
virtual label sizeBeforeMapping() const
Return size of field before mapping.
virtual const labelListList & addressing() const
Return interpolated addressing.
virtual const scalarListList & weights() const
Return interpolation weights.
virtual bool hasUnmapped() const
Any unmapped values?
virtual const labelUList & directAddressing() const
Return direct addressing.
void operator=(const faEdgeMapper &)=delete
No copy assignment.
virtual label size() const
Return mapper size.
virtual const labelList & insertedObjectLabels() const
Return list of inserted edges.
virtual ~faEdgeMapper()
Destructor.
faEdgeMapper(const faEdgeMapper &)=delete
No copy construct.
virtual bool insertedObjects() const
Are there any inserted edges.
virtual bool direct() const
Is the mapping direct.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition faMesh.H:140
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
morphFieldMapper()=default
Default construct.
dynamicFvMesh & mesh
Namespace for OpenFOAM.
List< scalarList > scalarListList
List of scalarList.
Definition scalarList.H:35
List< labelList > labelListList
List of labelList.
Definition labelList.H:38
List< label > labelList
A List of labels.
Definition List.H:62
UList< label > labelUList
A UList of labels.
Definition UList.H:75