Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1041 +/- ##
=======================================
Coverage 89.63% 89.63%
=======================================
Files 121 121
Lines 8763 8764 +1
=======================================
+ Hits 7855 7856 +1
Misses 908 908
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/run-gpu-tests |
|
|
||
| """ | ||
| trixi2vtk(vu_ode, semi, t; iter=nothing, output_directory="out", prefix="", | ||
| trixi2vtk(vu_ode, semi, t; iter=-1, output_directory="out", prefix="", |
There was a problem hiding this comment.
Can you just use nothing here?
| * add_underscore_to_optional_postfix(iter)) | ||
| file_ = joinpath(output_directory, | ||
| add_underscore_to_optional_prefix(prefix) * "$system_name") | ||
| file = iter < 0 ? file_ : file_ * add_underscore_to_optional_postfix(iter) |
There was a problem hiding this comment.
if you modify 'add_underscore_to_optional_postfix' and 'add_underscore_to_optional_prefix' to return '' for nothing as well you can keep the original code
There was a problem hiding this comment.
Or this does already work? I am not sure.
There was a problem hiding this comment.
Hmm but then it is not consistent with pvd = paraview_collection(collection_file; append=iter > 0).
What's wrong with -1?
There was a problem hiding this comment.
But if you overwrite there shouldn't be a collection anyway?
There was a problem hiding this comment.
Here, the collection consists only of the current solution. Is this wrong?
What is wrong with iter=-1?
There was a problem hiding this comment.
No its not wrong but you could skip writing the collection file since with one timestep in it it doesn't really make sense.
There was a problem hiding this comment.
From a usage perspective, I think it doesn't make sense to have a PVD file if we already know there is only ever going to be one VTK file in the collection.
But I also don't think it makes sense to just omit the iteration number. Say we want to use a regular saving callback (with very large intervals) and one specifically for restarts (the purpose of this PR, no?). First issue would be that both generate fluid_1.pvd, so we definitely don't want a PVD from the overwriting callback. Second, we would get fluid_1_0.vtu, fluid_1_1.vtu etc. and fluid_1.pvd from the regular callback plus one fluid_1.vtu from the overwriting callback. This is confusing. I would prefer adding a suffix like "current" or so. Then we get fluid_1.pvd from the regular callback and fluid_1_current.vtu from this callback.
At first glance, this keyword does not really make sense.
Since one would achieve the same result with
save_final_solution=trueandsave_times=[tspan[end]], right?However, one would then not have regular backups of the results.
As I mention in the docs: