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
34e52b8c
Commit
34e52b8c
authored
May 13, 2016
by
Franjo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'task-qualityControls' into development
parents
87b7c279
771a8434
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1515 additions
and
37 deletions
+1515
-37
.gitignore
.gitignore
+4
-1
meshLibrary/utilities/checkMeshDict/checkMeshDict.C
meshLibrary/utilities/checkMeshDict/checkMeshDict.C
+50
-0
meshLibrary/utilities/checkMeshDict/checkMeshDict.H
meshLibrary/utilities/checkMeshDict/checkMeshDict.H
+3
-0
meshLibrary/utilities/helperFunctions/helperFunctionsGeometryQueries.H
...tilities/helperFunctions/helperFunctionsGeometryQueries.H
+3
-0
meshLibrary/utilities/helperFunctions/helperFunctionsGeometryQueriesI.H
...ilities/helperFunctions/helperFunctionsGeometryQueriesI.H
+11
-0
meshLibrary/utilities/meshes/polyMeshGenChecks/polyMeshGenChecks.H
...ry/utilities/meshes/polyMeshGenChecks/polyMeshGenChecks.H
+69
-0
meshLibrary/utilities/meshes/polyMeshGenChecks/polyMeshGenChecksGeometry.C
...ties/meshes/polyMeshGenChecks/polyMeshGenChecksGeometry.C
+1351
-36
meshLibrary/utilities/smoothers/geometry/meshOptimizer/optimizeMeshFV.C
...ilities/smoothers/geometry/meshOptimizer/optimizeMeshFV.C
+12
-0
tutorials/cartesianMesh/bunnyOctree/system/meshDict
tutorials/cartesianMesh/bunnyOctree/system/meshDict
+7
-0
tutorials/cartesianMesh/intakePortOctree/system/meshDict
tutorials/cartesianMesh/intakePortOctree/system/meshDict
+5
-0
No files found.
.gitignore
View file @
34e52b8c
*.dep
*lnInclude*
*linux*
cfMesh
.
*
cfMesh*
**/lnInclude/*
**/Make/**/*
log
log.*
*~
meshLibrary/utilities/checkMeshDict/checkMeshDict.C
View file @
34e52b8c
...
...
@@ -764,6 +764,54 @@ void checkMeshDict::checkRenameBoundary() const
}
}
//Mesh quality criteria specified by the user
void
checkMeshDict
::
checkQualitySettings
()
const
{
if
(
meshDict_
.
found
(
"meshQualitySettings"
)
)
{
const
dictionary
&
qualityDict
=
meshDict_
.
subDict
(
"meshQualitySettings"
);
//- read maximum non-orthogonality defined by the user
if
(
qualityDict
.
found
(
"maxNonOrthogonality"
)
)
{
readScalar
(
qualityDict
.
lookup
(
"maxNonOrthogonality"
));
}
//- read maximum skewness defined by the user
if
(
qualityDict
.
found
(
"maxSkewness"
)
)
{
readScalar
(
qualityDict
.
lookup
(
"maxSkewness"
));
}
//- read minimum volume of the face pyramid defined by the user
if
(
qualityDict
.
found
(
"minPyramidVolume"
)
)
{
readScalar
(
qualityDict
.
lookup
(
"minPyramidVolume"
));
}
//- read face flatness defined by the user
if
(
qualityDict
.
found
(
"faceFlatness"
)
)
{
readScalar
(
qualityDict
.
lookup
(
"faceFlatness"
));
}
//- read minimum tetrahedral part of a cell defined by the user
if
(
qualityDict
.
found
(
"minCellPartTetrahedra"
)
)
{
readScalar
(
qualityDict
.
lookup
(
"minCellPartTetrahedra"
));
}
//- read minimum area of a face defined by the user
if
(
qualityDict
.
found
(
"minimumFaceArea"
)
)
{
readScalar
(
qualityDict
.
lookup
(
"minimumFaceArea"
));
}
}
}
void
checkMeshDict
::
checkEntries
()
const
{
checkBasicSettings
();
...
...
@@ -785,6 +833,8 @@ void checkMeshDict::checkEntries() const
checkBoundaryLayers
();
checkRenameBoundary
();
checkQualitySettings
();
}
void
checkMeshDict
::
updatePatchCellSize
...
...
meshLibrary/utilities/checkMeshDict/checkMeshDict.H
View file @
34e52b8c
...
...
@@ -92,6 +92,9 @@ class checkMeshDict
//- check renameBoundary entry
void
checkRenameBoundary
()
const
;
//- check entry for mesh quality
void
checkQualitySettings
()
const
;
//- perform all checks
void
checkEntries
()
const
;
...
...
meshLibrary/utilities/helperFunctions/helperFunctionsGeometryQueries.H
View file @
34e52b8c
...
...
@@ -289,6 +289,9 @@ namespace help
DynList
<
bool
>&
OkPoints
);
//- calculate quality metric of a tetrahedron
inline
scalar
tetQuality
(
const
tetrahedron
<
point
,
point
>&
tet
);
//- check if the vertex is on the positive side of the face plane
inline
bool
isVertexVisible
(
const
point
&
p
,
const
plane
&
pl
);
...
...
meshLibrary/utilities/helperFunctions/helperFunctionsGeometryQueriesI.H
View file @
34e52b8c
...
...
@@ -1612,6 +1612,17 @@ inline bool isFaceConvexAndOk
return
valid
;
}
inline
scalar
tetQuality
(
const
tetrahedron
<
point
,
point
>&
tet
)
{
return
tet
.
mag
()
/
(
8.0
/
(
9.0
*
sqrt
(
3.0
))
*
pow3
(
min
(
tet
.
circumRadius
(),
GREAT
))
+
ROOTVSMALL
);
}
inline
point
nearestPointOnTheEdge
(
const
point
&
edgePoint0
,
...
...
meshLibrary/utilities/meshes/polyMeshGenChecks/polyMeshGenChecks.H
View file @
34e52b8c
...
...
@@ -82,6 +82,66 @@ bool checkFaceAreas
const
boolList
*
changedFacePtr
=
NULL
);
//- Check quality of tetrahedra
bool
checkTetQuality
(
const
polyMeshGen
&
,
const
bool
report
=
false
,
const
scalar
minTetQuality
=
VSMALL
,
labelHashSet
*
setPtr
=
NULL
,
const
boolList
*
changedFacePtr
=
NULL
);
//- Check minimum face twist
bool
checkMinTwist
(
const
polyMeshGen
&
,
const
bool
report
=
false
,
const
scalar
minTwist
=
VSMALL
,
labelHashSet
*
setPtr
=
NULL
,
const
boolList
*
changedFacePtr
=
NULL
);
//- Check the area of internal faces versus boundary faces
bool
checkCellDeterminant
(
const
polyMeshGen
&
,
const
bool
report
=
false
,
const
scalar
warnDet
=
1e-3
,
labelHashSet
*
setPtr
=
NULL
,
const
boolList
*
changedFacePtr
=
NULL
);
//- Check volume ratio
void
checkMinVolRatio
(
const
polyMeshGen
&
,
scalarField
&
,
const
boolList
*
changedFacePtr
=
NULL
);
bool
checkMinVolRatio
(
const
polyMeshGen
&
,
const
bool
report
=
false
,
const
scalar
warnVolRatio
=
0.01
,
labelHashSet
*
setPtr
=
NULL
,
const
boolList
*
changedFacePtr
=
NULL
);
//- Check face triangle twist
bool
checkTriangleTwist
(
const
polyMeshGen
&
,
const
bool
report
=
false
,
const
scalar
minTwist
=
VSMALL
,
labelHashSet
*
setPtr
=
NULL
,
const
boolList
*
changedFacePtr
=
NULL
);
//- Check for negative part tetrahedra
//- Cells are decomposed into tetrahedra formed by
//- the cell centre, face centre and the edge vertices
...
...
@@ -238,6 +298,15 @@ bool checkGeometry(const polyMeshGen&, const bool report = false);
//- Check mesh for correctness. Returns false for no error.
bool
checkMesh
(
const
polyMeshGen
&
,
const
bool
report
=
false
);
//- Read the user defined mesh quality settings
label
findBadFacesAdditionalChecks
(
const
polyMeshGen
&
mesh
,
const
bool
report
,
labelHashSet
&
badFaces
,
const
boolList
*
activeFacePtr
=
NULL
);
//- checks for bad faces making the mesh unusable
//- checks for negative pyramids and zero area faces
label
findBadFacesRelaxed
...
...
meshLibrary/utilities/meshes/polyMeshGenChecks/polyMeshGenChecksGeometry.C
View file @
34e52b8c
This diff is collapsed.
Click to expand it.
meshLibrary/utilities/smoothers/geometry/meshOptimizer/optimizeMeshFV.C
View file @
34e52b8c
...
...
@@ -292,8 +292,20 @@ void meshOptimizer::untangleMeshFV
mesh_
.
removeFaceSubset
(
subsetId
);
subsetId
=
mesh_
.
addFaceSubset
(
"badFaces"
);
const
labelList
&
owner
=
mesh_
.
owner
();
const
labelList
&
neighbour
=
mesh_
.
neighbour
();
const
label
badCellsId
=
mesh_
.
addCellSubset
(
"badCells"
);
forAllConstIter
(
labelHashSet
,
badFaces
,
it
)
{
mesh_
.
addFaceToSubset
(
subsetId
,
it
.
key
());
mesh_
.
addCellToSubset
(
badCellsId
,
owner
[
it
.
key
()]);
if
(
neighbour
[
it
.
key
()]
<
0
)
continue
;
mesh_
.
addCellToSubset
(
badCellsId
,
neighbour
[
it
.
key
()]);
}
}
Info
<<
"Finished untangling the mesh"
<<
endl
;
...
...
tutorials/cartesianMesh/bunnyOctree/system/meshDict
View file @
34e52b8c
...
...
@@ -68,4 +68,11 @@ objectRefinements
}
}
meshQualitySettings
{
maxNonOrthogonality 30;
minTetQuality 1e-10;
}
// ************************************************************************* //
tutorials/cartesianMesh/intakePortOctree/system/meshDict
View file @
34e52b8c
...
...
@@ -60,5 +60,10 @@ localRefinement
cellSize 0.625;
}
}
meshQualitySettings
{
maxNonOrthogonality 50;
}
// ************************************************************************* //
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment