This PR introduces environment!(:gpu, Float64, 2) to dynamically set up ParallelStencil inside the Diffusion modules and replaces @init_parallel_stencil. The first argument should be :gpu or :cpu. There is no longer the need to load GeoParams and/or ParallelStencil after loading MTK.jl. E.g. in Example2D_paper:
using MagmaThermoKinematics
environment!(:gpu, Float64, 2) # initialize parallel stencil in 2D
using MagmaThermoKinematics.Diffusion2D # to load AFTER calling environment!()
using CairoMakie # plotting
using Printf # print
using MAT, JLD2 # saves files in matlab format & JLD2 (hdf5) format
using Parameters
using Statistics
using LinearAlgebra: norm
This PR introduces
environment!(:gpu, Float64, 2)
to dynamically set up ParallelStencil inside the Diffusion modules and replaces@init_parallel_stencil
. The first argument should be:gpu
or:cpu
. There is no longer the need to load GeoParams and/or ParallelStencil after loading MTK.jl. E.g. in Example2D_paper: