meshOctreeCubePatches.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
11  cfMesh 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 3 of the License, or (at your
14  option) any later version.
15 
16  cfMesh 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
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
23 
24 Description
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "meshOctree.H"
29 #include "triSurf.H"
30 #include "demandDrivenData.H"
31 
32 // #define DEBUGSearch
33 
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
42 (
43  const label leafI,
45 ) const
46 {
47  if( leaves_[leafI]->hasContainedElements() )
48  {
49  patches.clear();
50  const VRWGraph& ct = leaves_[leafI]->slotPtr()->containedTriangles_;
51  const constRow ce =
52  ct[leaves_[leafI]->containedElements()];
53  forAll(ce, elI)
54  patches.appendIfNotIn(surface_[ce[elI]].region());
55  }
56  else
57  {
58  patches.clear();
59  }
60 }
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 } // End namespace Foam
65 
66 // ************************************************************************* //
triSurf.H
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
demandDrivenData.H
Template functions to aid in the implementation of demand driven data.
Foam::meshOctree::findBoundaryPatchesForLeaf
void findBoundaryPatchesForLeaf(const label, DynList< label > &) const
Definition: meshOctreeCubePatches.C:42
meshOctree.H
Foam::constRow
const typedef graphRow< const VRWGraph > constRow
Definition: graphRow.H:134
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::DynList< label >
patches
patches[0]
Definition: createSingleCellMesh.H:36
Foam::VRWGraph
Definition: VRWGraph.H:101