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

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

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/ at main · FEniCS/dolfinx · GitHub

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