Hi everyone,

in the electric_integrators (both the mass and the stiffness integrator) the function 'get_preferred_int_order' is called and returns the value 2 (for all types of elements).

I have some questions regarding this:

1. I don't really understand the comment in the code that says "in general we want second order integration for linear Ansatzfunctions". Why is that the case? I always assumed if you have for example linear tetrahedrons with 4 nodes you also only have one integration point (right in the center of the tetrahedron) instead of the 4 that are used if the integration order is set to 2. For the electrical stiffness matrix the results are also the exact same no matter whether we use first or second order integration because the values of the shape function derivatives don't change for the different integration points. So right now, in the current scheme instead of calculating the integral just once (w/ one integration point) we calculate it four times (once per ip) and end up with the same values. I think there is some potential here to save computational time.

2. If we do the same for the mass matrix, we get different results for the different integration orders, however if assembled as a lumped mass matrix, we once again arrive at the same values for both integration orders. If we don't use the lumped assembly we see differences in the integration orders for the mass matrices resulting from the fact that in the integral we are multiplying the linear shape functions leading to a then quadratic function that needs to be integrated and therefore needs additional integration points for the Gauss quadrature. So I can understand the need for an increased integration order in this case.

My question would then be: Is the reason for the comment that we need 2nd order integration for linear elements only related to the calculation of the mass matrix and if so wouldn't it make sense to set the integration order for the stiffness matrix to "int_order = get_preferred_int_order(type) - 1"?

Thank you for answering