def build_rom(self, projected_operators, error_estimator): return LinearDelayModel(tau=self.fom.tau, error_estimator=error_estimator, **projected_operators)
ExpressionFunction('(x[...,0] > (1 - 1e-10)) * 1.', 1)), )), ConstantFunction(0., 1), T=3.) fom, _ = discretize_instationary_cg(p, diameter=1 / 100, nt=100) lti = fom.to_lti() tau = 1. g = 5. Atau = sps.coo_matrix(([g], ([0], [lti.order - 1])), (lti.order, lti.order)).tocsc() Atau = NumpyMatrixOperator(Atau, source_id=lti.solution_space.id, range_id=lti.solution_space.id) td_lti = LinearDelayModel(lti.A, (Atau, ), (tau, ), lti.B, lti.C, E=lti.E) print(td_lti) w = np.logspace(-1, 2.5, 500) td_lti.mag_plot(w, ax=obj.axs) obj.axs.set_title('Magnitude plot of the FOM') obj.SavePng() interp = TFBHIReductor(td_lti) r = 3 sigma = np.logspace(0, 1, r) sigma = np.concatenate((1j * sigma, -1j * sigma)) b = td_lti.input_space.ones(2 * r) c = td_lti.output_space.ones(2 * r)