IO
In GridapTopOpt, the usual IO from Gridap is available. In addition, we also implement the below IO for convenience.
Optimiser history
GridapTopOpt.write_history — Functionwrite_history(path::String,h::OptimiserHistory;ranks=nothing)Write the contents of an OptimiserHistory object to a path. Provide MPI ranks when running in parallel.
Object IO in serial
GridapTopOpt.save — Functionsave(filename::AbstractString, x)Save an object x to filename as a JLD2 file.
Note: To save in MPI mode, use psave.
GridapTopOpt.load — Functionload(filename::AbstractString)Load an object stored in a JLD2 file at filename.
Note: To load in MPI mode, use pload.
GridapTopOpt.load! — Functionload!(filename::AbstractString, x)Load an object stored in a JLD2 file at filename and copy its contents to x.
Note: To load! in MPI mode, use pload!.
Object IO in parallel
GridapTopOpt.psave — Functionpsave(filename::AbstractString, x)Save a partitioned object x to a directory dir as a set of JLD2 files corresponding to each part.
GridapTopOpt.pload — Functionpload(dir::AbstractString, ranks::AbstractArray{<:Integer})Load a partitioned object stored in a set of JLD2 files in directory dir indexed by MPI ranks ranks.
GridapTopOpt.pload! — Functionpload!(dir::AbstractString, x)Load a partitioned object stored in a set of JLD2 files in directory dir and copy contents to the equivilent object x.