Skip to content

MPM to vtp file ​

Here we export the data from MaterialPointSolver.jl to a .vtp file. In MaterialPointSolver.jl, we should have already instantiated four structures: DeviceArgs2D (DeviceArgs3D), DeviceGrid2D (DeviceGrid3D), DeviceParticle2D (DeviceParticle3D), DeviceProperty.

Save to .vtp (single time step) ​

MaterialPointVisualizer.savevtp Method
julia
savevtp(args::DeviceArgs2D{T1, T2}, grid::DeviceGrid2D{T1, T2}, 
    mp::DeviceParticle2D{T1, T2}, attr::DeviceProperty{T1, T2})

Description:

Generates the final geometry and properties in .vtp format (2D).

source
MaterialPointVisualizer.savevtp Method
julia
savevtp(args::DeviceArgs3D{T1, T2}, grid::DeviceGrid3D{T1, T2}, 
    mp::DeviceParticle3D{T1, T2}, attr::DeviceProperty{T1, T2})

Description:

Generates the final geometry and properties in .vtp format (3D).

source

Save to animation ​

To do this, we need to turn on HDF5 option in MaterialPointSolver.jl, then we just pass DeviceArgs2D (DeviceArgs3D) into this function:

MaterialPointVisualizer.animation Method
julia
animation(args::DeviceArgs2D{T1, T2})

Description:

Generates animation by using the data from HDF5 file (2D).

source
julia
animation(args::DeviceArgs3D{T1, T2})

Description:

Generates animation by using the data from HDF5 file (3D).

source
MaterialPointVisualizer.animation Method
julia
animation(args::DeviceArgs2D{T1, T2})

Description:

Generates animation by using the data from HDF5 file (2D).

source
julia
animation(args::DeviceArgs3D{T1, T2})

Description:

Generates animation by using the data from HDF5 file (3D).

source