Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mor/morprojector.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def take_snapshot(self, u):
"""
self.snaps.append(u.copy(deepcopy=True))

def snapshots_to_matrix(self):
def _snapshots_to_matrix(self):
"""Convert the snapshots to a matrix"""
# DOFs x timesteps
self.snap_mat = np.zeros((self.snaps[-1].function_space().dof_count, len(self.snaps)))
Expand Down Expand Up @@ -72,7 +72,7 @@ def compute_basis(self, n_basis, inner_product="L2", time_scaling=False, delta_t

ip_mat = assemble(ip_form, mat_type="aij").M.handle

M = self.snapshots_to_matrix()
M = self._snapshots_to_matrix()

# This matrix is symmetric positive semidefinite
corr_mat = np.matmul(self.snap_mat.transpose(), petsc2sp(ip_mat).dot(self.snap_mat))
Expand Down