### weighted residuals evaluation

106

views

0

To compute a posteriori error estimators it is needed to evaluate weighted face/element residuals. Before I used:

```
h_faces = FacetArea(mesh)
h_elems = CellVolume(mesh)
```

But the problem is that dolfin-adjoint can not derive gradients of these functions.

Is there any effective built-in functions instead?

Thanks!

Community: FEniCS Project

Please login to add an answer/comment or follow this question.

Yes, I want to derive gradients from error estimator. Actually, I want to implement the topology optimization problem with regularization by a posteriori error estimator. The code looks as follows (it is just the tutorial on linear elasticity + few strings dolfin-adjoint code to derive gradients):

It works well for h_cells and it used to work well for h_faces('+'), but now it gives the following error:

Thank you in advance!