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
136310cb
Commit
136310cb
authored
Feb 25, 2016
by
tonynsyde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VTKWriter for distributed graph fix
parent
dbc37eff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
src/VTKWriter_dist_graph.hpp
src/VTKWriter_dist_graph.hpp
+31
-1
No files found.
src/VTKWriter_dist_graph.hpp
View file @
136310cb
...
...
@@ -923,6 +923,31 @@ class VTKWriter<Graph, DIST_GRAPH>
return
v_out
;
}
std
::
string
get_point_info
()
{
//! vertex property output string
std
::
string
v_out
;
// write the ids
v_out
+=
"SCALARS id unsigned_long
\n
LOOKUP_TABLE default
\n
"
;
for
(
size_t
i
=
0
;
i
<
g
.
getNVertex
();
++
i
)
{
v_out
+=
std
::
to_string
(
g
.
getVertexId
(
i
))
+
"
\n
"
;
}
// write the ids
v_out
+=
"SCALARS gid unsigned_long
\n
LOOKUP_TABLE default
\n
"
;
for
(
size_t
i
=
0
;
i
<
g
.
getNVertex
();
++
i
)
{
v_out
+=
std
::
to_string
(
g
.
getVertexGlobalId
(
i
))
+
"
\n
"
;
}
// return the vertex properties string
return
v_out
;
}
/*! \brief It get the edge properties list
*
* It get the edge properties list of the edge defined as a GraphML header
...
...
@@ -1118,6 +1143,8 @@ public:
std
::
string
edge_prop_header
;
// Data point header
std
::
string
point_data_header
;
// Ids point
std
::
string
point_ids
;
// Data point
std
::
string
point_data
;
// Cell data header
...
...
@@ -1162,6 +1189,9 @@ public:
// Get the point data header
point_data_header
=
get_point_data_header
();
// Get the point info
point_ids
=
get_point_info
();
// Get the cell data header
cell_data_header
=
get_cell_data_header
();
...
...
@@ -1192,7 +1222,7 @@ public:
std
::
cerr
<<
"Error cannot create the VTK file: "
+
file
;
}
ofs
<<
vtk_header
<<
point_prop_header
<<
point_list
<<
vertex_prop_header
<<
vertex_list
<<
edge_prop_header
<<
edge_list
<<
point_data_header
<<
point_data
<<
cell_data_header
<<
cell_data
;
ofs
<<
vtk_header
<<
point_prop_header
<<
point_list
<<
vertex_prop_header
<<
vertex_list
<<
edge_prop_header
<<
edge_list
<<
point_data_header
<<
point_
ids
<<
point_
data
<<
cell_data_header
<<
cell_data
;
// Close the file
...
...
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