From 4cb34acc8205045b5a908db995c68c4c364c44bc Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 8 Oct 2026 10:28:50 -0400 Subject: [PATCH] docs(equations): added contributions documentation --- docs/filters/{requires.py => custom_sections.c} | 0 docs/filters/meson.build | 0 src/include/serif/equations/angular_momentum.hpp | 2 ++ src/include/serif/equations/arithmetic.hpp | 6 ++++++ 4 files changed, 8 insertions(+) rename docs/filters/{requires.py => custom_sections.c} (100%) create mode 100644 docs/filters/meson.build diff --git a/docs/filters/requires.py b/docs/filters/custom_sections.c similarity index 100% rename from docs/filters/requires.py rename to docs/filters/custom_sections.c diff --git a/docs/filters/meson.build b/docs/filters/meson.build new file mode 100644 index 00000000..e69de29b diff --git a/src/include/serif/equations/angular_momentum.hpp b/src/include/serif/equations/angular_momentum.hpp index c25063f5..31cc8a19 100644 --- a/src/include/serif/equations/angular_momentum.hpp +++ b/src/include/serif/equations/angular_momentum.hpp @@ -39,6 +39,8 @@ namespace serif::equations * * Use this equation in conjunction with a RigidRotation object to constrain the angular momentum of a system to some fixed value. Note that this constraint * is weakly applied and therefore should be checked for convergence in the final solution. + * + * @contribution Residuals to the global angular momentum */ class AngularMomentumConstraint final : public Contribution> { diff --git a/src/include/serif/equations/arithmetic.hpp b/src/include/serif/equations/arithmetic.hpp index f8ef6a0f..46eac4ad 100644 --- a/src/include/serif/equations/arithmetic.hpp +++ b/src/include/serif/equations/arithmetic.hpp @@ -50,6 +50,8 @@ namespace serif::equations { * @param equation The equation to scale. * @param coefficient The coefficient to scale the equation by. Must be finite. * + * @contribution Residuals to all rows which are shared by the summed equations + * * @throws std::invalid_argument If the coefficient is not finite. */ explicit EquationScale( @@ -97,6 +99,8 @@ namespace serif::equations { * * @requires The FirstT and RestTs equations must share the same test type, otherwise the summation is not well-defined. * + * @contribution Residuals to all rows which are shared by the summed equations + * * @note Only equations sharing a residual row can or should be summed together. * * @tparam FirstT The first equation type to sum. @@ -146,6 +150,8 @@ namespace serif::equations { * * @requires The left and right equations must share the same test type, otherwise the subtraction is not well-defined. * + * @contribution Residuals to all rows which are shared by the summed equations + * * @note Only equations sharing a residual row can or should be subtracted from one another. * * @tparam LeftT The left equation type to subtract from.