Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
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
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
e8843a35
Commit
e8843a35
authored
16 years ago
by
Mark Olesen
Browse files
Options
Downloads
Patches
Plain Diff
foamToEnsightParts: add -noMesh option
parent
58c6aa7b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C
+25
-7
25 additions, 7 deletions
...ng/dataConversion/foamToEnsightParts/foamToEnsightParts.C
with
25 additions
and
7 deletions
applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C
+
25
−
7
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
;
...
...
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