Skip to content

Commit

Permalink
Output the pvd to the base output dir to help on HPC systems that slo…
Browse files Browse the repository at this point in the history
…w down loading the many files that are in meshes/
  • Loading branch information
Chrismarsh committed Jan 26, 2025
1 parent 64b1891 commit 619e32a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2414,11 +2414,13 @@ void core::run()
#else
int rank = 0;
#endif
// write paths that are relative to the pvd file
boost::filesystem::path vtu_path(output_folder_path.string() + "/meshes/" + p.filename().string()+"_"+std::to_string(rank) + ".vtu");
pt::ptree &dataset = pvd.add("VTKFile.Collection.DataSet", "");
dataset.add("<xmlattr>.timestep", _global->posix_time_int());
dataset.add("<xmlattr>.group", "");
dataset.add("<xmlattr>.part", rank);
dataset.add("<xmlattr>.file", p.filename().string()+"_"+std::to_string(rank) + ".vtu");
dataset.add("<xmlattr>.file", boost::filesystem::relative(vtu_path, output_folder_path).string());
#ifdef USE_MPI
}
}
Expand Down Expand Up @@ -2517,7 +2519,9 @@ void core::run()
{
#endif

pt::write_xml(itr.fname + ".pvd",
// output the pvd one level higher in the main outdir than we have previously
boost::filesystem::path path(itr.fname + ".pvd");
pt::write_xml( (output_folder_path.string() / path.filename()).string(),
pvd, std::locale(), pt::xml_writer_settings<std::string>(' ', 4));
break;

Expand Down

0 comments on commit 619e32a

Please sign in to comment.