[scripts] no need to prescibe PoU support, is detected

parent 8ff0ccda
......@@ -221,23 +221,21 @@ class PouLocalizedCoerciveReductor(DistributedReductorBase):
self.kappa_lower = kwargs.pop('kappa_lower')
self.make_pou = kwargs.pop('make_pou')
self.pou_id = kwargs.pop('pou_id')
self.pou_support_on_coupling = kwargs.pop('pou_support_on_coupling')
super().__init__(*args, **kwargs, local_bases=local_RBs)
def __repr__(self):
return 'PouLocalizedCoerciveReductor(make_pou={}, pou_support_on_coupling={})'.format(
self.pou_id, self.pou_support_on_coupling)
return 'PouLocalizedCoerciveReductor(make_pou={})'.format(
self.pou_id)
def reduce(self):
super()._reduce()
class PouLocalizedEstimate(BasicInterface):
def __init__(self, init_dd, make_pou, pou_support_on_coupling, reductor, fom, kappa_lower):
def __init__(self, init_dd, make_pou, reductor, fom, kappa_lower):
self.init_dd = init_dd
self.make_pou = make_pou
self.pou_support_on_coupling = pou_support_on_coupling
self.reductor = reductor
self.fom = fom
self.kappa_lower = kappa_lower
......@@ -334,7 +332,7 @@ class PouLocalizedCoerciveReductor(DistributedReductorBase):
return np.array([np.sqrt(localized_estimate)/coercivity_estimate, ])
self.rd = self.rd.with_(estimator=PouLocalizedEstimate(
self.init_dd, self.make_pou, self.pou_support_on_coupling, self, self.d, self.kappa_lower))
self.init_dd, self.make_pou, self, self.d, self.kappa_lower))
if hasattr(self.d, 'parameter_space'):
self.rd = self.rd.with_(parameter_space=self.d.parameter_space)
return self.rd
......
......@@ -48,7 +48,7 @@ def compute_on_single_refinemet(cfg):
logger.info('reducing with initial basis (PoU) ...')
reductor = Reductor(
fom, init_dd, cfg, make_pou=lambda dd: ContinuousLagrangePartitionOfUnity(dd),
kappa_lower=init_problem()['kappa_lower'], pou_id='Q1Pou', pou_support_on_coupling=True)
kappa_lower=init_problem()['kappa_lower'], pou_id='Q1Pou')
append_values(reductor=str(reductor))
append_values(basis_size=[len(b) for b in reductor.bases])
rom = reductor.reduce()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment