Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
e8843a35
Commit
e8843a35
authored
Oct 14, 2008
by
Mark Olesen
Browse files
foamToEnsightParts: add -noMesh option
parent
58c6aa7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C
View file @
e8843a35
...
...
@@ -43,6 +43,10 @@ Usage
Ignore the time index contained in the time file and use a
simple indexing when creating the @c Ensight/data/######## files.
@param -noMesh \n
Suppress writing the geometry. Can be useful for converting partial
results for a static geometry.
Note
- no parallel data.
- writes to @a Ensight directory to avoid collisions with foamToEnsight.
...
...
@@ -75,6 +79,7 @@ int main(int argc, char *argv[])
argList
::
noParallel
();
argList
::
validOptions
.
insert
(
"ascii"
,
""
);
argList
::
validOptions
.
insert
(
"index"
,
"start"
);
argList
::
validOptions
.
insert
(
"noMesh"
,
""
);
const
word
volFieldTypes
[]
=
{
...
...
@@ -118,6 +123,9 @@ int main(int argc, char *argv[])
indexingNumber
=
readLabel
(
IStringStream
(
args
.
options
()[
"index"
])());
}
// always write the geometry, unless the -noMesh option is specified
bool
optNoMesh
=
args
.
options
().
found
(
"noMesh"
);
fileName
ensightDir
=
args
.
rootPath
()
/
args
.
globalCaseName
()
/
"Ensight"
;
fileName
dataDir
=
ensightDir
/
"data"
;
fileName
caseFileName
=
"Ensight.case"
;
...
...
@@ -160,6 +168,13 @@ int main(int argc, char *argv[])
# include "findFields.H"
# include "validateFields.H"
if
(
hasMovingMesh
&&
optNoMesh
)
{
Info
<<
"mesh is moving: ignoring '-noMesh' option"
<<
endl
;
optNoMesh
=
false
;
}
// map times used
Map
<
scalar
>
timeIndices
;
...
...
@@ -206,15 +221,18 @@ int main(int argc, char *argv[])
partsList
.
recalculate
(
mesh
);
}
fileName
geomDir
;
if
(
hasMovingMesh
)
if
(
!
optNoMesh
)
{
geomDir
=
dataDir
/
subDir
;
}
fileName
geomDir
;
if
(
hasMovingMesh
)
{
geomDir
=
dataDir
/
subDir
;
}
ensightGeoFile
geoFile
(
ensightDir
/
geomDir
/
geometryName
,
format
);
partsList
.
writeGeometry
(
geoFile
);
Info
<<
nl
;
ensightGeoFile
geoFile
(
ensightDir
/
geomDir
/
geometryName
,
format
);
partsList
.
writeGeometry
(
geoFile
);
Info
<<
nl
;
}
}
Info
<<
"write volume field ("
<<
flush
;
...
...
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