A posteriori adaptmesh

Hello,

I saw an example regarding a posteriori error but it’s done in a node. Is there a way to compute the a posteriori in an element K and pass that information to adaptmesh?