brendanjmeade / celeri

Next generation earthquake cycle kinematics
BSD 3-Clause "New" or "Revised" License
24 stars 6 forks source link

Are smoothing matrices correct? #37

Closed brendanjmeade closed 2 years ago

brendanjmeade commented 2 years ago

Jack- I've done the initial construction of sparse smoothing matrices. They are the right size and seem to have sparse terms of the main diagonal. However, I'm not certain that there any non-zero values off of the main diagonal, so I think I may have messed up somewhere. Let me know if you might have time to take a look!

jploveless commented 2 years ago

Any ideas why pasting this into a notebook cell:

meshes[0].share = celeri.get_shared_sides(meshes[0].verts)
print(meshes[0].share[0:10,0:3])

gives the correct result (with -1 in matrix entries where there is no shared side) and pasting:

celeri.get_all_mesh_smoothing_matrices(meshes) 
print(meshes[0].share[0:10, 0:3])

into the next cell gives the wrong result (non-empty indices are correct, but there are seemingly random integers where there should be -1)?