cedar-framework/cedar

BoxMG coarse-grid solve option fails

Closed this issue · 2 comments

The config option for using a BoxMG coarse-grid solve with the MPI BoxMG does not stop the LU solver setup from being called. This was introduced in recent refactoring and is caused by incorrectly overriding multilevel methods from the MPI solver.

The multilevel destructor is called when the distributed BoxMG is cleaned up. This incorrectly calls delete[] on an array that is used for the Cholesky coarse grid solve when the serial BoxMG is used for the coarse-grid solve. Since this array was never allocated, the program terminates with an exception.

The derived classes allocate the above array, so it should be the job of the derived class to delete this array. I will move this deletion to the derived class destructor.