Problem with CompiledSubDomains in Fenics 2018.1

Dear all,

during postprocessing, I have to acces / change the parameters of a CompiledSubDomain object (details regarding application see Define circle SubDomains with different radii). The following code worked fine for me on 2017.2:

#define domain
intDomain = CompiledSubDomain(’(x[0]-x_tip)(x[0]-x_tip)+(x[1]-y_tip)(x[1]-y_tip) < r_cf*r_cf’,x_tip=xt, y_tip=yt, r_cf=rt)

#change domain’s parameter
intDomain.r_cf=rt_new

Trying the same code with Fenics 2018.1 (version from the docker containers), I get the following error I don’t understand:

intDomain.r_cf=rt_new
AttributeError: ‘dolfin.cpp.mesh.SubDomain’ object has no attribute ‘r_cf’

Does anybody know how to fix this isssue?

Thanks in advance !

The API is different. Referring to the code from the original example you need

circle.set_property('x0', 0.5)
circle.set_property('x1', 0.5)
circle.set_property('r', 0.2)

See: dolfinx/demo_pyvista.py at main · FEniCS/dolfinx · GitHub

Thank you so much!
I will take a look on this.