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
41650787
Commit
41650787
authored
Oct 29, 2013
by
mattijs
Browse files
ENH: mesh tools: max write precision
parent
95c06af8
Changes
18
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C
View file @
41650787
...
...
@@ -540,7 +540,7 @@ void subsetMesh
Info
<<
"Writing refined mesh to time "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
mesh
.
write
();
refLevel
.
write
();
}
...
...
@@ -909,7 +909,7 @@ int main(int argc, char *argv[])
Info
<<
" Writing refined mesh to time "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
mesh
.
write
();
refLevel
.
write
();
}
...
...
@@ -980,7 +980,7 @@ int main(int argc, char *argv[])
<<
endl
;
// Write final mesh
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
mesh
.
write
();
refLevel
.
write
();
...
...
@@ -991,7 +991,7 @@ int main(int argc, char *argv[])
<<
endl
;
// Write final mesh. (will have been written already if writeMesh=true)
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
mesh
.
write
();
refLevel
.
write
();
}
...
...
applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
View file @
41650787
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -696,7 +696,7 @@ int main(int argc, char *argv[])
// Set the precision of the points data to 10
IOstream::defaultPrecision(
10
);
IOstream::defaultPrecision(
max(10u, IOstream::defaultPrecision())
);
Info<< "Writing polyMesh" << endl;
pShapeMesh.write();
...
...
applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C
View file @
41650787
...
...
@@ -747,7 +747,7 @@ int main(int argc, char *argv[])
);
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
Info
<<
"Writing polyMesh"
<<
endl
;
pShapeMesh
.
write
();
...
...
applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
View file @
41650787
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
2
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
3
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -1417,7 +1417,7 @@ int main(int argc, char *argv[])
mesh.setInstance(runTime.constant());
// Set the precision of the points data to 10
IOstream::defaultPrecision(
10
);
IOstream::defaultPrecision(
max(10u, IOstream::defaultPrecision())
);
Info<< nl << "Writing mesh to " << mesh.objectPath() << endl;
mesh.write();
...
...
applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
View file @
41650787
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -1543,7 +1543,7 @@ int main(int argc, char *argv[])
// Set the precision of the points data to 10
IOstream::defaultPrecision(
10
);
IOstream::defaultPrecision(
max(10u, IOstream::defaultPrecision())
);
// Zones
...
...
applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
View file @
41650787
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -862,7 +862,7 @@ int main(int argc, char *argv[])
);
// Set the precision of the points data to 10
IOstream::defaultPrecision(
10
);
IOstream::defaultPrecision(
max(10u, IOstream::defaultPrecision())
);
Info<< "Writing polyMesh" << endl;
pShapeMesh.write();
...
...
applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C
View file @
41650787
...
...
@@ -256,7 +256,7 @@ int main(int argc, char *argv[])
);
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
Info
<<
"Writing polyMesh"
<<
endl
;
pShapeMesh
.
write
();
...
...
applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C
View file @
41650787
...
...
@@ -60,7 +60,7 @@ int main(int argc, char *argv[])
sammMesh
makeMesh
(
args
[
1
],
runTime
,
scaleFactor
);
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
Info
<<
"Writing mesh"
<<
endl
;
makeMesh
.
writeMesh
();
...
...
applications/utilities/mesh/conversion/star3ToFoam/star3ToFoam.C
View file @
41650787
...
...
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
starMesh
makeMesh
(
args
[
1
],
runTime
,
scaleFactor
);
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
Info
<<
"Writing mesh"
<<
endl
;
makeMesh
.
writeMesh
();
...
...
applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C
View file @
41650787
...
...
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
}
// increase the precision of the points data
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
// remove extensions and/or trailing '.'
const
fileName
prefix
=
fileName
(
args
[
1
]).
lessExt
();
...
...
applications/utilities/mesh/generation/blockMesh/blockMeshApp.C
View file @
41650787
...
...
@@ -316,7 +316,7 @@ int main(int argc, char *argv[])
}
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
Info
<<
nl
<<
"Writing polyMesh"
<<
endl
;
mesh
.
removeFiles
();
...
...
applications/utilities/mesh/manipulation/autoPatch/autoPatch.C
View file @
41650787
...
...
@@ -248,8 +248,11 @@ int main(int argc, char *argv[])
{
mesh
.
setInstance
(
oldInstance
);
}
mesh
.
write
();
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
()));
mesh
.
write
();
Info
<<
"End
\n
"
<<
endl
;
...
...
applications/utilities/mesh/manipulation/createPatch/createPatch.C
View file @
41650787
...
...
@@ -872,7 +872,7 @@ int main(int argc, char *argv[])
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
if
(
!
overwrite
)
{
...
...
applications/utilities/mesh/manipulation/flattenMesh/flattenMesh.C
View file @
41650787
...
...
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
twoDCorr
.
correctPoints
(
points
);
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
Info
<<
"Writing points into directory "
<<
points
.
path
()
<<
nl
<<
endl
;
points
.
write
();
...
...
applications/utilities/mesh/manipulation/mirrorMesh/mirrorMesh.C
View file @
41650787
...
...
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
);
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
Info
<<
"Writing mirrored mesh"
<<
endl
;
mesh
.
mirrorMesh
().
write
();
...
...
applications/utilities/mesh/manipulation/rotateMesh/rotateMesh.C
View file @
41650787
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2013
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
points
=
transform
(
T
,
points
);
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
Info
<<
"Writing points into directory "
<<
points
.
path
()
<<
nl
<<
endl
;
points
.
write
();
...
...
applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C
View file @
41650787
...
...
@@ -472,7 +472,7 @@ int main(int argc, char *argv[])
}
Info
<<
nl
<<
"Writing polyMesh to time "
<<
runTime
.
timeName
()
<<
endl
;
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
// Bypass runTime write (since only writes at outputTime)
if
...
...
applications/utilities/mesh/manipulation/transformPoints/transformPoints.C
View file @
41650787
...
...
@@ -303,7 +303,7 @@ int main(int argc, char *argv[])
}
// Set the precision of the points data to 10
IOstream
::
defaultPrecision
(
10
);
IOstream
::
defaultPrecision
(
max
(
10u
,
IOstream
::
defaultPrecision
())
);
Info
<<
"Writing points into directory "
<<
points
.
path
()
<<
nl
<<
endl
;
points
.
write
();
...
...
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