meshSurfaceEdgeExtractorFUN.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 
29 #include "meshSurfaceEngine.H"
30 #include "demandDrivenData.H"
31 
32 # ifdef USE_OMP
33 #include <omp.h>
34 # endif
35 
36 // #define DEBUGSearch
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 namespace Foam
41 {
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
46 {
47  # ifdef USE_OMP
48  if( omp_in_parallel() )
50  (
51  "meshSurfaceEngine& meshSurfaceEdgeExtractorFUN::surfaceEngine()"
52  ) << "Cannot create surface engine with a parallel region"
53  << exit(FatalError);
54  # endif
55 
56  if( !surfaceEnginePtr_ )
58 
59  return *surfaceEnginePtr_;
60 }
61 
63 {
65 }
66 
67 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
68 
69 // Construct from mesh and octree
71 (
73  const meshOctree& octree,
74  const bool createWrapperSheet
75 )
76 :
77  mesh_(mesh),
78  meshOctree_(octree),
79  surfaceEnginePtr_(NULL),
80  createWrapperSheet_(createWrapperSheet)
81 {
82  if( Pstream::parRun() )
84  (
85  "meshSurfaceEdgeExtractorFUN::meshSurfaceEdgeExtractorFUN"
86  "(polyMeshGen&, const meshOctree&)"
87  ) << "Cannot run in parallel!" << exit(FatalError);
88 
89  createBasicFundamentalSheets();
90 
91  smoothMeshSurface();
92 
93  remapBoundaryPoints();
94 }
95 
96 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
97 
99 {
101 }
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 } // End namespace Foam
106 
107 // ************************************************************************* //
Foam::meshSurfaceEdgeExtractorFUN::~meshSurfaceEdgeExtractorFUN
~meshSurfaceEdgeExtractorFUN()
Definition: meshSurfaceEdgeExtractorFUN.C:98
meshSurfaceEdgeExtractorFUN.H
Foam::meshSurfaceEdgeExtractorFUN::surfaceEnginePtr_
meshSurfaceEngine * surfaceEnginePtr_
mesh surface pointer
Definition: meshSurfaceEdgeExtractorFUN.H:64
demandDrivenData.H
Template functions to aid in the implementation of demand driven data.
Foam::UPstream::parRun
static bool & parRun()
Is this a parallel run?
Definition: UPstream.H:377
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::meshSurfaceEdgeExtractorFUN::clearOut
void clearOut()
clear mesh suirface engine
Definition: meshSurfaceEdgeExtractorFUN.C:62
Foam::deleteDemandDrivenData
void deleteDemandDrivenData(DataPtr &dataPtr)
Definition: demandDrivenData.H:40
Foam::meshSurfaceEdgeExtractorFUN::mesh_
polyMeshGen & mesh_
mesh
Definition: meshSurfaceEdgeExtractorFUN.H:58
Foam::meshSurfaceEdgeExtractorFUN::surfaceEngine
meshSurfaceEngine & surfaceEngine()
return reference to surface engine
Definition: meshSurfaceEdgeExtractorFUN.C:45
Foam::FatalError
error FatalError
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
meshSurfaceEngine.H
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
Foam::meshOctree
Definition: meshOctree.H:55
Foam::meshSurfaceEdgeExtractorFUN::meshSurfaceEdgeExtractorFUN
meshSurfaceEdgeExtractorFUN()
Disallow default construct.
FatalErrorIn
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Definition: error.H:313
Foam::meshSurfaceEngine
Definition: meshSurfaceEngine.H:54