bempp / bempp-cl

A fast Python based just-in-time compiling boundary element library
http://www.bempp.com
MIT License
137 stars 38 forks source link

The problem of FEM-BEM coupling when using fenics-dolfinx [v0.6.0] #184

Closed fegshen closed 1 year ago

fegshen commented 1 year ago

I installed fenics-dolfinx [v0.6.0] from source and tried to run the bempp-cl test code. Is there a bug in bempp/api/external/fenicsx.py in [line19]? image

And If I modified the source code in bempp/api/external/fenicsx.py in [lines 18-23] as:

boundary = entities_to_geometry(
        fenics_mesh,
        fenics_mesh.topology.dim - 1,
        exterior_facet_indices(fenics_mesh.topology),
        True,
    )

then everything is PASSED.

mscroggs commented 1 year ago

I added that .cpp_object recently to reflect a change in FEniCSx, but maybe that change happened since v0.6.0. I'll check and probably revert it until the next FEniCSx release

mscroggs commented 1 year ago

I've added a try...except so that the coupling can work with older and newer versions of FEniCSx (#185, will be merged once tests pass). Let me know if it still doesn't work

fegshen commented 1 year ago

Thank you! All the unit tests passed in my desktop computer.