meshOptimizerOptimizeSurface.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 "demandDrivenData.H"
29 #include "meshOptimizer.H"
30 #include "meshSurfaceEngine.H"
31 #include "meshSurfaceOptimizer.H"
32 #include "meshSurfaceMapper.H"
33 #include "meshOctree.H"
34 
35 // #define DEBUGSearch
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 namespace Foam
40 {
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
45 {
46  Info << "Optimizing positions of surface nodes" << endl;
47 
48  meshSurfaceEngine& mse = const_cast<meshSurfaceEngine&>(meshSurface());
50 
52  surfaceOptimizer.enforceConstraints(badPointsSubsetName_);
53 
54  surfaceOptimizer.optimizeSurface();
55 
57 
58  clearSurface();
59 
60  Info << "Finished optimizing positions of surface nodes" << endl;
61 }
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 } // End namespace Foam
66 
67 // ************************************************************************* //
meshSurfaceMapper.H
demandDrivenData.H
Template functions to aid in the implementation of demand driven data.
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
meshOctree.H
Foam::meshOptimizer::enforceConstraints_
bool enforceConstraints_
enforce constraints
Definition: meshOptimizer.H:76
Foam::Info
messageStream Info
Foam::meshOptimizer::clearSurface
void clearSurface()
Definition: meshOptimizer.C:53
Foam::meshSurfaceMapper::mapVerticesOntoSurfacePatches
void mapVerticesOntoSurfacePatches()
Definition: meshSurfaceMapperMapVertices.C:285
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
meshSurfaceEngine.H
Foam::meshOptimizer::badPointsSubsetName_
word badPointsSubsetName_
name of the subset contaning tangled points
Definition: meshOptimizer.H:79
Foam::surfaceOptimizer
Definition: surfaceOptimizer.H:50
Foam::meshSurfaceOptimizer
Definition: meshSurfaceOptimizer.H:63
Foam::meshSurfaceMapper
Definition: meshSurfaceMapper.H:59
Foam::meshOctree
Definition: meshOctree.H:55
meshOptimizer.H
Foam::meshOptimizer::optimizeSurface
void optimizeSurface(const meshOctree &)
smooth surface vertices
Definition: meshOptimizerOptimizeSurface.C:44
Foam::meshOptimizer::meshSurface
const meshSurfaceEngine & meshSurface() const
return mesh surface
Definition: meshOptimizer.C:45
meshSurfaceOptimizer.H
Foam::meshSurfaceEngine
Definition: meshSurfaceEngine.H:54