Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_io
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_io
Commits
d9b62ea7
Commit
d9b62ea7
authored
May 01, 2019
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing metadata in binary format
parent
d0d5ac78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
src/VTKWriter/VTKWriter_point_set.hpp
src/VTKWriter/VTKWriter_point_set.hpp
+9
-3
src/VTKWriter/VTKWriter_unit_tests.hpp
src/VTKWriter/VTKWriter_unit_tests.hpp
+3
-0
No files found.
src/VTKWriter/VTKWriter_point_set.hpp
View file @
d9b62ea7
...
...
@@ -343,7 +343,7 @@ class VTKWriter<pair,VECTOR_POINTS>
* \param meta_data string with the meta-data to add
*
*/
std
::
string
add_meta_data
(
std
::
string
&
meta_data
)
std
::
string
add_meta_data
(
std
::
string
&
meta_data
,
file_type
&
opt
)
{
std
::
string
meta_string
;
...
...
@@ -362,7 +362,13 @@ class VTKWriter<pair,VECTOR_POINTS>
{
meta_string
+=
"FIELD FieldData 1
\n
"
;
meta_string
+=
"TIME 1 1 double
\n
"
;
meta_string
+=
std
::
to_string
(
time
);
if
(
opt
==
file_type
::
ASCII
)
{
meta_string
+=
std
::
to_string
(
time
);}
else
{
time
=
swap_endian_lt
(
time
);
meta_string
.
append
((
const
char
*
)
&
time
,
sizeof
(
double
));
}
meta_string
+=
"
\n
"
;
}
...
...
@@ -446,7 +452,7 @@ public:
// Data type for graph is DATASET POLYDATA
vtk_header
+=
"DATASET POLYDATA
\n
"
;
vtk_header
+=
add_meta_data
(
meta_data
);
vtk_header
+=
add_meta_data
(
meta_data
,
ft
);
// point properties header
point_prop_header
=
get_point_properties_list
(
ft
);
...
...
src/VTKWriter/VTKWriter_unit_tests.hpp
View file @
d9b62ea7
...
...
@@ -1049,6 +1049,9 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set )
vtk_v3
.
write
(
"vtk_points_pp_header.vtk"
,
prp_names
,
"points"
,
"time=5.123"
);
// We try binary
vtk_v3
.
write
(
"vtk_points_pp_header_bin.vtk"
,
prp_names
,
"points"
,
"time=5.123"
,
file_type
::
BINARY
);
#ifndef SE_CLASS3
// Check that match
...
...
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