meshOctreeCreator.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 "meshOctreeCreator.H"
29 #include "triSurf.H"
30 #include "boundBox.H"
31 #include "demandDrivenData.H"
32 
33 
34 // #define DEBUGSearch
35 
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 
38 namespace Foam
39 {
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 :
45  octree_(mo),
46  scalingFactor_(1.0),
47  meshDictPtr_(NULL),
48  hexRefinement_(false),
49  globalRefLevel_(0),
50  surfRefLevel_(mo.surface().size())
51 {}
52 
54 (
55  meshOctree& mo,
56  const IOdictionary& dict
57 )
58 :
59  octree_(mo),
60  scalingFactor_(1.0),
61  meshDictPtr_(&dict),
62  hexRefinement_(false),
63  globalRefLevel_(0),
64  surfRefLevel_(mo.surface().size())
65 {}
66 
67 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
68 
70 {}
71 
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73 
75 {
76  scalingFactor_ = s;
77 }
78 
80 {
81  hexRefinement_ = true;
82 }
83 
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85 
86 } // End namespace Foam
87 
88 // ************************************************************************* //
Foam::meshOctreeCreator::setScalingFactor
void setScalingFactor(const scalar)
set the scaling factor
Definition: meshOctreeCreator.C:74
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
triSurf.H
Foam::meshOctreeCreator::scalingFactor_
scalar scalingFactor_
Scaling factor.
Definition: meshOctreeCreator.H:66
demandDrivenData.H
Template functions to aid in the implementation of demand driven data.
Foam::meshOctreeCreator::~meshOctreeCreator
~meshOctreeCreator()
Definition: meshOctreeCreator.C:69
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::meshOctreeCreator::meshOctreeCreator
meshOctreeCreator(const meshOctreeCreator &)
Disallow default bitwise copy construct.
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
s
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
boundBox.H
Foam::triSurfFacets::size
label size() const
return the number of triangles
Definition: triSurfFacetsI.H:39
Foam::meshOctree
Definition: meshOctree.H:55
Foam::surface
Definition: surface.H:55
Foam::meshOctreeCreator::activateHexRefinement
void activateHexRefinement()
Definition: meshOctreeCreator.C:79
meshOctreeCreator.H
Foam::meshOctree::surface
const triSurf & surface() const
return a reference to the surface
Definition: meshOctreeI.H:130
Foam::meshOctreeCreator::hexRefinement_
bool hexRefinement_
hex refinement flag
Definition: meshOctreeCreator.H:72