Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply changes from new formatter #72

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions src/callbacks_step/analysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,10 @@ end

Return the time values that correspond to the saved values of the [`errors`](@ref) and [`integrals`](@ref).
"""
function tstops(cb::DiscreteCallback{
Condition,
Affect!
}) where {Condition,
Affect! <:
AnalysisCallback}
function tstops(cb::DiscreteCallback{Condition,
Affect!}) where {Condition,
Affect! <:
AnalysisCallback}
analysis_callback = cb.affect!
return analysis_callback.tstops
end
Expand All @@ -124,12 +122,10 @@ end
Return the computed errors for each timestep as a named tuple.
The shape of each entry is (nvariables, ntimesteps).
"""
function errors(cb::DiscreteCallback{
Condition,
Affect!
}) where {Condition,
Affect! <:
AnalysisCallback}
function errors(cb::DiscreteCallback{Condition,
Affect!}) where {Condition,
Affect! <:
AnalysisCallback}
analysis_callback = cb.affect!
names = collect(analysis_callback.analysis_errors)
# "transpose" vector of matrices, first write it as 3d array and then convert it back to vector of matrices
Expand All @@ -144,12 +140,10 @@ end

Return the computed integrals for each timestep as a named tuple.
"""
function integrals(cb::DiscreteCallback{
Condition,
Affect!
}) where {Condition,
Affect! <:
AnalysisCallback}
function integrals(cb::DiscreteCallback{Condition,
Affect!}) where {Condition,
Affect! <:
AnalysisCallback}
analysis_callback = cb.affect!
names = collect(Symbol.(nameof.(analysis_callback.analysis_integrals)))
# "transpose" vector of vector
Expand Down