This PR fixes the following problem: when we construct an FEIsv, then weights are scaled according to the mappingFEField we submit, which is constructed starting from the bounding box of the agglomeration. Hence, we have to scale them back by a factor of $det(J) J^{-T} n$ for each quadrature point.
While $det(J)$ and $n$ are already known, $J^{-T}$ is not directly available before the construction of the FEIsv and the easiest way to reinit properly is:
first call reinit with the wrongly scaled weights.
collecting the scale factors using $J^{-T}$ (queried from the FEIsv) for every point
update the ImmersedSurfaceQuadrature with the correct weights
reinit again
This is not nice, but it works.
A test checking that $\int_{ \partial A} ds = |\partial A|$ where $A$ is an agglomeration has been added. This simply sums all the JxWs returned by a call of our reinit(cell,face) for every face of an agglomeration.
This PR fixes the following problem: when we construct an
FEIsv
, then weights are scaled according to the mappingFEField we submit, which is constructed starting from the bounding box of the agglomeration. Hence, we have to scale them back by a factor of $det(J) J^{-T} n$ for each quadrature point.While $det(J)$ and $n$ are already known, $J^{-T}$ is not directly available before the construction of the FEIsv and the easiest way to reinit properly is:
ImmersedSurfaceQuadrature
with the correct weightsThis is not nice, but it works.
A test checking that $\int_{ \partial A} ds = |\partial A|$ where $A$ is an agglomeration has been added. This simply sums all the JxWs returned by a call of our
reinit(cell,face)
for everyface
of an agglomeration.https://github.com/fdrmrc/AggloDeal/blob/9407a5508a47be4c025841ce7eabba4108e078d0/test/agglomeration/reinit_cell_face.cc#L92-L95