Skip to content

Draft: Fix PhysDeriv_SumFac_Hex

The previous implementation of the operator() in the class PhysDeriv_SumFac_Hex has a bug. The bug is located on line 1423, where the first index into the two dimensional array m_derivFac was set to [i*e+j]. This has now been corrected to [i*3+j].

It should be noted that the code may still run with this bug, but the results will of course not be 100% correct. If the code is compiled in debug mode, an error is raised by boost due to index out of bounds (the 2D array is a boost class).

A simple way to test whether the code produces correct results is to create a uniform flow through a cube with a few elements. If the physical derivative is wrong, then the vertical velocity (which should be identically 0), is in the order of 1E-13.

Edited by Daniel Lindblad

Merge request reports