Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
integration-cfmesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Community
integration-cfmesh
Commits
264432b6
Commit
264432b6
authored
May 13, 2016
by
Franjo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' into task-qualityControls
parents
a6960c7f
87b7c279
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
540 additions
and
390 deletions
+540
-390
meshLibrary/Make/options
meshLibrary/Make/options
+5
-9
meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C
...DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C
+101
-98
meshLibrary/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.C
...esianMesh/cartesianMeshGenerator/cartesianMeshGenerator.C
+88
-87
meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C
meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C
+85
-85
meshLibrary/utilities/octrees/meshOctree/meshOctreeCube/meshOctreeCubeCoordinatesI.H
...es/meshOctree/meshOctreeCube/meshOctreeCubeCoordinatesI.H
+13
-1
meshLibrary/utilities/octrees/meshOctree/meshOctreeModifier/meshOctreeModifierParallelRefinement.C
...meshOctreeModifier/meshOctreeModifierParallelRefinement.C
+11
-4
meshLibrary/utilities/octrees/meshOctree/meshOctreeModifier/meshOctreeModifierRefineSelectedBoxes.C
...eshOctreeModifier/meshOctreeModifierRefineSelectedBoxes.C
+4
-0
meshLibrary/utilities/smoothers/geometry/meshOptimizer/symmetryPlaneOptimisation/symmetryPlaneOptimisation.C
...zer/symmetryPlaneOptimisation/symmetryPlaneOptimisation.C
+69
-9
meshLibrary/utilities/smoothers/geometry/meshOptimizer/symmetryPlaneOptimisation/symmetryPlaneOptimisation.H
...zer/symmetryPlaneOptimisation/symmetryPlaneOptimisation.H
+1
-1
meshLibrary/utilities/surfaceTools/renameBoundaryPatches/renameBoundaryPatches.C
...urfaceTools/renameBoundaryPatches/renameBoundaryPatches.C
+31
-1
meshLibrary/utilities/surfaceTools/renameBoundaryPatches/renameBoundaryPatches.H
...urfaceTools/renameBoundaryPatches/renameBoundaryPatches.H
+11
-3
meshLibrary/utilities/triSurfaceTools/triSurfacePatchManipulator/triSurfacePatchManipulator.C
...s/triSurfacePatchManipulator/triSurfacePatchManipulator.C
+29
-0
meshLibrary/voronoiMesh/voronoiMeshGenerator/voronoiMeshGenerator.C
...y/voronoiMesh/voronoiMeshGenerator/voronoiMeshGenerator.C
+83
-83
tutorials/cartesianMesh/elbow_90degree/system/meshDict
tutorials/cartesianMesh/elbow_90degree/system/meshDict
+2
-2
tutorials/cartesianMesh/multipleOrifices/system/meshDict
tutorials/cartesianMesh/multipleOrifices/system/meshDict
+2
-2
tutorials/cartesianMesh/singleOrifice/system/meshDict
tutorials/cartesianMesh/singleOrifice/system/meshDict
+3
-3
tutorials/pMesh/multipleOrifices/system/meshDict
tutorials/pMesh/multipleOrifices/system/meshDict
+2
-2
No files found.
meshLibrary/Make/options
View file @
264432b6
#if defined(__GNUC__)
# if defined(darwinIntel64)
OMP_FLAGS =
# else
OMP_FLAGS = -DUSE_OMP -fopenmp
# endif
#else
OMP_FLAGS =
#endif
ifeq (Gcc,$(findstring Gcc,$(WM_COMPILER)))
OMP_FLAGS = -DUSE_OMP -fopenmp
else
OMP_FLAGS =
endif
EXE_INC = \
$(OMP_FLAGS) \
...
...
meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C
View file @
264432b6
...
...
@@ -188,7 +188,7 @@ void cartesian2DMeshGenerator::refBoundaryLayers()
void
cartesian2DMeshGenerator
::
replaceBoundaries
()
{
renameBoundaryPatches
rbp
(
mesh_
,
meshDict_
);
renameBoundaryPatches
rbp
(
mesh_
,
meshDict_
,
true
);
}
void
cartesian2DMeshGenerator
::
renumberMesh
()
...
...
@@ -198,67 +198,53 @@ void cartesian2DMeshGenerator::renumberMesh()
void
cartesian2DMeshGenerator
::
generateMesh
()
{
try
if
(
controller_
.
runCurrentStep
(
"templateGeneration"
)
)
{
if
(
controller_
.
runCurrentStep
(
"templateGeneration"
)
)
{
createCartesianMesh
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceTopology"
)
)
{
surfacePreparation
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceProjection"
)
)
{
mapMeshToSurface
();
}
if
(
controller_
.
runCurrentStep
(
"patchAssignment"
)
)
{
extractPatches
();
}
if
(
controller_
.
runCurrentStep
(
"edgeExtraction"
)
)
{
mapEdgesAndCorners
();
optimiseMeshSurface
();
}
createCartesianMesh
();
}
if
(
controller_
.
runCurrentStep
(
"boundaryLayerGeneration
"
)
)
{
generateBoundaryLayers
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceTopology
"
)
)
{
surfacePreparation
();
}
if
(
controller_
.
runCurrentStep
(
"meshOptimisa
tion"
)
)
{
optimiseMesh
Surface
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceProjec
tion"
)
)
{
mapMeshTo
Surface
();
}
if
(
controller_
.
runCurrentStep
(
"boundaryLayerRefine
ment"
)
)
{
refBoundaryLayer
s
();
}
if
(
controller_
.
runCurrentStep
(
"patchAssign
ment"
)
)
{
extractPatche
s
();
}
renumberMesh
();
if
(
controller_
.
runCurrentStep
(
"edgeExtraction"
)
)
{
mapEdgesAndCorners
();
replaceBoundaries
();
optimiseMeshSurface
();
}
controller_
.
workflowCompleted
();
if
(
controller_
.
runCurrentStep
(
"boundaryLayerGeneration"
)
)
{
generateBoundaryLayers
();
}
catch
(
const
std
::
string
&
message
)
if
(
controller_
.
runCurrentStep
(
"meshOptimisation"
)
)
{
Info
<<
message
<<
endl
;
optimiseMeshSurface
()
;
}
catch
(...)
if
(
controller_
.
runCurrentStep
(
"boundaryLayerRefinement"
)
)
{
WarningIn
(
"void cartesian2DMeshGenerator::generateMesh()"
)
<<
"Meshing process terminated!"
<<
endl
;
refBoundaryLayers
();
}
renumberMesh
();
replaceBoundaries
();
controller_
.
workflowCompleted
();
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
...
...
@@ -283,70 +269,87 @@ cartesian2DMeshGenerator::cartesian2DMeshGenerator(const Time& time)
mesh_
(
time
),
controller_
(
mesh_
)
{
if
(
true
)
try
{
checkMeshDict
cmd
(
meshDict_
);
}
fileName
surfaceFile
=
meshDict_
.
lookup
(
"surfaceFile"
);
if
(
Pstream
::
parRun
()
)
surfaceFile
=
".."
/
surfaceFile
;
if
(
true
)
{
checkMeshDict
cmd
(
meshDict_
);
}
surfacePtr_
=
new
triSurf
(
db_
.
path
()
/
surfaceFile
);
fileName
surfaceFile
=
meshDict_
.
lookup
(
"surfaceFile"
);
if
(
Pstream
::
parRun
()
)
surfaceFile
=
".."
/
surfaceFile
;
if
(
true
)
{
//- save meta data with the mesh (surface mesh + its topology info)
triSurfaceMetaData
sMetaData
(
*
surfacePtr_
);
const
dictionary
&
surfMetaDict
=
sMetaData
.
metaData
();
surfacePtr_
=
new
triSurf
(
db_
.
path
()
/
surfaceFile
);
mesh_
.
metaData
().
add
(
"surfaceFile"
,
surfaceFile
,
true
);
mesh_
.
metaData
().
add
(
"surfaceMeta"
,
surfMetaDict
,
true
);
triSurface2DCheck
surfCheck
(
*
surfacePtr_
);
if
(
!
surfCheck
.
is2DSurface
()
)
if
(
true
)
{
surfCheck
.
createSubsets
();
//- save meta data with the mesh (surface mesh + its topology info)
triSurfaceMetaData
sMetaData
(
*
surfacePtr_
);
const
dictionary
&
surfMetaDict
=
sMetaData
.
metaData
();
mesh_
.
metaData
().
add
(
"surfaceFile"
,
surfaceFile
,
true
);
mesh_
.
metaData
().
add
(
"surfaceMeta"
,
surfMetaDict
,
true
);
triSurface2DCheck
surfCheck
(
*
surfacePtr_
);
if
(
!
surfCheck
.
is2DSurface
()
)
{
surfCheck
.
createSubsets
();
Info
<<
"Writting surface with subsets to file "
<<
"badSurfaceWithSubsets.fms"
<<
endl
;
surfacePtr_
->
writeSurface
(
"badSurfaceWithSubsets.fms"
);
}
}
Info
<<
"Writting surface with subsets to file "
<<
"badSurfaceWithSubsets.fms"
<<
endl
;
surfacePtr_
->
writeSurface
(
"badSurfaceWithSubsets.fms"
);
if
(
surfacePtr_
->
featureEdges
().
size
()
!=
0
)
{
//- get rid of duplicate triangles as they cause strange problems
triSurfaceCleanupDuplicateTriangles
(
const_cast
<
triSurf
&>
(
*
surfacePtr_
)
);
//- create surface patches based on the feature edges
//- and update the meshDict based on the given data
triSurfacePatchManipulator
manipulator
(
*
surfacePtr_
);
const
triSurf
*
surfaceWithPatches
=
manipulator
.
surfaceWithPatches
(
&
meshDict_
);
//- delete the old surface and assign the new one
deleteDemandDrivenData
(
surfacePtr_
);
surfacePtr_
=
surfaceWithPatches
;
}
}
if
(
surfacePtr_
->
featureEdges
().
size
()
!=
0
)
{
//- get rid of duplicate triangles as they cause strange problems
triSurfaceCleanupDuplicateTriangles
(
const_cast
<
triSurf
&>
(
*
surfacePtr_
));
if
(
meshDict_
.
found
(
"anisotropicSources"
)
)
{
surfaceMeshGeometryModification
surfMod
(
*
surfacePtr_
,
meshDict_
);
//- create surface patches based on the feature edges
//- and update the meshDict based on the given data
triSurfacePatchManipulator
manipulator
(
*
surfacePtr_
);
modSurfacePtr_
=
surfMod
.
modifyGeometry
();
const
triSurf
*
surfaceWithPatches
=
manipulator
.
surfaceWithPatches
(
&
meshDict_
);
octreePtr_
=
new
meshOctree
(
*
modSurfacePtr_
,
true
);
}
else
{
octreePtr_
=
new
meshOctree
(
*
surfacePtr_
,
true
);
}
//- delete the old surface and assign the new one
deleteDemandDrivenData
(
surfacePtr_
);
surfacePtr_
=
surfaceWithPatches
;
}
meshOctreeCreator
(
*
octreePtr_
,
meshDict_
).
createOctreeBoxes
();
if
(
meshDict_
.
found
(
"anisotropicSources"
)
)
generateMesh
();
}
catch
(
const
std
::
string
&
message
)
{
surfaceMeshGeometryModification
surfMod
(
*
surfacePtr_
,
meshDict_
);
modSurfacePtr_
=
surfMod
.
modifyGeometry
();
octreePtr_
=
new
meshOctree
(
*
modSurfacePtr_
,
true
);
Info
<<
message
<<
endl
;
}
else
catch
(...)
{
octreePtr_
=
new
meshOctree
(
*
surfacePtr_
,
true
);
WarningIn
(
"cartesian2DMeshGenerator::cartesian2DMeshGenerator(const Time&)"
)
<<
"Meshing process terminated!"
<<
endl
;
}
meshOctreeCreator
(
*
octreePtr_
,
meshDict_
).
createOctreeBoxes
();
generateMesh
();
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
...
...
meshLibrary/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.C
View file @
264432b6
...
...
@@ -247,69 +247,55 @@ void cartesianMeshGenerator::renumberMesh()
void
cartesianMeshGenerator
::
generateMesh
()
{
try
if
(
controller_
.
runCurrentStep
(
"templateGeneration"
)
)
{
if
(
controller_
.
runCurrentStep
(
"templateGeneration"
)
)
{
createCartesianMesh
();
}
createCartesianMesh
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceTopology"
)
)
{
surfacePreparation
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceTopology"
)
)
{
surfacePreparation
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceProjection"
)
)
{
mapMeshToSurface
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceProjection"
)
)
{
mapMeshToSurface
();
}
if
(
controller_
.
runCurrentStep
(
"patchAssignment"
)
)
{
extractPatches
();
}
if
(
controller_
.
runCurrentStep
(
"patchAssignment"
)
)
{
extractPatches
();
}
if
(
controller_
.
runCurrentStep
(
"edgeExtraction"
)
)
{
mapEdgesAndCorners
();
if
(
controller_
.
runCurrentStep
(
"edgeExtraction"
)
)
{
mapEdgesAndCorners
();
optimiseMeshSurface
();
}
optimiseMeshSurface
();
}
if
(
controller_
.
runCurrentStep
(
"boundaryLayerGeneration"
)
)
{
generateBoundaryLayers
();
}
if
(
controller_
.
runCurrentStep
(
"boundaryLayerGeneration"
)
)
{
generateBoundaryLayers
();
}
if
(
controller_
.
runCurrentStep
(
"meshOptimisation"
)
)
{
optimiseFinalMesh
();
if
(
controller_
.
runCurrentStep
(
"meshOptimisation"
)
)
{
optimiseFinalMesh
();
projectSurfaceAfterBackScaling
();
}
projectSurfaceAfterBackScaling
();
}
if
(
controller_
.
runCurrentStep
(
"boundaryLayerRefinement"
)
)
{
refBoundaryLayers
();
}
if
(
controller_
.
runCurrentStep
(
"boundaryLayerRefinement"
)
)
{
refBoundaryLayers
();
}
renumberMesh
();
renumberMesh
();
replaceBoundaries
();
replaceBoundaries
();
controller_
.
workflowCompleted
();
}
catch
(
const
std
::
string
&
message
)
{
Info
<<
message
<<
endl
;
}
catch
(...)
{
WarningIn
(
"void cartesianMeshGenerator::generateMesh()"
)
<<
"Meshing process terminated!"
<<
endl
;
}
controller_
.
workflowCompleted
();
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
...
...
@@ -334,57 +320,72 @@ cartesianMeshGenerator::cartesianMeshGenerator(const Time& time)
mesh_
(
time
),
controller_
(
mesh_
)
{
if
(
true
)
try
{
checkMeshDict
cmd
(
meshDict_
);
}
if
(
true
)
{
checkMeshDict
cmd
(
meshDict_
);
}
fileName
surfaceFile
=
meshDict_
.
lookup
(
"surfaceFile"
);
if
(
Pstream
::
parRun
()
)
surfaceFile
=
".."
/
surfaceFile
;
fileName
surfaceFile
=
meshDict_
.
lookup
(
"surfaceFile"
);
if
(
Pstream
::
parRun
()
)
surfaceFile
=
".."
/
surfaceFile
;
surfacePtr_
=
new
triSurf
(
db_
.
path
()
/
surfaceFile
);
surfacePtr_
=
new
triSurf
(
db_
.
path
()
/
surfaceFile
);
if
(
true
)
{
//- save meta data with the mesh (surface mesh + its topology info)
triSurfaceMetaData
sMetaData
(
*
surfacePtr_
);
const
dictionary
&
surfMetaDict
=
sMetaData
.
metaData
();
if
(
true
)
{
//- save meta data with the mesh (surface mesh + its topology info)
triSurfaceMetaData
sMetaData
(
*
surfacePtr_
);
const
dictionary
&
surfMetaDict
=
sMetaData
.
metaData
();
mesh_
.
metaData
().
add
(
"surfaceFile"
,
surfaceFile
,
true
);
mesh_
.
metaData
().
add
(
"surfaceMeta"
,
surfMetaDict
,
true
);
}
mesh_
.
metaData
().
add
(
"surfaceFile"
,
surfaceFile
,
true
);
mesh_
.
metaData
().
add
(
"surfaceMeta"
,
surfMetaDict
,
true
);
}
if
(
surfacePtr_
->
featureEdges
().
size
()
!=
0
)
{
//- create surface patches based on the feature edges
//- and update the meshDict based on the given data
triSurfacePatchManipulator
manipulator
(
*
surfacePtr_
);
if
(
surfacePtr_
->
featureEdges
().
size
()
!=
0
)
{
//- create surface patches based on the feature edges
//- and update the meshDict based on the given data
triSurfacePatchManipulator
manipulator
(
*
surfacePtr_
);
const
triSurf
*
surfaceWithPatches
=
manipulator
.
surfaceWithPatches
(
&
meshDict_
);
const
triSurf
*
surfaceWithPatches
=
manipulator
.
surfaceWithPatches
(
&
meshDict_
);
//- delete the old surface and assign the new one
deleteDemandDrivenData
(
surfacePtr_
);
surfacePtr_
=
surfaceWithPatches
;
}
//- delete the old surface and assign the new one
deleteDemandDrivenData
(
surfacePtr_
);
surfacePtr_
=
surfaceWithPatches
;
}
if
(
meshDict_
.
found
(
"anisotropicSources"
)
)
{
surfaceMeshGeometryModification
surfMod
(
*
surfacePtr_
,
meshDict_
);
if
(
meshDict_
.
found
(
"anisotropicSources"
)
)
{
surfaceMeshGeometryModification
surfMod
(
*
surfacePtr_
,
meshDict_
);
modSurfacePtr_
=
surfMod
.
modifyGeometry
();
modSurfacePtr_
=
surfMod
.
modifyGeometry
();
octreePtr_
=
new
meshOctree
(
*
modSurfacePtr_
);
octreePtr_
=
new
meshOctree
(
*
modSurfacePtr_
);
}
else
{
octreePtr_
=
new
meshOctree
(
*
surfacePtr_
);
}
meshOctreeCreator
(
*
octreePtr_
,
meshDict_
).
createOctreeBoxes
();
generateMesh
();
}
catch
(
const
std
::
string
&
message
)
{
Info
<<
"Here"
<<
endl
;
Info
<<
message
<<
endl
;
}
else
catch
(...)
{
octreePtr_
=
new
meshOctree
(
*
surfacePtr_
);
WarningIn
(
"cartesianMeshGenerator::cartesianMeshGenerator(const Time&)"
)
<<
"Meshing process terminated!"
<<
endl
;
}
meshOctreeCreator
(
*
octreePtr_
,
meshDict_
).
createOctreeBoxes
();
generateMesh
();
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
...
...
meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C
View file @
264432b6
...
...
@@ -235,69 +235,55 @@ void tetMeshGenerator::renumberMesh()
void
tetMeshGenerator
::
generateMesh
()
{
try
if
(
controller_
.
runCurrentStep
(
"templateGeneration"
)
)
{
if
(
controller_
.
runCurrentStep
(
"templateGeneration"
)
)
{
createTetMesh
();
}
createTetMesh
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceTopology"
)
)
{
surfacePreparation
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceTopology"
)
)
{
surfacePreparation
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceProjection"
)
)
{
mapMeshToSurface
();
}
if
(
controller_
.
runCurrentStep
(
"surfaceProjection"
)
)
{
mapMeshToSurface
();
}
if
(
controller_
.
runCurrentStep
(
"patchAssignment"
)
)
{
extractPatches
();
}
if
(
controller_
.
runCurrentStep
(
"patchAssignment"
)
)
{
extractPatches
();
}
if
(
controller_
.
runCurrentStep
(
"edgeExtraction"
)
)
{
mapEdgesAndCorners
();
if
(
controller_
.
runCurrentStep
(
"edgeExtraction"
)
)
{
mapEdgesAndCorners
();
optimiseMeshSurface
();
}
optimiseMeshSurface
();
}
if
(
controller_
.
runCurrentStep
(
"boundaryLayerGeneration"
)
)
{
generateBoundaryLayers
();
}
if
(
controller_
.
runCurrentStep
(
"boundaryLayerGeneration"
)
)
{
generateBoundaryLayers
();
}
if
(
controller_
.
runCurrentStep
(
"meshOptimisation"
)
)
{
optimiseFinalMesh
();
if
(
controller_
.
runCurrentStep
(
"meshOptimisation"
)
)
{
optimiseFinalMesh
();
projectSurfaceAfterBackScaling
();
}
projectSurfaceAfterBackScaling
();
}
if
(
controller_
.
runCurrentStep
(
"boundaryLayerRefinement"
)
)
{
refBoundaryLayers
();
}
if
(
controller_
.
runCurrentStep
(
"boundaryLayerRefinement"
)
)
{
refBoundaryLayers
();
}
renumberMesh
();
renumberMesh
();
replaceBoundaries
();
replaceBoundaries
();
controller_
.
workflowCompleted
();
}
catch
(
const
std
::
string
&
message
)
{
Info
<<
message
<<
endl
;
}
catch
(...)
{
WarningIn
(
"void tetMeshGenerator::generateMesh()"
)
<<
"Meshing process terminated!"
<<
endl
;
}
controller_
.
workflowCompleted
();
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
...
...
@@ -323,55 +309,69 @@ tetMeshGenerator::tetMeshGenerator(const Time& time)
mesh_
(
time
),
controller_
(
mesh_
)
{
if
(
true
)
try
{
checkMeshDict
cmd
(
meshDict_
);
}
if
(
true
)
{
checkMeshDict
cmd
(
meshDict_
);
}
const
fileName
surfaceFile
=
meshDict_
.
lookup
(
"surfaceFile"
);
const
fileName
surfaceFile
=
meshDict_
.
lookup
(
"surfaceFile"
);
surfacePtr_
=
new
triSurf
(
runTime_
.
path
()
/
surfaceFile
);