Generic kernels: Select fluxes,ncp similar as for optimised kernels?
This issue is open for discussion.
Working with new ExaHyPE users has revealed that they often are not familar with the object-oriented programming concept of inheritance. Especially, they do not know how to overriding virtual functions of the AbstractMySolver class. They are further not familiar with the keywords "virtual" and "override".
This issue makes it difficult for them to select the right PDE kernels (flux,ncp,...) for their application. Even worse: The code might even compile and run but it will not perform the expected calculations. Such an error is very hard to detect in practice. Especially for a new ExaHyPE user.
Toolkit-based solution (open for discussion)
JM has moved the selection of the PDE kernels to the toolkit by requiring the user to specify the kernels in the following way:
kernels const = optimised::fluxes::nonlinear // flux only
kernels const = optimised::fluxes::ncp::nonlinear // flux and ncp
kernels const = optimised::fluxes::ncp::source::nonlinear // flux and ncp, source
In my opinion, this is the better approach. The "const" modifier of "kernels" indicates that the user has to rerun the toolkit everytime he selects different PDE-kernels The toolkit will then update the AbstractSolver Header file.
The compiler will deal with any inconsistencies between the files:
The compiler will tell you if you have not implemented a kernel you have specified - not an assertion as it is the case right now. (Users often do not even know about the Asserts Mode.)
The compiler will tell you if you have implemented a method which is not called. You should then comment out the implementation or remove it.
What is your opinion?
Please comment below.