# AttributeError: '\_ProductDiscreteOperator' object has no attribute 'is\_barycentric'

**URL:** <https://bempp.discourse.group/t/attributeerror-productdiscreteoperator-object-has-no-attribute-is-barycentric/130>\
**Category:** Bempp\
**Created:** [28 March 2022 09:56 UTC](https://bempp.discourse.group/t/attributeerror-productdiscreteoperator-object-has-no-attribute-is-barycentric/130 "2022-03-28T09:56:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo](https://yyz2.discourse-cdn.com/free1/user_avatar/bempp.discourse.group/gustavo/32/36_2.png) [@Gustavo](https://bempp.discourse.group/u/Gustavo)\
**Post date:** [28 March 2022 09:56 UTC](https://bempp.discourse.group/t/attributeerror-productdiscreteoperator-object-has-no-attribute-is-barycentric/130/1 "2022-03-28T09:56:51Z")

</div>

Hi,

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

```auto
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,  
Gustavo

---

<div class="post-metadata">

**Author:** ![Elwin](https://yyz2.discourse-cdn.com/free1/user_avatar/bempp.discourse.group/elwin/32/38_2.png) [@Elwin](https://bempp.discourse.group/u/Elwin)\
**Post date:** [28 March 2022 11:51 UTC](https://bempp.discourse.group/t/attributeerror-productdiscreteoperator-object-has-no-attribute-is-barycentric/130/2 "2022-03-28T11:51:46Z")

</div>

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