From: Wolfgang Bangerth Date: Wed, 23 Feb 2022 05:07:37 +0000 (-0700) Subject: Adjust for the remaining review comments. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F97%2Fhead;p=code-gallery.git Adjust for the remaining review comments. --- diff --git a/MCMC-Laplace/Python/forward_solver.py b/MCMC-Laplace/Python/forward_solver.py index 48df589..b815e2a 100644 --- a/MCMC-Laplace/Python/forward_solver.py +++ b/MCMC-Laplace/Python/forward_solver.py @@ -171,14 +171,14 @@ def forward_solver(theta) : for i in range(32) : for j in range (32) : # Find local coefficient in 8x8 grid - thet = theta[int(i/4)+int(j/4)*8] + theta_loc = theta[int(i/4)+int(j/4)*8] # Update A by including contribution from cell (i,j) dof = [ij_to_dof_index(i,j), ij_to_dof_index(i,j+1), ij_to_dof_index(i+1,j+1), ij_to_dof_index(i+1,j)] - A[np.ix_(dof,dof)] += thet*A_loc + A[np.ix_(dof,dof)] += theta_loc * A_loc # Enforce boundary condition: Zero out rows and columns, then # put a one back into the diagonal entries. diff --git a/MCMC-Laplace/Readme.md b/MCMC-Laplace/Readme.md index b6314a9..7fbb436 100644 --- a/MCMC-Laplace/Readme.md +++ b/MCMC-Laplace/Readme.md @@ -451,6 +451,6 @@ time for each function evaluation) and could probably be optimized substantially if desired. A good starting point is the insertion of the local elements into the global matrix in the line ``` - A[np.ix_(dof,dof)] += thet*A_loc + A[np.ix_(dof,dof)] += theta_loc * A_loc ``` that takes up a substantial fraction of the overall run time.