File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2414,11 +2414,13 @@ void core::run()
2414
2414
#else
2415
2415
int rank = 0 ;
2416
2416
#endif
2417
+ // write paths that are relative to the pvd file
2418
+ boost::filesystem::path vtu_path (output_folder_path.string () + " /meshes/" + p.filename ().string ()+" _" +std::to_string (rank) + " .vtu" );
2417
2419
pt::ptree &dataset = pvd.add (" VTKFile.Collection.DataSet" , " " );
2418
2420
dataset.add (" <xmlattr>.timestep" , _global->posix_time_int ());
2419
2421
dataset.add (" <xmlattr>.group" , " " );
2420
2422
dataset.add (" <xmlattr>.part" , rank);
2421
- dataset.add (" <xmlattr>.file" , p. filename ( ).string ()+ " _ " + std::to_string (rank) + " .vtu " );
2423
+ dataset.add (" <xmlattr>.file" , boost::filesystem::relative (vtu_path, output_folder_path ).string ());
2422
2424
#ifdef USE_MPI
2423
2425
}
2424
2426
}
@@ -2517,7 +2519,9 @@ void core::run()
2517
2519
{
2518
2520
#endif
2519
2521
2520
- pt::write_xml (itr.fname + " .pvd" ,
2522
+ // output the pvd one level higher in the main outdir than we have previously
2523
+ boost::filesystem::path path (itr.fname + " .pvd" );
2524
+ pt::write_xml ( (output_folder_path.string () / path.filename ()).string (),
2521
2525
pvd, std::locale (), pt::xml_writer_settings<std::string>(' ' , 4 ));
2522
2526
break ;
2523
2527
You can’t perform that action at this time.
0 commit comments