Skip to content

Commit

Permalink
add output_directory creation if not already done. Necessary if this …
Browse files Browse the repository at this point in the history
…callback is used without the SaveSolution callback
  • Loading branch information
andrewwinters5000 committed Mar 12, 2024
1 parent fa5daa8 commit 771a3c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/callbacks_step/time_series.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ function TimeSeriesCallback(mesh, equations, solver, cache, point_coordinates;
throw(ArgumentError("`point_coordinates` must be a matrix of size n_points × ndims"))
end

# create the output folder if it does not exist already
if mpi_isroot() && !isdir(output_directory)
mkpath(output_directory)
end

# Transpose point_coordinates to our usual format [ndims, n_points]
# Note: They are accepted in a different format to allow direct input from `readdlm`
point_coordinates_ = permutedims(point_coordinates)
Expand Down

0 comments on commit 771a3c5

Please sign in to comment.