Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
b00498ba
Commit
b00498ba
authored
Sep 05, 2018
by
mattijs
Browse files
ENH: blockMesh: write to specified directory. Fixes
#981
.
parent
236684b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/generation/blockMesh/blockMesh.C
View file @
b00498ba
...
...
@@ -55,6 +55,9 @@ Usage
- \par -noClean
Do not remove any existing polyMesh/ directory or files
- \par -time
Write resulting mesh to a time directory (instead of constant)
\*---------------------------------------------------------------------------*/
#include
"Time.H"
...
...
@@ -125,6 +128,12 @@ int main(int argc, char *argv[])
"sets"
,
"Write cellZones as cellSets too (for processing purposes)"
);
argList
::
addOption
(
"time"
,
"time"
,
"specify a time to write mesh to"
);
#include
"addRegionOption.H"
#include
"setRootCase.H"
...
...
@@ -193,11 +202,22 @@ int main(int argc, char *argv[])
// Instance for resulting mesh
word
meshInstance
(
runTime
.
constant
());
if
(
args
.
readIfPresent
(
"time"
,
meshInstance
))
{
Info
<<
"Writing polyMesh to "
<<
meshInstance
<<
nl
<<
endl
;
// Make sure that the time is seen to be the current time. This
// is the logic inside regIOobject which resets the instance to the
// current time before writting
runTime
.
setTime
(
instant
(
meshInstance
),
0
);
}
if
(
!
args
.
found
(
"noClean"
))
{
fileName
polyMeshPath
(
runTime
.
path
()
/
runTime
.
co
nstan
t
()
/
regionPath
/
polyMesh
::
meshSubDir
runTime
.
path
()
/
meshI
nstan
ce
/
regionPath
/
polyMesh
::
meshSubDir
);
if
(
exists
(
polyMeshPath
))
...
...
@@ -228,7 +248,7 @@ int main(int argc, char *argv[])
IOobject
(
regionName
,
runTime
.
co
nstan
t
()
,
meshI
nstan
ce
,
runTime
),
pointField
(
blocks
.
points
()),
// Copy, could we re-use space?
...
...
Write
Preview
Supports
Markdown
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