Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenFOAM-plus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Development
OpenFOAM-plus
Commits
5235ed7b
Commit
5235ed7b
authored
6 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: snappyHexMesh: user size limit. See
#972
.
parent
10db90df
No related branches found
No related tags found
1 merge request
!229
Feature snappy hex mesh check
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
+13
-8
13 additions, 8 deletions
...s/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C
+10
-8
10 additions, 8 deletions
src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C
with
23 additions
and
16 deletions
applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
+
13
−
8
View file @
5235ed7b
...
...
@@ -858,6 +858,11 @@ int main(int argc, char *argv[])
writer
<
scalar
>::
New
(
setFormat
)
);
const
scalar
maxSizeRatio
(
meshDict
.
lookupOrDefault
<
scalar
>
(
"maxSizeRatio"
,
100
.
0
)
);
// Read decomposePar dictionary
dictionary
decomposeDict
;
...
...
@@ -1121,10 +1126,10 @@ int main(int argc, char *argv[])
// Check geometry
allGeometry
.
checkGeometry
(
100
.
0
,
// max size ratio
1e-9
,
// intersection tolerance
maxSizeRatio
,
// max size ratio
1e-9
,
// intersection tolerance
setFormatter
,
0
.
01
,
// min triangle quality
0
.
01
,
// min triangle quality
true
);
...
...
@@ -1146,12 +1151,12 @@ int main(int argc, char *argv[])
const
boundBox
&
bb
=
s
.
bounds
();
scalar
ratio
=
bb
.
mag
()
/
meshBb
.
mag
();
if
(
ratio
>
100
.
0
||
ratio
<
1
.
0
/
100
.
0
)
if
(
ratio
>
maxSizeRatio
||
ratio
<
1
.
0
/
maxSizeRatio
)
{
Warning
<<
" "
<<
allGeometry
.
names
()[
geomi
]
<<
" bounds differ from mesh"
<<
" by more than a factor
100
:"
<<
nl
<<
" by more than a factor
"
<<
maxSizeRatio
<<
"
:"
<<
nl
<<
" bounding box : "
<<
bb
<<
nl
<<
" mesh bounding box : "
<<
meshBb
<<
endl
;
...
...
@@ -1259,10 +1264,10 @@ int main(int argc, char *argv[])
OStringStream
os
;
bool
hasErrors
=
features
.
checkSizes
(
100
.
0
,
//const scalar maxRatio,
maxSizeRatio
,
//const scalar maxRatio,
mesh
.
bounds
(),
true
,
//const bool report,
os
//FatalIOError
true
,
//const bool report,
os
//FatalIOError
);
if
(
hasErrors
)
{
...
...
This diff is collapsed.
Click to expand it.
src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C
+
10
−
8
View file @
5235ed7b
...
...
@@ -143,8 +143,9 @@ bool Foam::motionSmootherAlgo::checkMesh
<<
"Missing/incorrect required dictionary entries:"
<<
nl
<<
nl
<<
IOerrorMsg
.
c_str
()
<<
nl
<<
errorMsg
.
c_str
()
<<
nl
<<
nl
<<
"Exiting dry-run"
<<
nl
<<
endl
;
<<
errorMsg
.
c_str
()
<<
nl
//<< nl << "Exiting dry-run" << nl
<<
endl
;
FatalError
.
clear
();
FatalIOError
.
clear
();
...
...
@@ -576,17 +577,18 @@ bool Foam::motionSmootherAlgo::checkMesh
if
(
errorMsg
.
size
()
||
IOerrorMsg
.
size
())
{
errorMsg
=
"[dryRun] "
+
errorMsg
;
errorMsg
.
replaceAll
(
"
\n
"
,
"
\n
[dryRun] "
);
IOerrorMsg
=
"[dryRun] "
+
IOerrorMsg
;
IOerrorMsg
.
replaceAll
(
"
\n
"
,
"
\n
[dryRun] "
);
//
errorMsg = "[dryRun] " + errorMsg;
//
errorMsg.replaceAll("\n", "\n[dryRun] ");
//
IOerrorMsg = "[dryRun] " + IOerrorMsg;
//
IOerrorMsg.replaceAll("\n", "\n[dryRun] ");
Perr
<<
nl
<<
"Missing/incorrect required dictionary entries:"
<<
nl
<<
nl
<<
IOerrorMsg
.
c_str
()
<<
nl
<<
errorMsg
.
c_str
()
<<
nl
<<
nl
<<
"Exiting dry-run"
<<
nl
<<
endl
;
<<
errorMsg
.
c_str
()
<<
nl
//<< nl << "Exiting dry-run" << nl
<<
endl
;
FatalError
.
clear
();
FatalIOError
.
clear
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment