Skip to content
Snippets Groups Projects
Commit 4c2e86e3 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

write parallel vector VTUs corrected

parent 76590ab6
Branches
Tags
No related merge requests found
......@@ -157,7 +157,11 @@ namespace AMDiS {
}
if (writeParaViewVectorFormat) {
#if HAVE_PARALLEL_DOMAIN_AMDIS
VtkVectorWriter::writeFile(solutionVecs, paraFilename + paraviewFileExt, true, writeAs3dVector);
#else
VtkVectorWriter::writeFile(solutionVecs, fn + paraviewFileExt, true, writeAs3dVector);
#endif
// VtkVectorWriter::Impl<double> vtkVectorWriter(&dataCollectors, writeAs3dVector);
// vtkVectorWriter.setCompression(compression);
......
......@@ -98,10 +98,20 @@ namespace AMDiS {
<< " </PCells>\n";
file << " <PPointData>\n";
for (int i = 0; i < static_cast<int>(dataCollector->size()); i++)
file << " <PDataArray type=\"Float32\" Name=\"value"
<< i << "\" format=\"ascii\"/>\n";
for (int i = 0; i < static_cast<int>(dataCollector->size()); i++) {
S temp = (*((*dataCollector)[i]->getValues()))[0];
int numComponent = num_rows(temp);
std::string name = (*dataCollector)[i]->getValues()->getName();
if (name.find_first_not_of(" \n\r\t") == std::string::npos)
name = "value" + boost::lexical_cast<std::string>(i);
file << " <PDataArray type=\"Float32\" Name=\""
<< name
<< "\" format=\"ascii\""
<< (numComponent > 1 ? " NumberOfComponents=\"" + boost::lexical_cast<std::string>(numComponent) + "\"" : "")
<< "/>\n";
}
file << " </PPointData>\n";
for (int i = 0; i < nRanks; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment