Difficulty using the Hermite basis

159 views
Skip to first unread message

Manohar Teja

unread,
Jul 8, 2022, 11:59:01 AM7/8/22
to dedalu...@googlegroups.com
Hello,

I am trying to simulate the Rayleigh-Taylor instability problem, which basically consists of a heavy fluid superposed over a lighter fluid. So the problem involves a sharp interface at the center. I've tried Chebyshev basis and it works fine but I would like to try Hermite basis since it has a better resolution at the center.

I couldn't find a reference for implementation of Hermite basis, but looking into basis.py I tried to implement the Hermite basis as below:
y_basis = de.Hermite('y', ny, center=0.0, stretch=1.0, dealias=1)
(ny is number of grid points)
However, I am unable to run the simulation.
The simulation gives different errors with different ny
For ny = 600, the error is displayed in Figure 1
For ny = 300, the simulation throws a segmentation error. I am not sure which unavailable address is the simulation trying to access. Error shown in Figure 2

So, primarily I would like to know if my implementation of hermite basis is correct. If it is, I would like to understand what the errors mean?

Regards.
Manohar Teja Kalluri
CGAFD, Univ of Exeter
Figure1.png
Figure2.png

mncr...@gmail.com

unread,
Jul 8, 2022, 12:11:22 PM7/8/22
to Dedalus Users
Hi,

It looks like you're using dedalus 2. I vaguely remember there being an issue on some systems for how the Hermite and Laguerre basis points were calculated (something to do with the factorial not working?). Have you tried "python3  -m dedalus test" and what happens?

If it is this problem, you can just edit some of the lines as described here: https://groups.google.com/g/dedalus-users/c/iQrUBz2Vx9k/m/aPHLzjpgAwAJ

If not, I think we'd need to see your full script.

Best,

Matthew

Manohar Teja

unread,
Jul 11, 2022, 4:52:50 AM7/11/22
to dedalu...@googlegroups.com
Hi,

Thank you for the response. I am using v2 of Dedalus. I have tried running dedalus test and it shows the following error

=========================================== short test summary info ============================================
FAILED miniconda3/envs/dedalus2/lib/python3.10/site-packages/dedalus/tests/test_bvp.py::test_gaussian_free[Hermite-128-float64]
FAILED miniconda3/envs/dedalus2/lib/python3.10/site-packages/dedalus/tests/test_bvp.py::test_gaussian_free[Hermite-128-complex128]
FAILED miniconda3/envs/dedalus2/lib/python3.10/site-packages/dedalus/tests/test_evp.py::test_qho_dense_evp[Hermite-128-complex128]
======================= 3 failed, 172 passed, 24 skipped, 2 xfailed, 2 warnings in 5.81s ======================

So, there seems to be some issue with the Hermite basis.
However, I compared the current basis.py file with the committed version (https://github.com/DedalusProject/dedalus/commit/efb13bdaa09816dde3eee897bc2a15fc284ea2f1) and it is the same.

Regards
Manohar
CGAFD, Univ of Exeter


On Fri, Jul 8, 2022 at 5:26 PM Manohar Teja <manohartej...@gmail.com> wrote:
Hi Matthew,

Thank you for the response. I am using v2 of Dedalus. I have tried running dedalus test and it shows the following error

=========================================== short test summary info ============================================
FAILED miniconda3/envs/dedalus2/lib/python3.10/site-packages/dedalus/tests/test_bvp.py::test_gaussian_free[Hermite-128-float64]
FAILED miniconda3/envs/dedalus2/lib/python3.10/site-packages/dedalus/tests/test_bvp.py::test_gaussian_free[Hermite-128-complex128]
FAILED miniconda3/envs/dedalus2/lib/python3.10/site-packages/dedalus/tests/test_evp.py::test_qho_dense_evp[Hermite-128-complex128]
======================= 3 failed, 172 passed, 24 skipped, 2 xfailed, 2 warnings in 5.81s ======================

So as you said there seems to be some issue with the Hermite basis.
However, I don't think it is because of an old version of the basis.py file. I compared the current basis.py file with the committed version (https://github.com/DedalusProject/dedalus/commit/efb13bdaa09816dde3eee897bc2a15fc284ea2f1) and it is the same.

Here is the python script file for your reference

Regards
Manohar
CGAFD, Univ of Exeter


--
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dedalus-users/e826754a-8049-4479-974e-28b9dd773876n%40googlegroups.com.

Keaton Burns

unread,
Jul 11, 2022, 4:52:10 PM7/11/22
to dedalu...@googlegroups.com
Hi Manohar,

Can you give it a try with the latest commits from the “v2_master” branch?  I think all of the old issues with Hermite/Laguerre should be fixed on that branch.

Best,
-Keaton


Manohar Teja

unread,
Jul 15, 2022, 6:55:47 AM7/15/22
to dedalu...@googlegroups.com
Hi Keaton,

Thank you for the mail and sorry for the late reply. I was occupied with urgent work.
With the latest commits from v2_master, the dedalus test doesn't show any error. However, it shows 2xfailed. Just wanted to know if it is fine to get this?

============================================= test session starts ==============================================
platform linux -- Python 3.10.5, pytest-7.1.2, pluggy-1.0.0
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/mk737
plugins: benchmark-3.4.1, cov-3.0.0, parallel-0.1.1
collected 207 items                                                                                            
pytest-parallel: 8 workers (processes), 1 test per worker (thread)
..................................................................................................................................................................................................................................ss......ss...........s.sssss........ss.......s.s.s..s.ss....s.s......s..s...ssssxx..ss........ss..ss....ss....ss........ssss......ss....ss........ssss......xx..............................
================================== 181 passed, 24 skipped, 2 xfailed in 2.53s ==================================

While all the tests are passed, the code still shows some error which can be seen from the image attached. Does it mean that the error is in the python script that I am running?
(PS: If I use the Chebyshev basis, the code runs fine, but when I change to Hermite basis it throws the error shown in error.png image. The Hermite basis is implemented as y_basis = de.Hermite('y', ny, center=0.0, stretch=1.0, dealias=3/2))

Regards
Manohar
CGAFD, Univ of Exeter

Error.png
Reply all
Reply to author
Forward
0 new messages