diff --git a/mfem/_par/bilinearform.i b/mfem/_par/bilinearform.i index 43216089..697e42ee 100644 --- a/mfem/_par/bilinearform.i +++ b/mfem/_par/bilinearform.i @@ -75,6 +75,7 @@ namespace mfem { %} %pythonprepend MixedBilinearForm::AddDomainIntegrator %{ if not hasattr(self, "_integrators"): self._integrators = [] + bfi = args[0] self._integrators.append(bfi) bfi.thisown=0 %} @@ -93,7 +94,8 @@ namespace mfem { if not hasattr(self, "_integrators"): self._integrators = [] bfi = args[0] self._integrators.append(bfi) - bfi.thisown=0 + self.UseExternalIntegrators() + #bfi.thisown=0 %} %pythonappend MixedBilinearForm::SpMat %{ if not hasattr(self, "_spmat"): self._spmat = [] @@ -102,11 +104,13 @@ namespace mfem { %} %pythonprepend DiscreteLinearOperator::AddDomainInterpolator %{ if not hasattr(self, "_integrators"): self._integrators = [] + di = args[0] self._integrators.append(di) di.thisown=0 %} %pythonprepend DiscreteLinearOperator::AddTraceFaceInterpolator %{ if not hasattr(self, "_integrators"): self._integrators = [] + di = args[0] self._integrators.append(di) di.thisown=0 %} diff --git a/mfem/_par/nonlinearform.i b/mfem/_par/nonlinearform.i index 83d70fc9..546b6428 100644 --- a/mfem/_par/nonlinearform.i +++ b/mfem/_par/nonlinearform.i @@ -23,6 +23,7 @@ import_array(); namespace mfem { %pythonprepend NonlinearForm::AddDomainIntegrator %{ # if not hasattr(self, "_integrators"): self._integrators = [] + nlfi = args[0] # self._integrators.append(nlfi) nlfi.thisown=0 %} @@ -33,13 +34,14 @@ namespace mfem { %} %pythonprepend NonlinearForm::AddBdrFaceIntegrator %{ # if not hasattr(self, "_integrators"): self._integrators = [] + nlfi = args[0] # self._integrators.append(nlfi) - nlfi = args[0] nlfi.thisown=0 %} %pythonprepend BlockNonlinearForm::AddDomainIntegrator %{ # if not hasattr(self, "_integrators"): self._integrators = [] -# self._integrators.append(nlfi) + nlfi = args[0] +# self._integrators.append(nlfi) nlfi.thisown=0 %} %pythonprepend BlockNonlinearForm::AddInteriorFaceIntegrator %{ @@ -49,8 +51,8 @@ namespace mfem { %} %pythonprepend BlockNonlinearForm::AddBdrFaceIntegrator %{ # if not hasattr(self, "_integrators"): self._integrators = [] + nlfi = args[0] # self._integrators.append(nlfi) - nlfi = args[0] nlfi.thisown=0 %} } diff --git a/mfem/_ser/bilinearform.i b/mfem/_ser/bilinearform.i index 2907c613..37c9f670 100644 --- a/mfem/_ser/bilinearform.i +++ b/mfem/_ser/bilinearform.i @@ -75,6 +75,7 @@ namespace mfem { %} %pythonprepend MixedBilinearForm::AddDomainIntegrator %{ if not hasattr(self, "_integrators"): self._integrators = [] + bfi = args[0] self._integrators.append(bfi) bfi.thisown=0 %} @@ -103,11 +104,13 @@ namespace mfem { %} %pythonprepend DiscreteLinearOperator::AddDomainInterpolator %{ if not hasattr(self, "_integrators"): self._integrators = [] + di = args[0] self._integrators.append(di) di.thisown=0 %} %pythonprepend DiscreteLinearOperator::AddTraceFaceInterpolator %{ if not hasattr(self, "_integrators"): self._integrators = [] + di = args[0] self._integrators.append(di) di.thisown=0 %} diff --git a/mfem/_ser/nonlinearform.i b/mfem/_ser/nonlinearform.i index 4f35dd86..eeae8c5b 100644 --- a/mfem/_ser/nonlinearform.i +++ b/mfem/_ser/nonlinearform.i @@ -26,6 +26,7 @@ import_array(); namespace mfem { %pythonprepend NonlinearForm::AddDomainIntegrator %{ # if not hasattr(self, "_integrators"): self._integrators = [] + nlfi = args[0] # self._integrators.append(nlfi) nlfi.thisown=0 %} @@ -36,13 +37,14 @@ namespace mfem { %} %pythonprepend NonlinearForm::AddBdrFaceIntegrator %{ # if not hasattr(self, "_integrators"): self._integrators = [] -# self._integrators.append(nlfi) nlfi = args[0] +# self._integrators.append(nlfi) nlfi.thisown=0 %} %pythonprepend BlockNonlinearForm::AddDomainIntegrator %{ # if not hasattr(self, "_integrators"): self._integrators = [] -# self._integrators.append(nlfi) + nlfi = args[0] +# self._integrators.append(nlfi) nlfi.thisown=0 %} %pythonprepend BlockNonlinearForm::AddInteriorFaceIntegrator %{ @@ -52,8 +54,8 @@ namespace mfem { %} %pythonprepend BlockNonlinearForm::AddBdrFaceIntegrator %{ # if not hasattr(self, "_integrators"): self._integrators = [] + nlfi = args[0] # self._integrators.append(nlfi) - nlfi = args[0] nlfi.thisown=0 %} }