flatironinstitute / FMM3D

Flatiron Institute Fast Multipole Libraries --- This codebase is a set of libraries to compute N-body interactions governed by the Laplace and Helmholtz equations, to a specified precision, in three dimensions, on a multi-core shared-memory machine.
https://fmm3d.readthedocs.io
Other
101 stars 39 forks source link

docs improvements/typos (MATLAB all kernels; Fortran just Stokes) #37

Closed ahbarnett closed 1 year ago

ahbarnett commented 1 year ago

This documents the MATLAB/octave interfaces better for all 4 kernels, and the Stokes fortran source code docs. It does not change the website (docs/) or any lines of code apart from one example.

Mixture of:

Note: since I had to run "make mex" there are some gateway .c diffs. Let me know if problem.

To do: (not in this PR?)

Discussion: aim to reduce duplication of docs, otherwise future changes will be hard to maintain. Clearly matlab interfaces should have own docs, as we have. But fortran source duplicates the RTD website. One option is have sources point to website for main interfaces, but internal subroutines all stay documented in the source.

askhamwhat commented 1 year ago

@ahbarnett The documentation changes look great.

For your bullets above:

askhamwhat commented 1 year ago

I decided not to pull the documentation change for source vs target sums through the Fortran for now as this would be a larger scale change (and the Fortran docs are not consistent with each other currently). I agree that this should probably be made clear.

askhamwhat commented 1 year ago

@mrachh you're off the hook for the emfmm3d docs. I put in the formulae.

mrachh commented 1 year ago

These look great guys. Thanks!

@ahbarnett: Did you pull through the docs from the .mw file or edited the .m files after generating them through mwrap. When I regenerate them on my machine, it seems that they were later edited so that the docs are not consistently generated.

This has been fixed now.

Regarding the other todo's

I've renamed some test files to be more consistent with matlab test notation, and updated contents.m accordingly

askhamwhat commented 1 year ago

@mrachh I think I messed that up (docs in the .m instead of the .mw). I can try to fix. I think Alex made the changes in the .mw...

ahbarnett commented 1 year ago

Yes I did change the .mw, as the SSOT. But at the very end I forgot to run make mex to propagate changes to the .m - sorry about that. Looks like you fixed that, plus other good stuff.

I might suggest that emfmm3d return U.Etarg, U.curlEtarg, U.divEtarg for consistency. That way when source-eval is added, it won't break user code! That should be a separate PR since it's not just a doc change.

In general, there is a duplication problem in docs that's worth fixing. Ie, thinking about SSOT for updating local (language-facing) docs vs website (docs/*.rst) needs to be done. Eg, can the website Matlab section simply auto-paste in the .m docs? Otherwise we'll be always spending 2-3 times longer than needed keeping multiple docs consistent and updated... Cheers, Alex