Files
MeanField_SERiF/docs/latex/element__preparation_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

68 lines
12 KiB
TeX

\doxysection{src/include/serif/backend/mfem/operators/element\+\_\+preparation.hpp File Reference}
\hypertarget{element__preparation_8hpp}{}\label{element__preparation_8hpp}\index{src/include/serif/backend/mfem/operators/element\_preparation.hpp@{src/include/serif/backend/mfem/operators/element\_preparation.hpp}}
{\ttfamily \#include $<$array$>$}\newline
{\ttfamily \#include $<$cmath$>$}\newline
{\ttfamily \#include $<$expected$>$}\newline
{\ttfamily \#include $<$memory$>$}\newline
{\ttfamily \#include $<$utility$>$}\newline
{\ttfamily \#include "{}serif/backend/mfem/mapping/domain\+\_\+mapper.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/backend/mfem/operators/element\+\_\+data.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/backend/mfem/operators/operand\+\_\+evaluation.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/backend/mfem/operators/quadrature.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/backend/mfem/operators/rejection.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/backend/mfem/discretization/term\+\_\+coefficients.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/backend/mfem/operators/workspace.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/backend/mfem/shared/parallel.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/utils/misc/compensated\+\_\+sum.\+hpp"{}}\newline
Include dependency graph for element\+\_\+preparation.\+hpp\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{element__preparation_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[height=550pt]{element__preparation_8hpp__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item
namespace \mbox{\hyperlink{namespaceserif}{serif}}
\item
namespace \mbox{\hyperlink{namespaceserif_1_1operators}{serif\+::operators}}
\item
namespace \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend}{serif\+::operators\+::backend}}
\item
namespace \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem}{serif\+::operators\+::backend\+::mfem}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item
{\footnotesize template$<$Volume\+Equation EquationT, typename ContributionT$>$ }\\std\+::expected$<$ \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_element_basis}{Element\+Basis}}$<$ \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::operand\+\_\+count $>$, \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_preparation_rejection}{Preparation\+Rejection}} $>$ \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_aae99912ed787738eb526084e3e5a505a}{serif\+::operators\+::backend\+::mfem\+::sample\+\_\+element\+\_\+basis}} (const ContributionT \&equation, int element, const \mbox{\hyperlink{classserif_1_1discretization_1_1backend_1_1mfem_1_1_dof_map}{discretization\+::backend\+::mfem\+::\+Dof\+Map}} \&row, const \mbox{\hyperlink{classserif_1_1discretization_1_1backend_1_1mfem_1_1_dof_map}{discretization\+::backend\+::mfem\+::\+Dof\+Map}} \&displacement\+\_\+binding, const std\+::array$<$ const \mbox{\hyperlink{classserif_1_1discretization_1_1backend_1_1mfem_1_1_dof_map}{discretization\+::backend\+::mfem\+::\+Dof\+Map}} \texorpdfstring{$\ast$}{*}, \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::column\+\_\+count $>$ \&columns, const \mbox{\hyperlink{classserif_1_1mapping_1_1_domain_mapper}{mapping\+::\+Domain\+Mapper}} \&mapper, const \mbox{\hyperlink{classserif_1_1discretization_1_1quadrature_1_1_policy}{discretization\+::quadrature\+::\+Policy}} \&policy, \mbox{\hyperlink{classserif_1_1discretization_1_1backend_1_1mfem_1_1_tensor_basis_cache}{Tensor\+Basis\+Cache}} \&basis\+\_\+cache, \mbox{\hyperlink{namespaceserif_1_1discretization_1_1backend_1_1mfem_a24da3fc8af225640b2d32c378ef40cde}{Contraction\+Mode}} contraction\+\_\+mode)
\begin{DoxyCompactList}\small\item\em Sample the contribution\textquotesingle{}s quadrature rule and bases on the fixed computational mesh. \end{DoxyCompactList}\item
elements \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a3f805de10dcbef305ddee8b533e98803}{serif\+::operators\+::backend\+::mfem\+::element\+\_\+values}} (basis.\+element, input.\+values, workspace.\+element\+\_\+values)
\item
{\footnotesize template$<$Volume\+Equation EquationT, typename ContributionT$>$ }\\std\+::expected$<$ \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_element_geometry}{Element\+Geometry}}$<$ \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::operand\+\_\+count $>$, \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_preparation_rejection}{Preparation\+Rejection}} $>$ \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a9dd074ac465b21038ed683e3f714c69e}{serif\+::operators\+::backend\+::mfem\+::map\+\_\+element\+\_\+geometry}} (const \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_element_basis}{Element\+Basis}}$<$ \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::operand\+\_\+count $>$ \&basis, const \mbox{\hyperlink{classserif_1_1discretization_1_1backend_1_1mfem_1_1_dof_map}{discretization\+::backend\+::mfem\+::\+Dof\+Map}} \&displacement\+\_\+binding, const \mbox{\hyperlink{classserif_1_1discretization_1_1backend_1_1mfem_1_1_dof_map_1_1_elements}{discretization\+::backend\+::mfem\+::\+Dof\+Map\+::\+Elements}} \&displacement\+\_\+elements, const \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a317d4e0bea2ef8780ac3747cfe62bf72}{\+::mfem\+::\+Vector}} \&displacement, const \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_mapping_coefficients}{Mapping\+Coefficients}} \&compactification, const \mbox{\hyperlink{classserif_1_1mapping_1_1_domain_mapper}{mapping\+::\+Domain\+Mapper}} \&mapper, \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_workspace}{Workspace}} \&workspace)
\begin{DoxyCompactList}\small\item\em Freeze displacement and compactification, then map quadrature points and bases to physical space. \end{DoxyCompactList}\item
{\footnotesize template$<$Evaluable\+Operand OperandT, std\+::size\+\_\+t Count$>$ }\\\mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a317d4e0bea2ef8780ac3747cfe62bf72}{\+::mfem\+::\+Vector}} \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a9a1337dfa4833a9bc4e82b7ccb854e1c}{serif\+::operators\+::backend\+::mfem\+::map\+\_\+element\+\_\+operand}} (const \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a317d4e0bea2ef8780ac3747cfe62bf72}{\+::mfem\+::\+Vector}} \&reference, const \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_element_geometry}{Element\+Geometry}}$<$ Count $>$ \&geometry, \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_workspace}{Workspace}} \&workspace)
\begin{DoxyCompactList}\small\item\em Apply an operand\textquotesingle{}s physical transformation to its cached fixed-\/mesh samples. \end{DoxyCompactList}\item
{\footnotesize template$<$Volume\+Equation EquationT, typename ContributionT$>$ }\\\mbox{\hyperlink{structserif_1_1equations_1_1_equation_point}{equations\+::\+Equation\+Point}}$<$ typename Contribution\+T\+::\+Operands $>$ \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a2f7469f8875093c32fdb0730a9e75604}{serif\+::operators\+::backend\+::mfem\+::element\+\_\+equation\+\_\+point}} (const std\+::array$<$ std\+::shared\+\_\+ptr$<$ const \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a317d4e0bea2ef8780ac3747cfe62bf72}{\+::mfem\+::\+Vector}} $>$, \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::operand\+\_\+count $>$ \&physical\+\_\+values, const \mbox{\hyperlink{structserif_1_1mapping_1_1_mapping_point_context}{mapping\+::\+Mapping\+Point\+Context}} \&context, int point)
\begin{DoxyCompactList}\small\item\em Pack the physical samples requested by this contribution at one quadrature point. \end{DoxyCompactList}\item
{\footnotesize template$<$Volume\+Equation EquationT, typename ContributionT$>$ }\\bool \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a275adf143a0f3539c599195444ad2f28}{serif\+::operators\+::backend\+::mfem\+::store\+\_\+element\+\_\+linearization}} (const \mbox{\hyperlink{structserif_1_1equations_1_1_point_linearization}{equations\+::\+Point\+Linearization}}$<$ typename Contribution\+T\+::\+Operands, typename \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_operand_evaluator}{Operand\+Evaluator}}$<$ \mbox{\hyperlink{namespaceserif_1_1equations_ab3b0f61ca51136b0ddf4d868ebdfd8df}{equations\+::\+Test\+Operand\+Of}}$<$ ContributionT $>$ $>$\+::\+Value $>$ \&physics, int point, double weight, \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_element_data}{Element\+Data}}$<$ \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::operand\+\_\+count $>$ \&data)
\begin{DoxyCompactList}\small\item\em Weight a point\textquotesingle{}s residual and derivatives; reject any non-\/finite stored component. \end{DoxyCompactList}\item
{\footnotesize template$<$Volume\+Equation EquationT, typename ContributionT$>$ }\\std\+::expected$<$ \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_element_data}{Element\+Data}}$<$ \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::operand\+\_\+count $>$, \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_preparation_rejection}{Preparation\+Rejection}} $>$ \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a4376f45934e12dad416909d04ea1fc37}{serif\+::operators\+::backend\+::mfem\+::evaluate\+\_\+element\+\_\+equation}} (const ContributionT \&equation, double coefficient, std\+::shared\+\_\+ptr$<$ const \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_element_basis}{Element\+Basis}}$<$ \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::operand\+\_\+count $>$ $>$ basis, std\+::shared\+\_\+ptr$<$ const \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_element_geometry}{Element\+Geometry}}$<$ \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::operand\+\_\+count $>$ $>$ geometry, std\+::array$<$ std\+::shared\+\_\+ptr$<$ const \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a317d4e0bea2ef8780ac3747cfe62bf72}{\+::mfem\+::\+Vector}} $>$, \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::operand\+\_\+count $>$ reference\+\_\+values, const std\+::array$<$ std\+::shared\+\_\+ptr$<$ const \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a317d4e0bea2ef8780ac3747cfe62bf72}{\+::mfem\+::\+Vector}} $>$, \mbox{\hyperlink{structserif_1_1operators_1_1_equation_plan}{Equation\+Plan}}$<$ EquationT $>$\+::operand\+\_\+count $>$ \&physical\+\_\+values, \mbox{\hyperlink{structserif_1_1operators_1_1backend_1_1mfem_1_1_workspace}{Workspace}} \&workspace)
\begin{DoxyCompactList}\small\item\em Evaluate and weight the equation while retaining its immutable preparation inputs. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item
{\footnotesize template$<$Volume\+Equation EquationT, Evaluable\+Operand OperandT, typename BindingT$>$ }\\constexpr std\+::size\+\_\+t \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_ab297c6eedd8df878b6af2135b05e4616}{serif\+::operators\+::backend\+::mfem\+::index}} = \mbox{\hyperlink{structserif_1_1equations_1_1_operand_values}{equations\+::\+Operand\+Values}}$<$typename Plan\+::\+Operands$>$\+::template index$<$OperandT$>$()
\begin{DoxyCompactList}\small\item\em Contract one operand\textquotesingle{}s fixed-\/mesh basis with its current coefficients. \end{DoxyCompactList}\item
\mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_a317d4e0bea2ef8780ac3747cfe62bf72}{\+::mfem\+::\+Vector}} \mbox{\hyperlink{namespaceserif_1_1operators_1_1backend_1_1mfem_adf1d7a29193c8b8a6cd17745686a04d8}{serif\+::operators\+::backend\+::mfem\+::values}}
\end{DoxyCompactItemize}