\doxysection{src/include/serif/equations/mixed\+\_\+gravity.hpp File Reference} \hypertarget{mixed__gravity_8hpp}{}\label{mixed__gravity_8hpp}\index{src/include/serif/equations/mixed\_gravity.hpp@{src/include/serif/equations/mixed\_gravity.hpp}} File containing the mixed gravity equation and its contributions. {\ttfamily \#include $<$cmath$>$}\newline {\ttfamily \#include $<$tuple$>$}\newline {\ttfamily \#include $<$string\+\_\+view$>$}\newline {\ttfamily \#include $<$stdexcept$>$}\newline {\ttfamily \#include "{}serif/equations/contributions.\+hpp"{}}\newline {\ttfamily \#include "{}serif/equations/point.\+hpp"{}}\newline {\ttfamily \#include "{}serif/utils/error/errors.\+hpp"{}}\newline Include dependency graph for mixed\+\_\+gravity.\+hpp\+:\nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=350pt]{mixed__gravity_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]{mixed__gravity_8hpp__dep__incl} \end{center} \end{figure} \doxysubsubsection*{Classes} \begin{DoxyCompactItemize} \item class \mbox{\hyperlink{structserif_1_1equations_1_1gravity__contributions_1_1_gradient_value}{serif\+::equations\+::gravity\+\_\+contributions\+::\+Gradient\+Value}} \begin{DoxyCompactList}\small\item\em The point wise contribution to the gravity-\/gradient relation. Note that these contributions are just the point-\/wise field values. You can get to this by going through the weak form derivation. The derivative is just the identity matrix since the residual is just the field value. \end{DoxyCompactList}\item class \mbox{\hyperlink{structserif_1_1equations_1_1gravity__contributions_1_1_potential_value}{serif\+::equations\+::gravity\+\_\+contributions\+::\+Potential\+Value}} \begin{DoxyCompactList}\small\item\em The point wise contribution to the Poisson balance equation. Note that these contributions are just the point-\/wise potential values. You can get to this by going through the weak form derivation. The derivative is just one since the residual is just the variable. \end{DoxyCompactList}\item class \mbox{\hyperlink{structserif_1_1equations_1_1gravity__contributions_1_1_gradient_divergence}{serif\+::equations\+::gravity\+\_\+contributions\+::\+Gradient\+Divergence}} \begin{DoxyCompactList}\small\item\em The point wise contribution to the Poisson balance equation. Note that these contributions are just the point-\/wise divergence of the gradient field. You can get to this by going through the weak form derivation. The derivative is just the identity matrix since the residual is just the divergence of the gradient field. \end{DoxyCompactList}\item struct \mbox{\hyperlink{structserif_1_1equations_1_1gravity__contributions_1_1_density_source}{serif\+::equations\+::gravity\+\_\+contributions\+::\+Density\+Source}} \item struct \mbox{\hyperlink{structserif_1_1equations_1_1_gravity_gradient_relation}{serif\+::equations\+::\+Gravity\+Gradient\+Relation}} \item class \mbox{\hyperlink{classserif_1_1equations_1_1_poisson_balance}{serif\+::equations\+::\+Poisson\+Balance}} \end{DoxyCompactItemize} \doxysubsubsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \mbox{\hyperlink{namespaceserif}{serif}} \item namespace \mbox{\hyperlink{namespaceserif_1_1equations}{serif\+::equations}} \begin{DoxyCompactList}\small\item\em The equations namespace, intended to be, to the best of my design ability, where the vast majority of the actual physics lives. \end{DoxyCompactList}\item namespace \mbox{\hyperlink{namespaceserif_1_1equations_1_1gravity__contributions}{serif\+::equations\+::gravity\+\_\+contributions}} \end{DoxyCompactItemize} \doxysubsubsection*{Typedefs} \begin{DoxyCompactItemize} \item using \mbox{\hyperlink{namespaceserif_1_1equations_1_1gravity__contributions_a837a609a8d8541408685b9932bd7878e}{serif\+::equations\+::gravity\+\_\+contributions\+::\+Gradient}} = \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1gravity_1_1gradient}{discretization\+::blocks\+::gravity\+::gradient}} \item using \mbox{\hyperlink{namespaceserif_1_1equations_1_1gravity__contributions_a98dd4af361f2042f0e7987ce2a5c9e03}{serif\+::equations\+::gravity\+\_\+contributions\+::\+Potential}} = \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1gravity_1_1potential}{discretization\+::blocks\+::gravity\+::potential}} \item using \mbox{\hyperlink{namespaceserif_1_1equations_1_1gravity__contributions_a5b07eaa35e09bf8db7e989ffc7dce8f8}{serif\+::equations\+::gravity\+\_\+contributions\+::\+Density}} = \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1density_1_1mass}{discretization\+::blocks\+::density\+::mass}} \item using \mbox{\hyperlink{namespaceserif_1_1equations_1_1gravity__contributions_a699f80ebbb549a6a44ae1c6359d1b30c}{serif\+::equations\+::gravity\+\_\+contributions\+::\+Value}} = \mbox{\hyperlink{structserif_1_1discretization_1_1forms_1_1_operation_1_1_value}{discretization\+::forms\+::\+Operation\+::\+Value}} \item using \mbox{\hyperlink{namespaceserif_1_1equations_1_1gravity__contributions_a60f97be62f8d8be1888413a64a430e17}{serif\+::equations\+::gravity\+\_\+contributions\+::\+Divergence}} = \mbox{\hyperlink{structserif_1_1discretization_1_1forms_1_1_operation_1_1_divergence}{discretization\+::forms\+::\+Operation\+::\+Divergence}} \item {\footnotesize template$<$typename Term, typename Operation = Value$>$ }\\using \mbox{\hyperlink{namespaceserif_1_1equations_1_1gravity__contributions_a9ea47ed28b5226ebdaca33078479e174}{serif\+::equations\+::gravity\+\_\+contributions\+::\+Operand}} = \mbox{\hyperlink{structserif_1_1discretization_1_1forms_1_1_operand}{discretization\+::forms\+::\+Operand}}$<$Term, Operation$>$ \end{DoxyCompactItemize} \doxysubsection{Detailed Description} File containing the mixed gravity equation and its contributions. \begin{DoxyAuthor}{Author} Emily M. Boudreaux \end{DoxyAuthor} In SERiF we used a mixed formulation when solving for the gravitational potential and gravitational field. This is a pragmatic choice to try to avoid loss of accuracy when differentiating the potential to get the field. More specifically, if we were to just solve for the potential and then differentiate to get the field we would lose one order of accuracy in the field when compared to the potential. Due to the required accuracy in virialization (which is fundamentally related to the gravitational field) we cannot afford to loose that order and maintain the low-\/ish resolution mesh we use. I was already solving for potential when I went this route so I wanted to keep it. I suppose there is some world where you could solve for the field and then integrate it to get the potential; however, I have not thought deeply about the effects that would have on either the accuracy or run-\/time performance. As it stands we solve for the potential and the field separately but simultaneously and we weakly constrain them to agree.