Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
View for unknowns in implSysFlatten
Browse files Browse the repository at this point in the history
lisawim committed Feb 23, 2024
1 parent c359d22 commit 5921aff
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions pySDC/projects/DAE/misc/ProblemDAE.py
Original file line number Diff line number Diff line change
@@ -57,13 +57,12 @@ def solve_system(self, impl_sys, u0, t):
me = self.dtype_u(self.init)

def implSysFlatten(unknowns, **kwargs):
me[:] = unknowns.reshape(me.shape)
sys = impl_sys(me, **kwargs)
sys = impl_sys(unknowns.reshape(me.shape).view(type(u0)), **kwargs)
return sys.flatten()

opt = root(
implSysFlatten,
u0.flatten(),
u0,
method='hybr',
tol=self.newton_tol,
)
3 changes: 1 addition & 2 deletions pySDC/projects/DAE/sweepers/fully_implicit_DAE.py
Original file line number Diff line number Diff line change
@@ -107,8 +107,7 @@ def implSystem(params):
System to be solved as implicit function.
"""

params_mesh = P.dtype_f(P.init)
params_mesh[:] = params.reshape(params_mesh.shape)
params_mesh = P.dtype_f(params)

# build parameters to pass to implicit function
local_u_approx = P.dtype_f(u_approx)

0 comments on commit 5921aff

Please sign in to comment.