Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of the DFT derivative #20

Open
rhodrin opened this issue Oct 26, 2018 · 5 comments
Open

Implementation of the DFT derivative #20

rhodrin opened this issue Oct 26, 2018 · 5 comments
Assignees
Labels

Comments

@rhodrin
Copy link
Contributor

rhodrin commented Oct 26, 2018

In another branch I've added derivative functionality but the implementation is currently horrible.

I think the interface (Solution dsol = sol.diff(n);) is fine but diff being a member function of Class Solution leads to some nasty stuff. Currently dsol is computed in Solution.cpp which it shouldn't be, but introducing a new, i.e., DFTDerivative class leads to some circular dependencies.

From some Fixme comments I gather you were thinking of doing some restructuring of the Solution class anyway? If you've got any suggestions on how you think the derivative code should be structured please let me know!

@ehkropf
Copy link
Owner

ehkropf commented Oct 26, 2018

I'll have a think about this over the weekend. Thanks.

@ehkropf ehkropf self-assigned this Oct 26, 2018
@ehkropf
Copy link
Owner

ehkropf commented Oct 27, 2018

I think this can be done by

  1. adding a derivative() method to ClosureInterpolant (and related classes),
  2. and then making Solution a ClosureInterpolant.

I think I meant to make more use of ClosureInterpolant, but didn't quite get that refactoring done.

@ehkropf
Copy link
Owner

ehkropf commented Oct 28, 2018

Solution is now a ClosureInterpolant as of #21. Remaining: adding derivative() to

  1. RealInteroplant,
  2. ComplexInterpolant, and
  3. ClosureInterpolant
    in that order.

@ehkropf
Copy link
Owner

ehkropf commented Oct 28, 2018

I think everything is in place with f594aad (dev branch) except for the actual modification of the DFT values and the derivative test functions. All real derivative work is done in RealInterpolant (see the TODO notes in derivative() there).

@rhodrin
Copy link
Contributor Author

rhodrin commented Oct 29, 2018

Thanks. Will take a more detailed look this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants