drwells / fiddle

4 stars 3 forks source link

Return the normal vector with the flux. #182

Closed drwells closed 1 year ago

drwells commented 1 year ago

A problem we have in the heart model is that these surface meshes have well-defined but arbitrary (it depends on deal.II internals and the order of nodes in the nodeset) orientation. Hence we need a way to check at, e.g., an outflow, if the flux is the flux into the domain or out of it.

We already loop across the cells when we compute the flux so computing the mean normal vector is no more expensive than what we already have. Lets return it with the flux and let the caller decide if the sign should be flipped.