KikeM / romtime

Unsteady Finite Element Reduced Order Model for Time Moving Domains
1 stars 1 forks source link

BUG : Incorrect Mass Matrix Interpolation (MDEIM) #21

Closed KikeM closed 3 years ago

KikeM commented 3 years ago

For the fixed domain problem, the mass matrix is constant for all parameters and time. Therefore, the interpolation should be exact, since there is only one basis vector: the matrix itself. This means that the errors between the naive ROM with or without hyperreduction of the mass matrix should be the same.
However, when I fixed KikeM/msc-thesis#38 and launched again the tests, I realised the error was higher than what I expected.

The only difference was the mass matrix, whose interpolation is now correctly used. But if the error was different, it meant that the mass matrix was different.

To have a better understanding, I parametrised the tests in tests/test_mdeim.py to assemble and interpolate the mass matrix too (those tests build the FOM operator reusing training parameters, and for the simple linear scenarios I am dealing with now it means that the FOM operator should be the same).

To my surprise, it is not being correctly built.

The reason: the Dirichlet entry is being selected as the interpolation node, but since the local assembly does not impose the boundary conditions, the FOM value corresponds to the integral of the boundary basis function. The value of this integral is never seen in the FOM operator during the snapshot collection step, since it is overridden by the Dirichlet boundary conditions. As a consequence, when the theta function is computed, an incorrect value is used in the RHS of the linear system.