November 16th, 2011, 12:45 am
With regards to the coding standards, much of your comments were due to laziness for composing the message. The primary violation is with the variable names. My actual code ensures const and passing by reference.I fully agree about the compile time computation and sizes. I have a paper that uses a recurrence relation for computing the coefficients. Unfortunately, it computes a table of the coefficients from derivative 0 to derivative M, where M is input by the user. This results in needing an array that is Nx(M + 1) elements. I should be able to create a recursive compile time definition once I understand the paper. One problem with calculating the weights by hand is you have to know a priori the number of points to the left and right as well as the step between the points. I strongly suspect that I am going need your bindings for implementing a fairly general compile time solution.Right now, I am ignoring all of that so I can get an initial version coded and tested. For now, if the grid spacing does not change dynamically, the user will be able to calculate the weights once then repeatedly apply those weights to the grid points as needed.