KikeM / romtime

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

BUG : Incorrect discrete norm calculation #25

Closed KikeM closed 3 years ago

KikeM commented 3 years ago

The continuous L2 norm, which is an integral over the domain

||x||_2 = \sqrt{\int x^2 dx}

translates into the discrete L2 norm divided by the number of elements in the vector (which is what dx represents),

||x||_2 = \sqrt{\frac{1}{N} \sum x_i^2}

The bug was that I was dividing by the number of elements in the vector, not the square root.