Files
MeanField_SERiF/docs/latex/equations_2contributions_8hpp.tex
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

74 lines
8.4 KiB
TeX

\doxysection{src/include/serif/equations/contributions.hpp File Reference}
\hypertarget{equations_2contributions_8hpp}{}\label{equations_2contributions_8hpp}\index{src/include/serif/equations/contributions.hpp@{src/include/serif/equations/contributions.hpp}}
File containing the Contribution struct. This is effectively a helper struct for authoring equations with fewer lines of boiler-\/plate. The idea here is that every equation must report certain members so that the backend can inspect at compile time. An author could certainly write these members themselves, but the Contribution struct auto generates those members based on its template parameters. Therefore, by inheriting from the Contribution struct an equation author can avoid writing those members themselves. Note that while this is inheritance it is still a compile-\/time relation. Contribution does not add any runtime overhead to the equation.
{\ttfamily \#include $<$tuple$>$}\newline
{\ttfamily \#include $<$type\+\_\+traits$>$}\newline
{\ttfamily \#include $<$utility$>$}\newline
{\ttfamily \#include "{}serif/discretization/blocks/traits.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/discretization/forms/operands.\+hpp"{}}\newline
Include dependency graph for contributions.\+hpp\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{equations_2contributions_8hpp__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{equations_2contributions_8hpp__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{structserif_1_1equations_1_1_contribution}{serif\+::equations\+::\+Contribution$<$ Test\+Operand\+T, Support\+T $>$}}
\begin{DoxyCompactList}\small\item\em A helper struct for authoring equations with fewer lines of boiler-\/plate. The idea here is that every equation must report certain members so that the backend can inspect at compile time. An author could certainly write these members themselves, but the \doxylink{structserif_1_1equations_1_1_contribution}{Contribution} struct auto generates those members based on its template parameters. Therefore, by inheriting from the \doxylink{structserif_1_1equations_1_1_contribution}{Contribution} struct an equation author can avoid writing those members themselves. Note that while this is inheritance it is still a compile-\/time relation. \doxylink{structserif_1_1equations_1_1_contribution}{Contribution} does not add any runtime overhead to the equation. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1equations_1_1_test_operand_traits}{serif\+::equations\+::\+Test\+Operand\+Traits$<$ T, typename $>$}}
\begin{DoxyCompactList}\small\item\em A helper struct to extract the test operand type from a contribution or equation. This is used to determine the test type of an equation or contribution. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1equations_1_1_test_operand_traits_3_01_t_00_01std_1_1void__t_3_01typename_01_t_1_1_test_operand_01_4_01_4}{serif\+::equations\+::\+Test\+Operand\+Traits$<$ T, std\+::void\+\_\+t$<$ typename T\+::\+Test\+Operand $>$ $>$}}
\begin{DoxyCompactList}\small\item\em Specialization of \doxylink{structserif_1_1equations_1_1_test_operand_traits}{Test\+Operand\+Traits} for types that have a Test\+Operand member type. This allows us to extract the test operand type from contributions or equations that define a Test\+Operand type. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1equations_1_1_contribution_support}{serif\+::equations\+::\+Contribution\+Support$<$ T, typename $>$}}
\begin{DoxyCompactList}\small\item\em Helper alias to extract the support type for a given contribution. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1equations_1_1_contribution_support_3_01_t_00_01std_1_1void__t_3_01typename_01_t_1_1_support_01_4_01_4}{serif\+::equations\+::\+Contribution\+Support$<$ T, std\+::void\+\_\+t$<$ typename T\+::\+Support $>$ $>$}}
\begin{DoxyCompactList}\small\item\em Specialization of \doxylink{structserif_1_1equations_1_1_contribution_support}{Contribution\+Support} for types that have a Support member type. This allows us to extract the support type from contributions or equations that define a Support type. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1equations_1_1_contributions}{serif\+::equations\+::\+Contributions$<$ T, typename $>$}}
\begin{DoxyCompactList}\small\item\em Helper struct to pack a list of contributions into a tuple. This is used to define the set of contributions of an equation. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1equations_1_1_contribution_tuple}{serif\+::equations\+::\+Contribution\+Tuple$<$ Tuple\+T, typename $>$}}
\begin{DoxyCompactList}\small\item\em Type representing the contributions of an equation. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1equations_1_1_contribution_tuple_3_01std_1_1tuple_3_01_ts_8_8_8_01_4_00_01std_1_1e282a2c4b2ce56d3b5a3d2dda19385da}{serif\+::equations\+::\+Contribution\+Tuple$<$ std\+::tuple$<$ Ts... $>$, std\+::void\+\_\+t$<$ decltype(std\+::tuple\+\_\+cat(std\+::declval$<$ typename Contributions$<$ std\+::remove\+\_\+cvref\+\_\+t$<$ Ts $>$ $>$\+::type $>$()...))$>$ $>$}}
\begin{DoxyCompactList}\small\item\em Specialization of \doxylink{structserif_1_1equations_1_1_contribution_tuple}{Contribution\+Tuple} for tuples of contributions. This allows us to extract the contributions from a tuple of contributions. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1equations_1_1_contributions_3_01_t_00_01std_1_1void__t_3_01decltype_07std_1_1decl671b42e5568b3715d07217eb0f34ce32}{serif\+::equations\+::\+Contributions$<$ T, std\+::void\+\_\+t$<$ decltype(std\+::declval$<$ const T \& $>$().\+contributions())$>$ $>$}}
\begin{DoxyCompactList}\small\item\em Specialization of \doxylink{structserif_1_1equations_1_1_contributions}{Contributions} for types that have the contributions() method. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item
namespace \mbox{\hyperlink{namespaceserif}{serif}}
\item
namespace \mbox{\hyperlink{namespaceserif_1_1equations}{serif\+::equations}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item
{\footnotesize template$<$typename T$>$ }\\using \mbox{\hyperlink{namespaceserif_1_1equations_ab3b0f61ca51136b0ddf4d868ebdfd8df}{serif\+::equations\+::\+Test\+Operand\+Of}} = \mbox{\hyperlink{structserif_1_1equations_1_1_test_operand_traits}{Test\+Operand\+Traits}}$<$T$>$\+::type
\begin{DoxyCompactList}\small\item\em Helper alias to extract the test operand type from a contribution or equation. \end{DoxyCompactList}\item
{\footnotesize template$<$typename T$>$ }\\using \mbox{\hyperlink{namespaceserif_1_1equations_a7e2dbba73c1ee1b682885f1c178eb9f6}{serif\+::equations\+::\+Support\+Of}} = \mbox{\hyperlink{structserif_1_1equations_1_1_contribution_support}{Contribution\+Support}}$<$T$>$\+::type
\begin{DoxyCompactList}\small\item\em Helper alias to extract the support type for a given contribution. \end{DoxyCompactList}\item
{\footnotesize template$<$typename T$>$ }\\using \mbox{\hyperlink{namespaceserif_1_1equations_a3d8c1500d535f29fe360f0ab31ac55e3}{serif\+::equations\+::\+Contributions\+Of}} = \mbox{\hyperlink{structserif_1_1equations_1_1_contributions}{Contributions}}$<$std\+::remove\+\_\+cvref\+\_\+t$<$T$>$$>$\+::type
\begin{DoxyCompactList}\small\item\em Helper alias to extract the contributions (\doxylink{structserif_1_1equations_1_1_test_operand_traits}{type}) of some type T. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
File containing the Contribution struct. This is effectively a helper struct for authoring equations with fewer lines of boiler-\/plate. The idea here is that every equation must report certain members so that the backend can inspect at compile time. An author could certainly write these members themselves, but the Contribution struct auto generates those members based on its template parameters. Therefore, by inheriting from the Contribution struct an equation author can avoid writing those members themselves. Note that while this is inheritance it is still a compile-\/time relation. Contribution does not add any runtime overhead to the equation.
\begin{DoxyAuthor}{Author}
Emily M. Boudreaux
\end{DoxyAuthor}