]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Adjust for the remaining review comments. 97/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 23 Feb 2022 05:07:37 +0000 (22:07 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 23 Feb 2022 05:07:37 +0000 (22:07 -0700)
MCMC-Laplace/Python/forward_solver.py
MCMC-Laplace/Readme.md

index 48df58976bd247a616f0c4472a6c394dc04d8ae6..b815e2a320c3ae79ed63d08ada1fb666d498c4a5 100644 (file)
@@ -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.
index b6314a9e8bd416bcac72c7bd8d4d800fdab58f73..7fbb4365a99ed04d11747570d118155e5d21df8d 100644 (file)
@@ -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.

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.