Import/Export Simulation Results
We use Julia's built-in Serialization
functionality to implement the import and export of models. Sometimes the model file size is too large, so we use CodecZlib for compression (optional), and automatically determine whether it is a compressed file when reading.
Note
We use the file suffix .mpm
to denote model files generated by MaterialPointSolver.jl.
MaterialPointSolver.exportmodel Method
julia
exportmodel(args, grid, mp, attr, bc; model_file="temp.mpm", compress=true)
Description:
Export model data to a compressed or uncompressed file (.mpm). If user does not identify the file path, the .mpm
file will save in the project directory with the project name.
MaterialPointSolver.importmodel Method
julia
importmodel(mpm_file::String)
Description:
Import model data from a compressed or uncompressed file (.mpm). This function will detect wheather the model file is compressed or not, and then read the model data.
source