Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spline parameter for moving atrium simulation #154

Open
lshahid opened this issue Aug 30, 2024 · 0 comments
Open

Spline parameter for moving atrium simulation #154

lshahid opened this issue Aug 30, 2024 · 0 comments

Comments

@lshahid
Copy link

lshahid commented Aug 30, 2024

Hello,

I am trying to run the moving atrium simulation, but I am getting this error:

Creating initial folders
Loading displacement points
Creating splines for displacement
/home/lshahid/miniconda3/envs/oasismove/lib/python3.11/site-packages/scipy/interpolate/_fitpack_py.py:295: RuntimeWarning: The maximal number of iterations (20) allowed for finding smoothing
spline with fp=s has been reached. Probable cause: s too small.
(abs(fp-s)/s>0.001)
res = _impl.splrep(x, y, w, xb, xe, k, task, s, t, full_output, per, quiet)

The MovingAtrium.py file states that the spline parameter needs to be set objectively.

def eval(self, _, x):
    self.counter += 1
    _, index = self.tree.query(x)
    # FIXME: Set spline parameter objectively
    s = 1E-2
    x_ = splrep(self.time, self.points[index, 0, :], s=s, per=True)
    y_ = splrep(self.time, self.points[index, 1, :], s=s, per=True)
    z_ = splrep(self.time, self.points[index, 2, :], s=s, per=True)

    self.motion_mapping[self.counter] = [x_, y_, z_]

How can I fix this problem? Is there a value of s that works for this problem? I tried iterating with a large range of values of s but none of them wroked.

I would appreciate your help with this.

Thanks,
Labib

@lshahid lshahid changed the title Spline parameter fro moving atrium simulation Spline parameter for moving atrium simulation Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant