Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Yuhao Liu
ogs
Commits
b17782d5
Commit
b17782d5
authored
11 years ago
by
Lars Bilke
Browse files
Options
Downloads
Plain Diff
Merge pull request #183 from TomFischer/OutputPrecisionChange
Output precision change
parents
cddbfb17
49889a76
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
FileIO/Legacy/MeshIO.cpp
+0
-2
0 additions, 2 deletions
FileIO/Legacy/MeshIO.cpp
FileIO/Legacy/OGSIOVer4.cpp
+4
-3
4 additions, 3 deletions
FileIO/Legacy/OGSIOVer4.cpp
FileIO/Writer.cpp
+2
-0
2 additions, 0 deletions
FileIO/Writer.cpp
with
6 additions
and
5 deletions
FileIO/Legacy/MeshIO.cpp
+
0
−
2
View file @
b17782d5
...
...
@@ -248,8 +248,6 @@ int MeshIO::write(std::ostream &out)
return
0
;
}
setPrecision
(
9
);
out
<<
"#FEM_MSH
\n
"
<<
"$PCS_TYPE
\n
"
<<
" NO_PCS
\n
"
...
...
This diff is collapsed.
Click to expand it.
FileIO/Legacy/OGSIOVer4.cpp
+
4
−
3
View file @
b17782d5
...
...
@@ -13,6 +13,7 @@
*/
#include
<iomanip>
#include
<limits>
#include
<sstream>
// ThirdParty/logog
...
...
@@ -575,7 +576,7 @@ void writeGLIFileV4 (const std::string& fname,
const
std
::
size_t
n_pnts
(
pnts
->
size
());
INFO
(
"GeoLib::writeGLIFileV4(): writing %d points to file %s."
,
n_pnts
,
fname
.
c_str
());
os
<<
"#POINTS"
<<
"
\n
"
;
os
.
precision
(
2
0
);
os
.
precision
(
std
::
numeric_limits
<
double
>::
digits1
0
);
for
(
std
::
size_t
k
(
0
);
k
<
n_pnts
;
k
++
)
{
os
<<
k
<<
" "
<<
*
((
*
pnts
)[
k
]);
if
(
pnt_vec
->
getNameOfElementByID
(
k
,
pnt_name
))
{
...
...
@@ -640,7 +641,7 @@ void writeAllDataToGLIFileV4 (const std::string& fname, const GeoLib::GEOObjects
os
<<
"#POINTS"
<<
"
\n
"
;
for
(
std
::
size_t
j
(
0
);
j
<
geo_names
.
size
();
j
++
)
{
os
.
precision
(
2
0
);
os
.
precision
(
std
::
numeric_limits
<
double
>::
digits1
0
);
GeoLib
::
PointVec
const
*
const
pnt_vec
(
geo
.
getPointVecObj
(
geo_names
[
j
]));
std
::
vector
<
GeoLib
::
Point
*>
const
*
const
pnts
(
pnt_vec
->
getVector
());
if
(
pnts
)
{
...
...
@@ -665,7 +666,7 @@ void writeAllDataToGLIFileV4 (const std::string& fname, const GeoLib::GEOObjects
geo
.
getStationVectorNames
(
stn_names
);
for
(
std
::
size_t
j
(
0
);
j
<
stn_names
.
size
();
j
++
)
{
os
.
precision
(
2
0
);
os
.
precision
(
std
::
numeric_limits
<
double
>::
digits1
0
);
const
std
::
vector
<
GeoLib
::
Point
*>*
pnts
(
geo
.
getStationVec
(
stn_names
[
j
]));
if
(
pnts
)
{
...
...
This diff is collapsed.
Click to expand it.
FileIO/Writer.cpp
+
2
−
0
View file @
b17782d5
...
...
@@ -16,6 +16,7 @@
#include
"Writer.h"
#include
<fstream>
#include
<limits>
namespace
FileIO
{
...
...
@@ -29,6 +30,7 @@ std::string Writer::writeToString()
// Empty stream and clear error states.
_out
.
str
(
""
);
_out
.
clear
();
_out
.
precision
(
std
::
numeric_limits
<
double
>::
digits10
);
if
(
this
->
write
(
_out
))
return
_out
.
str
();
...
...
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