Skip to content
Snippets Groups Projects
Commit cfbe464f authored by Robert K's avatar Robert K
Browse files

[bugfix][rk.py] Consequently use xtmp instead of self.x

parent f5d28668
No related branches found
No related tags found
No related merge requests found
Pipeline #36937 passed
......@@ -56,7 +56,6 @@ class HelmholtzButcher:
self.op = op
self._alpha = None
self.res = op.space.interpolate(op.space.dimRange*[0],name="res")
self.x = op.space.interpolate(op.space.dimRange*[0],name="res")
self.counter = 0
self.inner_counter = 0
@property
......@@ -70,8 +69,8 @@ class HelmholtzButcher:
xtmp = self.op.space.function("x_tmp", dofVector=x_coeff)
xtmp *= self.alpha
xtmp += self.baru
self.op(self.x, self.res)
self.res -= self.x
self.op(xtmp, self.res)
self.res -= xtmp
return self.res.as_numpy
def solve(self,baru,target):
......@@ -94,7 +93,6 @@ class HelmholtzShuOsher:
self.op = op
self._alpha = None
self.res = op.space.interpolate(op.space.dimRange*[0],name="res")
self.x = op.space.interpolate(op.space.dimRange*[0],name="res")
self.counter = 0
self.inner_counter = 0
@property
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment