Skip to content

Saving and loading

All of the types native to HarmonicBalance.jl can be saved into a .jld2 file using save and loaded using load. Most of the saving/loading is performed using the package JLD2.jl, with the addition of reinstating the symbolic variables in the HarmonicBalance namespace (needed to parse expressions used in the plotting functions) and recompiling stored functions (needed to evaluate Jacobians). As a consequence, composite objects such as Result can be saved and loaded with no loss of information.

The function export_csv saves a .csv file which can be plot elsewhere.

HarmonicBalance.save Function
julia
save(filename, object)

Saves object into .jld2 file filename (the suffix is added automatically if not entered). The resulting file contains a dictionary with a single entry.

source

HarmonicBalance.load Function
julia
load(filename)

Loads an object from filename. For objects containing symbolic expressions such as HarmonicEquation, the symbolic variables are reinstated in the HarmonicBalance namespace.

source

HarmonicBalance.export_csv Function
julia
export_csv(filename, res, branch)

Saves into filename a specified solution branch of the Result res.

source