meshOctreeModifierI.H
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 
29 #include "meshOctreeModifier.H"
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 
37 {
38  return octree_;
39 }
40 
42 {
43  return octree_.neiProcs_;
44 }
45 
47 {
48  return octree_.rootBox_;
49 }
50 
52 {
54 }
55 
57 {
58  return octree_.searchRange_;
59 }
60 
63 {
64  return octree_.neiRange_;
65 }
66 
68 {
69  return *octree_.initialCubePtr_;
70 }
71 
73 {
74  return octree_.dataSlots_;
75 }
76 
78 (
80 ) const
81 {
82  return octree_.findCubeForPosition(cc);
83 }
84 
86 (
87  const boundBox& bb,
89 ) const
90 {
91  containedLeaves.clear();
92  octree_.findLeavesContainedInBox(bb, containedLeaves);
93 }
94 
96 {
97  return octree_.leaves_;
98 }
99 
101 {
102  octree_.leaves_.clear();
103 
105 }
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::meshOctreeModifier::findCubeForPosition
meshOctreeCube * findCubeForPosition(const meshOctreeCubeCoordinates &) const
return the pointer to the meshOctreeCube at the given position
Definition: meshOctreeModifierI.H:78
Foam::meshOctreeModifier::searchRangeAccess
scalar & searchRangeAccess()
return search range
Definition: meshOctreeModifierI.H:56
Foam::meshOctree::neiRange_
List< Pair< meshOctreeCubeCoordinates > > neiRange_
Definition: meshOctree.H:68
Foam::meshOctreeCubeCoordinates
Definition: meshOctreeCubeCoordinates.H:55
Foam::meshOctreeModifier::rootBoxAccess
boundBox & rootBoxAccess()
return rootBox
Definition: meshOctreeModifierI.H:46
Foam::meshOctree::dataSlots_
List< meshOctreeSlot > dataSlots_
List of slots containing data generated by each processor.
Definition: meshOctree.H:86
Foam::meshOctreeModifier::dataSlotsAccess
List< meshOctreeSlot > & dataSlotsAccess()
return octree slots
Definition: meshOctreeModifierI.H:72
meshOctreeModifier.H
Foam::LongList
Definition: LongList.H:55
Foam::meshOctreeModifier::findLeavesContainedInBox
void findLeavesContainedInBox(const boundBox &, DynList< const meshOctreeCube *, 256 > &) const
find leaves contained in a given boundBox
Definition: meshOctreeModifierI.H:86
Foam::meshOctreeModifier::neiProcsAccess
labelList & neiProcsAccess()
return neighbour processors
Definition: meshOctreeModifierI.H:41
Foam::meshOctreeModifier::isRootInitialisedAccess
bool & isRootInitialisedAccess()
return isRootInitialised_
Definition: meshOctreeModifierI.H:51
Foam::meshOctree::leaves_
LongList< meshOctreeCube * > leaves_
list of cubes which are leaves of the octree
Definition: meshOctree.H:89
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::meshOctree::neiProcs_
labelList neiProcs_
Definition: meshOctree.H:63
Foam::DynList
Definition: DynList.H:53
Foam::meshOctree::rootBox_
boundBox rootBox_
Definition: meshOctree.H:73
Foam::meshOctreeModifier::octree
const meshOctree & octree() const
return octree
Definition: meshOctreeModifierI.H:36
Foam::meshOctreeModifier::initialCubeAccess
meshOctreeCube & initialCubeAccess()
return initial cube
Definition: meshOctreeModifierI.H:67
Foam::meshOctree::isRootInitialised_
bool isRootInitialised_
Definition: meshOctree.H:74
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::meshOctree
Definition: meshOctree.H:55
Foam::meshOctreeCube
Definition: meshOctreeCube.H:56
Foam::boundBox
A bounding box defined in terms of the points at its extremities.
Definition: boundBox.H:55
Foam::meshOctree::initialCubePtr_
meshOctreeCube * initialCubePtr_
Root cube of the octree structure.
Definition: meshOctree.H:71
Foam::meshOctreeModifier::neiRangeAccess
List< Pair< meshOctreeCubeCoordinates > > & neiRangeAccess()
return the range of leaves at each processor
Definition: meshOctreeModifierI.H:62
Foam::meshOctree::searchRange_
scalar searchRange_
octree search range
Definition: meshOctree.H:77
Foam::meshOctreeCube::findLeaves
void findLeaves(LongList< meshOctreeCube * > &leaves) const
find leaves for a given cube
Definition: meshOctreeCubeRecursiveFunctions.C:184
Foam::DynList::clear
void clear()
Clear the list, i.e. set next free to zero.
Definition: DynListI.H:279
Foam::meshOctreeModifier::createListOfLeaves
void createListOfLeaves()
create leaves
Definition: meshOctreeModifierI.H:100
Foam::meshOctreeModifier::leavesAccess
LongList< meshOctreeCube * > & leavesAccess()
return leaves
Definition: meshOctreeModifierI.H:95
Foam::meshOctreeModifier::octree_
meshOctree & octree_
Reference to the octree.
Definition: meshOctreeModifier.H:52