Files
MeanField_SERiF/docs/man/man3/serif_equations_EquationSum.3
Emily Boudreaux 6b57738330 docs(docs): built docs
Note for now much of the docs is LLM written. This was done to save time and focus on code development. The docs have been LOOSLEY reviewed. However, the code itself has been either fully written by hand or fully reviewed. Therefore, the docs should at the moment be seen as a loose resource rather than authoratiative (and this is on top of the general ability for docs to drift)
2026-11-09 14:09:44 -05:00

140 lines
4.2 KiB
Groff

.TH "serif::equations::EquationSum< FirstT, RestTs >" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
.ad l
.nh
.SH NAME
serif::equations::EquationSum< FirstT, RestTs > \- Sum multiple equations together\&.
.SH SYNOPSIS
.br
.PP
.PP
\fR#include <arithmetic\&.hpp>\fP
.SS "Public Types"
.in +1c
.ti -1c
.RI "using \fBTest\fP = typename FirstT::Test"
.br
.RI "The test type of the summed equations is the same as the test type of the first equation\&. "
.in -1c
.SS "Public Member Functions"
.in +1c
.ti -1c
.RI "\fBEquationSum\fP (FirstT first, RestTs\&.\&.\&. rest)"
.br
.RI "Construct a summed equation\&. "
.ti -1c
.RI "const auto & \fBcontributions\fP () const noexcept"
.br
.RI "Return the contributions of the summed equations\&. "
.in -1c
.SS "Static Public Attributes"
.in +1c
.ti -1c
.RI "static constexpr std::string_view \fBname\fP = 'equation sum'"
.br
.RI "Compile time name for the summed equations, used for debugging and logging\&. "
.in -1c
.SS "Private Attributes"
.in +1c
.ti -1c
.RI "std::tuple< FirstT, RestTs\&.\&.\&. > \fBm_equations\fP"
.br
.RI "The equations being summed together\&. "
.in -1c
.SH "Detailed Description"
.PP
.SS "template<Equation FirstT, Equation\&.\&.\&. RestTs>
.br
requires (std::same_as<typename FirstT::Test, typename RestTs::Test> && \&.\&.\&.)
.br
class serif::equations::EquationSum< FirstT, RestTs >"Sum multiple equations together\&.
This class is a compile-time tag that indicates that the weak contributions from multiple equations should be summed together\&. The actual summation is performed by the backend\&. A simple example would be if two equations are summed together, then the weak contributions from both equations would be integrated and then added together to form the final residual\&. Note also that we do not define a coefficient here\&. The backend only ever sums things, as you can see in \fBEquationDifference\fP to subtract we locally introduce a -1 scaling factor\&.
.PP
Requirements
.PD 0
.IP "\(bu" 2
The FirstT and RestTs equations must share the same test type, otherwise the summation is not well-defined\&.
.PP
.PP
\fBEquation\fP \fBContributions\fP
.PD 0
.IP "\(bu" 2
Residuals to all rows which are shared by the summed equations
.PP
.PP
\fBNote\fP
.RS 4
Only equations sharing a residual row can or should be summed together\&.
.RE
.PP
\fBTemplate Parameters\fP
.RS 4
\fIFirstT\fP The first equation type to sum\&.
.br
\fIRestTs\fP The remaining equation types to sum\&.
.RE
.PP
.SH "Member Typedef Documentation"
.PP
.SS "template<Equation FirstT, Equation\&.\&.\&. RestTs> using \fBserif::equations::EquationSum\fP< FirstT, RestTs >::Test = typename FirstT::Test"
.PP
The test type of the summed equations is the same as the test type of the first equation\&.
.SH "Constructor & Destructor Documentation"
.PP
.SS "template<Equation FirstT, Equation\&.\&.\&. RestTs> \fBserif::equations::EquationSum\fP< FirstT, RestTs >::EquationSum (FirstT first, RestTs\&.\&.\&. rest)\fR [inline]\fP, \fR [explicit]\fP"
.PP
Construct a summed equation\&.
.PP
\fBParameters\fP
.RS 4
\fIfirst\fP The first equation to sum\&.
.br
\fIrest\fP Pack of the remaining equations to sum\&.
.RE
.PP
\fBNote\fP
.RS 4
the constructor uses the initializer list for m_equations, note that the coefficient defaults to 1\&.0
.RE
.PP
.SH "Member Function Documentation"
.PP
.SS "template<Equation FirstT, Equation\&.\&.\&. RestTs> const auto & \fBserif::equations::EquationSum\fP< FirstT, RestTs >::contributions () const\fR [inline]\fP, \fR [nodiscard]\fP, \fR [noexcept]\fP"
.PP
Return the contributions of the summed equations\&.
.PP
\fBReturns\fP
.RS 4
A tuple containing the contributions of the summed equations\&.
.RE
.PP
.SH "Member Data Documentation"
.PP
.SS "template<Equation FirstT, Equation\&.\&.\&. RestTs> std::tuple<FirstT, RestTs\&.\&.\&.> \fBserif::equations::EquationSum\fP< FirstT, RestTs >::m_equations\fR [private]\fP"
.PP
The equations being summed together\&.
.SS "template<Equation FirstT, Equation\&.\&.\&. RestTs> std::string_view \fBserif::equations::EquationSum\fP< FirstT, RestTs >::name = 'equation sum'\fR [static]\fP, \fR [constexpr]\fP"
.PP
Compile time name for the summed equations, used for debugging and logging\&.
.SH "Author"
.PP
Generated automatically by Doxygen for SERiF from the source code\&.