IO

In GridapTopOpt, the usual IO from Gridap is available. In addition, we also implement the below IO for convenience.

Optimiser history

GridapTopOpt.write_historyFunction
write_history(path::String,h::OptimiserHistory;ranks=nothing)

Write the contents of an OptimiserHistory object to a path. Provide MPI ranks when running in parallel.

source

Object IO in serial

GridapTopOpt.saveFunction
save(filename::AbstractString, x)

Save an object x to filename as a JLD2 file.

Note: To save in MPI mode, use psave.

source
GridapTopOpt.loadFunction
load(filename::AbstractString)

Load an object stored in a JLD2 file at filename.

Note: To load in MPI mode, use pload.

source
GridapTopOpt.load!Function
load!(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!.

source

Object IO in parallel

GridapTopOpt.psaveFunction
psave(filename::AbstractString, x)

Save a partitioned object x to a directory dir as a set of JLD2 files corresponding to each part.

source
GridapTopOpt.ploadFunction
pload(dir::AbstractString, ranks::AbstractArray{<:Integer})

Load a partitioned object stored in a set of JLD2 files in directory dir indexed by MPI ranks ranks.

source
GridapTopOpt.pload!Function
pload!(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.

source