A strange question about fenicsx

I built the bb Tree in a slightly complex program as follows:
bb_tree = df.geometry.BoundingBoxTree(self.domain, self.tdim)

Oddly enough, the program throws the following error:
TypeError: BoundingBoxTree.__ init__() takes 2 positional arguments but 3 were given

I haven’t had this error in many fenicsx programs before, but now it’s in one program. Also, I did pass 2 positional arguments and assured that there was no problem (because self.domain and self.tdim were in the previous code that builds the network, boundary conditions, etc. with no errors), but it tells me that it’s 3 here.

I’m hard to reproduce this error because it doesn’t happen in other programs.

Python version: 3.12.3

FEniCSx version: v0.9 (both conda and apt)

1 Like

Looks like you might not be correctly using the python interface.

Consider the documentation of the constructor you’re trying to use: dolfinx/python/dolfinx/geometry.py at 5fcb988c5b0f46b8f9183bc844d8f533a2130d6a · FEniCS/dolfinx · GitHub

This refers to the function I think you should be calling to create a bounding box tree: dolfinx/python/dolfinx/geometry.py at 5fcb988c5b0f46b8f9183bc844d8f533a2130d6a · FEniCS/dolfinx · GitHub

1 Like