Implement volume integral for fields
For the CG algorithm to solve periodic problems, the integral of the RHS over the domain should be zero. In addition, once the algorithm terminates, the average of the LHS over the domain (given by the volume integral divided by the volume of the domain) should be subtracted, additive constants are irrelevant. This also removes the effects of poor initial values of the LHS.
Possible quadrature methods:
-
Midpoint rule (implemented in !87 (merged))
(Edit this issue if other methods should be added)
Edited by vinciguerra_a