Skip to content

Commit

Permalink
Avoid FieldVector outer constructor inference
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Sep 19, 2023
1 parent 44796a8 commit aa5503c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/callbacks/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,10 @@ function save_to_disk_func(integrator)
hdfwriter = InputOutput.HDF5Writer(output_file, p.comms_ctx)
InputOutput.HDF5.write_attribute(hdfwriter.file, "time", t) # TODO: a better way to write metadata
InputOutput.write!(hdfwriter, Y, "Y")
InputOutput.write!(
hdfwriter,
Fields.FieldVector(; pairs(diagnostic)...),
"diagnostics",
)
FT = Spaces.undertype(axes(Y.c))
values = map(Fields.wrap, diagnostic)
fv = Fields.FieldVector{FT}(values)
InputOutput.write!(hdfwriter, fv, "diagnostics")
Base.close(hdfwriter)
return nothing
end
Expand Down

0 comments on commit aa5503c

Please sign in to comment.