CalcElementVector - macOS RuntimeError: std::bad_cast

More
4 years 2 months ago #3110 by creativeworker
Hello,

I use the following code-snippet without any problems on windows.
Code:
for el in fes.Elements(VOL): elvec = f_int_lfi.CalcElementVector (el.GetFE(), el.GetTrafo())
On macOS (installation via conda) Python 3.7.3, ngsolve 6.2.2007 it fails with RuntimeError: std::bad_cast.
I use H1 elements for fes. Anyone a tip where this difference between macOS and Windows could be relevant for this function?

With kind regards,
More
4 years 2 months ago #3113 by joachim
without seeing the full code it's difficult to say whether windows of macOS are right. I am not aware of an essential difference.
More
4 years 2 months ago - 4 years 2 months ago #3122 by creativeworker
I see your point. Up to now I was not able to generate a minimal example that has the same issue. It seems that the function el.GetTrafo() throws the error: *** RuntimeError: std::bad_cast.
Last edit: 4 years 2 months ago by creativeworker. Reason: refining the question.
More
4 years 2 months ago #3123 by creativeworker
Hello,
I now found a perfect minimal example to show the behavior. The attached file runs fine on windows and fails on macOS.
It seems to have something to do with the SetDeformation command on the mesh.
Perhaps this helps you to check what could go wrong here.

File Attachment:

File Name: element_ve...shDef.py
File Size:1 KB
More
4 years 2 months ago #3135 by joachim
fixed in the latest nightly release,
thanks for the report,
Joachim
The following user(s) said Thank You: creativeworker
Time to create page: 0.102 seconds