trackingInverseDistanceCellCellStencil.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) 2017-2019 OpenCFD 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::cellCellStencils::trackingInverseDistance
28
29Description
30 Inverse-distance-weighted interpolation stencil.
31
32SourceFiles
33 trackingInverseDistanceCellCellStencil.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef cellCellStencils_trackingInverseDistance_H
38#define cellCellStencils_trackingInverseDistance_H
39
41#include "globalIndex.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48class voxelMeshSearch;
49
50namespace cellCellStencils
51{
52
53/*---------------------------------------------------------------------------*\
54 Class trackingInverseDistance Declaration
55\*---------------------------------------------------------------------------*/
58:
59 public inverseDistance
60{
61protected:
62
63 // Protected data
64
65 //- Global indexing for cells
67
68 //- Current (global) donor cell
70
71 //- Subset according to zone
73
74
75
76 // Protected Member Functions
77
78 //- Mark voxels of patchTypes with type of patch face
79 static bool markBoundaries
80 (
81 const fvMesh& mesh,
82 const vector& smallVec,
83
84 const boundBox& bb,
85 labelVector& nDivs,
87
88 const labelList& cellMap,
89 labelList& patchCellTypes
90 );
91
92 //- Mark all cells overlapping (a voxel covered by) a src patch
93 // with type HOLE
95 (
96 PstreamBuffers& pBufs,
97
98 // Voxel mesh for patches
99 const List<treeBoundBoxList>& patchBb,
100 const List<labelVector>& patchDivisions,
101 const PtrList<PackedList<2>>& patchParts,
102
103 const label srcI,
104 const label tgtI,
105 labelList& allCellTypes
106 ) const;
107
108 void markDonors
109 (
110 PstreamBuffers& pBufs,
112 const PtrList<voxelMeshSearch>& meshSearches,
113 const labelList& allCellTypes,
114
115 const label srcI,
116 const label tgtI,
117 labelListList& allStencil,
118 labelList& allDonor
119 ) const;
120
121
122private:
123
124 // Private Member Functions
125
126 //- No copy construct
128
129 //- No copy assignment
130 void operator=(const trackingInverseDistance&) = delete;
131
132
133public:
134
135 //- Runtime type information
136 TypeName("trackingInverseDistance");
137
138
139 // Constructors
140
141 //- Construct from fvMesh
142 trackingInverseDistance(const fvMesh&, const dictionary&, const bool);
143
144
145 //- Destructor
146 virtual ~trackingInverseDistance();
147
148
149 // Member Functions
150
151 //- Update stencils. Return false if nothing changed.
152 virtual bool update();
153
154};
155
156
157// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158
159} // End namespace cellCellStencils
160} // End namespace Foam
161
162// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163
164#endif
165
166// ************************************************************************* //
A dynamic list of packed unsigned integers, with the number of bits per item specified by the <Width>...
Definition: PackedList.H:129
Buffers for inter-processor communications streams (UOPstream, UIPstream).
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
A bounding box defined in terms of min/max extrema points.
Definition: boundBox.H:64
Inverse-distance-weighted interpolation stencil.
Inverse-distance-weighted interpolation stencil.
PtrList< fvMeshSubset > meshParts_
Subset according to zone.
static bool markBoundaries(const fvMesh &mesh, const vector &smallVec, const boundBox &bb, labelVector &nDivs, PackedList< 2 > &patchTypes, const labelList &cellMap, labelList &patchCellTypes)
Mark voxels of patchTypes with type of patch face.
TypeName("trackingInverseDistance")
Runtime type information.
void markPatchesAsHoles(PstreamBuffers &pBufs, const List< treeBoundBoxList > &patchBb, const List< labelVector > &patchDivisions, const PtrList< PackedList< 2 > > &patchParts, const label srcI, const label tgtI, labelList &allCellTypes) const
Mark all cells overlapping (a voxel covered by) a src patch.
virtual bool update()
Update stencils. Return false if nothing changed.
void markDonors(PstreamBuffers &pBufs, const List< treeBoundBoxList > &meshBb, const PtrList< voxelMeshSearch > &meshSearches, const labelList &allCellTypes, const label srcI, const label tgtI, labelListList &allStencil, labelList &allDonor) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:68
dynamicFvMesh & mesh
Namespace for OpenFOAM.
wordList patchTypes(nPatches)
List< treeBoundBox > meshBb(1, treeBoundBox(boundBox(coarseMesh.points(), false)).extend(rndGen, 1e-3))
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73