AttributeError: '_ProductDiscreteOperator' object has no attribute 'is_barycentric'


This I’m having this error message AttributeError: '_ProductDiscreteOperator' object has no attribute 'is_barycentric'on the following piece of code:

identity = bempp.api.operators.boundary.sparse.identity(space, space, space)
dlp = bempp.api.operators.boundary.helmholtz.double_layer(space, space, space,k) 
hyp = bempp.api.operators.boundary.helmholtz.hypersingular(space, space, space, k)
ntd = bempp.api.operators.boundary.helmholtz.osrc_ntd(space, k)

burton_miller = .5 * identity - dlp - ntd * hyp

dirichlet_grid_fun_monopole = bempp.api.GridFunction(space, fun=dirichlet_fun_monopole)
neumann_grid_fun_monopole = bempp.api.GridFunction(space, fun=neumann_fun_monopole)
rhs_fun = dirichlet_grid_fun_monopole - ntd * neumann_grid_fun_monopole

discrete_op = burton_miller
coeffs = rhs_fun

# solve linear system
x, info = gmres(discrete_op, coeffs, maxiter = 200,restart=100,tol = tol_gmres)

total_field = bempp.api.GridFunction(discrete_op, coefficients=x)

The error arises on the call to total_field = bempp.api.GridFunction(discrete_op, coefficients=x)

I am new to BEMPP and probably I am missing something.

Thanks in advance,

The function GridFunction() needs a Space object as input. Please change your line of code to
total_field = bempp.api.GridFunction(space, coefficients=x)