Here is example of using the KP function to solve hyperbolic PDE (here, model for penstock with compressible water and elastic walls is used).
All calculation of the variables that is used for defining
eigenvalues, source term S and vector F are implemented in
additional function BasicEquation which used one time
for centered values and then for boundary values.