Skip to content

Commit

Permalink
Rename sample_prior_perm
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Sep 13, 2023
1 parent fc26df9 commit 1425bbd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions notebooks/ES_2D_Heat_Equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@


# %%
def sample_prior_perm(N):
def prior_conductivity(N):
mesh = np.meshgrid(np.linspace(0, 1, nx), np.linspace(0, 1, nx))
lperms = np.exp(geostat.gaussian_fields(mesh, rng, N, r=0.8))
return lperms
return np.exp(geostat.gaussian_fields(mesh, rng, N, r=0.8))


# Evensens' formulation of the Ensemble Smoother has the prior as
# a (nx * nx, N) matrix, i.e (number of parameters, N).
A = sample_prior_perm(N).T
A = prior_conductivity(N).T

# We'll also need a list of matrices to run simulations in parallel later on.
# A list is also a bit easier to interactively visualize.
Expand Down Expand Up @@ -109,7 +108,7 @@ def interactive_prior_fields(n):

# %%
# Set the coefficient of heat transfer for each grid cell.
# alpha_t = sample_prior_perm(1).T.reshape(nx, nx)
# alpha_t = prior_conductivity(1).T.reshape(nx, nx)
# Let's use as true parameter field one relization from the prior
# to make it easier for the Ensemble Smoother to find the solution.
alpha_t = alphas[0]
Expand Down

0 comments on commit 1425bbd

Please sign in to comment.