Skip to content

Commit

Permalink
Update to Meshes.jl v0.37
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv committed Dec 5, 2023
1 parent a3b28c4 commit fe713dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ GeoStatsModels = "0.2"
GeoTables = "1.9"
ImageQuilting = "0.23"
LinearAlgebra = "1.9"
Meshes = "0.36"
Meshes = "0.37"
ProgressMeter = "1.9"
Random = "1.9"
Statistics = "1.9"
Expand Down
4 changes: 2 additions & 2 deletions src/field/gaussian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ include("gaussian/seq.jl")

function defaultmethod(::GaussianProcess, setup::RandSetup)
dom = setup.domain
udom, _ = unview(dom)
if udom isa Grid
pdom = parent(dom)
if pdom isa Grid
FFTMethod()
elseif nelements(dom) < 10000
LUMethod()
Expand Down
5 changes: 3 additions & 2 deletions src/field/gaussian/fft.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function randprep(::AbstractRNG, process::GaussianProcess, method::FFTMethod, se

dom = setup.domain
data = setup.geotable
grid, _ = unview(dom)
grid = parent(dom)
dims = size(grid)
center = CartesianIndex(dims 2)
cindex = LinearIndices(dims)[center]
Expand Down Expand Up @@ -104,7 +104,8 @@ function randsingle(rng::AbstractRNG, process::GaussianProcess, method::FFTMetho
# retrieve domain info
dom = setup.domain
data = setup.geotable
grid, inds = unview(dom)
grid = parent(dom)
inds = parentindices(dom)
dims = size(grid)

# retrive variogram model and mean
Expand Down

0 comments on commit fe713dc

Please sign in to comment.