Skip to content
Snippets Groups Projects
Commit 734473b3 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add cell center automatically in VTK outputs

This is useful/necessary to define properly cuts
parent 5292b9a2
No related branches found
No related tags found
1 merge request!80Feature/writers improvement
......@@ -2,6 +2,8 @@
#include <mesh/Connectivity.hpp>
#include <mesh/Mesh.hpp>
#include <mesh/MeshData.hpp>
#include <mesh/MeshDataManager.hpp>
#include <utils/Messenger.hpp>
#include <utils/RevisionInfo.hpp>
......@@ -279,6 +281,7 @@ VTKWriter::_write(const std::shared_ptr<const MeshType>& mesh,
// Adding basic mesh information
output_named_item_value_set.add(NamedItemValue{"cell_number", mesh->connectivity().cellNumber()});
output_named_item_value_set.add(NamedItemValue{"node_number", mesh->connectivity().nodeNumber()});
output_named_item_value_set.add(NamedItemValue{"cell_center", MeshDataManager::instance().getMeshData(*mesh).xj()});
if (parallel::rank() == 0) { // write PVTK file
std::ofstream fout(_getFilenamePVTU());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment