From 735f3ef8765ea8d1dee90e752545d5b03bdde855 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 22 Feb 2022 22:07:37 -0700 Subject: [PATCH] Adjust for the remaining review comments. --- MCMC-Laplace/Python/forward_solver.py | 4 ++-- MCMC-Laplace/Readme.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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. -- 2.39.5