How to use the pydmd.DMDc function in pydmd

To help you get started, we’ve selected a few pydmd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mathLab / PyDMD / tests / test_dmdc.py View on Github external
def test_reconstruct_b_unknown(self):
        system = create_system_without_B()
        dmdc = DMDc(svd_rank=-1, opt=True)
        dmdc.fit(system['snapshots'], system['u'])
        np.testing.assert_array_almost_equal(
            dmdc.reconstructed_data(), system['snapshots'], decimal=6)
github mathLab / PyDMD / tests / test_dmdc.py View on Github external
def test_B_b_known(self):
        system = create_system_with_B()
        dmdc = DMDc(svd_rank=-1)
        dmdc.fit(system['snapshots'], system['u'], system['B'])
        np.testing.assert_array_almost_equal(dmdc.B, system['B'])
github mathLab / PyDMD / tests / test_dmdc.py View on Github external
def test_eigs_b_known(self):
        system = create_system_with_B()
        dmdc = DMDc(svd_rank=-1)
        dmdc.fit(system['snapshots'], system['u'], system['B'])
        real_eigs = np.array([0.1, 1.5])
        np.testing.assert_array_almost_equal(dmdc.eigs, real_eigs)
github mathLab / PyDMD / tests / test_dmdc.py View on Github external
def test_atilde_b_unknown(self):
        system = create_system_without_B()
        dmdc = DMDc(svd_rank=-1, opt=True)
        dmdc.fit(system['snapshots'], system['u'])
        expected_atilde = dmdc.basis.T.conj().dot(system['A']).dot(dmdc.basis)
        np.testing.assert_array_almost_equal(
            dmdc.atilde, expected_atilde, decimal=1)
github mathLab / PyDMD / tests / test_dmdc.py View on Github external
def test_reconstruct_b_known(self):
        system = create_system_with_B()
        dmdc = DMDc(svd_rank=-1)
        dmdc.fit(system['snapshots'], system['u'], system['B'])
        np.testing.assert_array_almost_equal(dmdc.reconstructed_data(),
                                             system['snapshots'])