From d2497acd1a57e7895c5b422ff12a8b3d26cb37aa Mon Sep 17 00:00:00 2001 From: Dirk Siebelts Date: Thu, 14 Jun 2018 13:11:45 +0200 Subject: [PATCH] Changed snapshots_to_matrix to hidden function --- mor/morprojector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mor/morprojector.py b/mor/morprojector.py index b87cc99..992ef2b 100644 --- a/mor/morprojector.py +++ b/mor/morprojector.py @@ -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))) @@ -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))