Simulation Results
HSSSimulations.Results
— ModuleContains a concrete time step and final results type and the functions needed to process the results for these types.
Time/Load Step Results
HSSSimulations.Types.AbstractResult
— Typeabstract type AbstractResult <: HSSSimulations.Types.AbstractSimProperty
This as the abstract type for the results from a single simulation time step. These are save at the end of every load step for each of the time steps in that load step (ignoring time steps that are skipped over based on the load steps skip value).
See Tutorial 4: Saving More Results and Result Type Recipes for how to make your own subtype.
As this struct is what stores the data during the simulation, all subtypes MUST have the T
, t
and tₚ
fields, and if used with the default material model it will also need the M
and C
fields.
HSSSimulations.Results.loadStepSaver
— FunctionloadStepSaver(loadResultsFolder, loadResults::StructVector{T}) where {T<:AbstractResult}
Saves the results of a load step into the folder for the current load step in the output file of the problem, given by the loadResultsFolder
argument.
Any new methods for this function should dispatch on the type parameter of the loadResults
, and save any desired results to the file like so:
function loadStepSaver(loadResultsFolder, loadResults::StructVector{T}) where {T<:AbstractResult}
loadResultsFolder["time"] = loadResults.t
loadResultsFolder["T"] = stack(loadResults.T)
return
end
stack
is used as a very efficient way of converting the vector of 3D arrays from the StructVector
in to a 4D array.
HSSSimulations.Results.loadStepSaver
— MethodloadStepSaver(
loadResultsFolder,
loadResults::StructArray{T<:Result, 1}
)
Saves the results for the temperature, melt state and consolidation state as 4D arrays of X,Y,Z and t. And the time is saved as a 1D Array.
End of Simulation Results
HSSSimulations.Types.AbstractOtherResults
— Typeabstract type AbstractOtherResults <: HSSSimulations.Types.AbstractSimProperty
This as the abstract type for the results that are saved only at the end of the simulation. This is useful to store things that do not change every time step, without requiring any changes to the material property or params structs. However those structs can also be used to store such things, such as is done for Mₘ in the MatProp
struct.
As the default implementation does nothing, and nothing normally dispatches on it, it can be replaced by another empty type to use a new method for any function that dispatches on Problem
(I think that's all of the user facing API).
See Tutorial 4: Saving More Results and Result Type Recipes for how to make your own subtype.
HSSSimulations.Results.otherResults
— FunctionotherResults(prob<:Problem, file)
Runs at the end of the simulation to save any additional results that only need to be saved once, as opposed to for every nth time step. The Types.Problem
type and any of its type parameters can be dispatched on.
See AbstractOtherResults
for a place to store random data, and Tutorial 4: Saving More Results for a detailed guide.
HSSSimulations.Results.otherResults
— MethodotherResults(problem::Problem{T, Gh, Mp, R, OR, B}, file)
Default otherResults
method that just saves the maximum melt state reached for each node.