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

119 lines
17 KiB
TeX

\doxysection{src/include/serif/discretization/blocks/fields.hpp File Reference}
\hypertarget{fields_8hpp}{}\label{fields_8hpp}\index{src/include/serif/discretization/blocks/fields.hpp@{src/include/serif/discretization/blocks/fields.hpp}}
Define the fields and their associated terms for the discretization. This is a key file to understand if you are to understand SERiF\textquotesingle{}s numerics. Each of these field types should contain all the information needed for the compiler to generate the correct.
{\ttfamily \#include $<$array$>$}\newline
{\ttfamily \#include $<$string\+\_\+view$>$}\newline
{\ttfamily \#include "{}serif/dimensions/dimensions.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/discretization/blocks/base.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/discretization/functional\+\_\+space/space.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/discretization/domain/concepts.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/discretization/domain/physical\+\_\+domains.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/utils/types/type\+\_\+list.\+hpp"{}}\newline
{\ttfamily \#include "{}serif/meta/names.\+hpp"{}}\newline
Include dependency graph for fields.\+hpp\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{fields_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]{fields_8hpp__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1field}{serif\+::discretization\+::blocks\+::field}}
\begin{DoxyCompactList}\small\item\em The field struct is a tag type that is used to identify a field in the discretization. It is used to group together terms that belong to the same field. Each field should have a unique name and a list of terms that belong to it. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1term__base}{serif\+::discretization\+::blocks\+::term\+\_\+base}}
\begin{DoxyCompactList}\small\item\em The \doxylink{structserif_1_1discretization_1_1blocks_1_1term__base}{term\+\_\+base} struct is a tag type that is used to identify a term in the discretization. It is used to group together terms that belong to the same field. Each term should have a unique name and a list of blocks that belong to it. Generally you should always use term rather than \doxylink{structserif_1_1discretization_1_1blocks_1_1term__base}{term\+\_\+base} as term associates to a particular field at compile time. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1term}{serif\+::discretization\+::blocks\+::term$<$ Field\+T $>$}}
\begin{DoxyCompactList}\small\item\em The term struct is a tag type that is used to identify a term in the discretization. It is used to group together terms that belong to the same field. Each term should have a unique name and a list of blocks that belong to it. Note that generally you should always use term rather than \doxylink{structserif_1_1discretization_1_1blocks_1_1term__base}{term\+\_\+base} as term associates to a particular field at compile time. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1global__scalar}{serif\+::discretization\+::blocks\+::global\+\_\+scalar}}
\begin{DoxyCompactList}\small\item\em A global scalar is a term that has a single value over the entire domain (think angular momentum or total mass). Broadly we need to separate these from the other terms since they require different (often less enriched) information at compile time. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1global__scalar_1_1value}{serif\+::discretization\+::blocks\+::global\+\_\+scalar\+::value}}
\begin{DoxyCompactList}\small\item\em The value block is a block that contains the value of the global scalar. It is a single value over the entire domain and is not associated with any particular functional space. For something like total mass this would be the actual value of the mass of the system. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1global__scalar_1_1residual}{serif\+::discretization\+::blocks\+::global\+\_\+scalar\+::residual}}
\begin{DoxyCompactList}\small\item\em The residual block is a block that contains the residual of the global scalar. It is a single value over the entire domain and is not associated with any particular functional space. For something like total mass this would be the residual of the mass of the system (i.\+e. the difference between the current mass and the target mass). \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1barotropic__constant}{serif\+::discretization\+::blocks\+::barotropic\+\_\+constant}}
\begin{DoxyCompactList}\small\item\em This field holds the effective potential level on the stellar isobar. The level is solved together with the fixed total mass. The \doxylink{structserif_1_1discretization_1_1blocks_1_1barotropic__constant}{barotropic\+\_\+constant} name is retained as an internal coordinate identity. In the density formulation its value is Us, the gravitational potential minus the centrifugal potential on the surface; it is not the polytropic EOS constant K. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1barotropic__constant_1_1mass__normalization}{serif\+::discretization\+::blocks\+::barotropic\+\_\+constant\+::mass\+\_\+normalization}}
\begin{DoxyCompactList}\small\item\em The value of this global scalar is the effective surface-\/potential level Us. Its paired residual enforces the prescribed total mass. The surface equation supplies the dependence on Us, while the mass equation integrates the density over the star. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1frame__acceleration}{serif\+::discretization\+::blocks\+::frame\+\_\+acceleration}}
\begin{DoxyCompactList}\small\item\em Uniform translation reaction, one global scalar per Cartesian axis, to be paired with Barycenter\+Constraint (for example when an external companion potential acts on the star). It must vanish in a physical equilibrium. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1frame__acceleration_1_1component}{serif\+::discretization\+::blocks\+::frame\+\_\+acceleration\+::component$<$ Axis $>$}}
\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1rotation}{serif\+::discretization\+::blocks\+::rotation}}
\begin{DoxyCompactList}\small\item\em The rotational field, represented as the angular velocity term, given that we currently only model rigid rotation this is a global scalar. A future extension which models differential rotation will likely need to modify this to some vector field or other more complex representation of the rotation. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1rotation_1_1angular__velocity}{serif\+::discretization\+::blocks\+::rotation\+::angular\+\_\+velocity}}
\begin{DoxyCompactList}\small\item\em The \doxylink{structserif_1_1discretization_1_1blocks_1_1rotation_1_1angular__velocity}{angular\+\_\+velocity} term represents the angular velocity of the system. It is a global scalar that is associated with the rotation of the system. This is used to enforce the rotation condition in the weak form when we are in the rigid rotation case. Note that downstream the way that this currently works is to calculate the expected angular velocity given the current mass, geometry, density, and angular momentum and then prescribe, given those, what the angular velocity should be. Therefore, this does not enforce that the angular velocity must be constant over the entire solver run, but rather that the angular velocity is consistent with the current state of the system. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1density}{serif\+::discretization\+::blocks\+::density}}
\begin{DoxyCompactList}\small\item\em The density field used to represent the distribution of mass in the system. This is a scalar field that is associated with the mass density of the system. The density field is used to enforce the mass conservation condition in the weak form. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1density_1_1mass}{serif\+::discretization\+::blocks\+::density\+::mass}}
\begin{DoxyCompactList}\small\item\em The mass density term for the system. Note that the naming here could be a bit confusing as FEM also uses the term "{}mass"{} to represent the canonical mass matrix. This is a more standard physics reading of what is going on here. We define that this space is a third order scalar H1 space. This gives density a continuous surface trace and a weak spatial gradient. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1density_1_1mass_1_1value}{serif\+::discretization\+::blocks\+::density\+::mass\+::value}}
\begin{DoxyCompactList}\small\item\em The value block is a block that contains the value of the mass density term. It is a scalar field that is associated with the mass density of the system. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1density_1_1mass_1_1residual}{serif\+::discretization\+::blocks\+::density\+::mass\+::residual}}
\begin{DoxyCompactList}\small\item\em The residual block is a block that contains the residual of the mass density term. It is a scalar field that is associated with the mass density of the system. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1displacement}{serif\+::discretization\+::blocks\+::displacement}}
\begin{DoxyCompactList}\small\item\em The displacement field is a 3 vector H1 field (C0 continuous) that is used to represent continuous nodal displacement over the entire domain. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1displacement_1_1vector}{serif\+::discretization\+::blocks\+::displacement\+::vector}}
\begin{DoxyCompactList}\small\item\em the displacement vector term is a 3 vector H1 field (C0 continuous) that is used to represent continuous nodal displacement over the entire domain. This is a vector field that is associated with the mapping of the domain from the reference to physical spaces. E.\+g. if there is some domain O\+\_\+ref which n nodal positions x\texorpdfstring{$^\wedge$}{\string^}i\+\_\+ref then there is some other domain O\+\_\+phys with n nodel positions such that x\texorpdfstring{$^\wedge$}{\string^}i\+\_\+phys = x\texorpdfstring{$^\wedge$}{\string^}i\+\_\+ref + d\texorpdfstring{$^\wedge$}{\string^}i where d\texorpdfstring{$^\wedge$}{\string^}i is the displacement vector at node i. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1displacement_1_1vector_1_1value}{serif\+::discretization\+::blocks\+::displacement\+::vector\+::value}}
\begin{DoxyCompactList}\small\item\em The value block is a block that contains the value of the displacement vector term. It is a vector field that is associated with the mapping of the domain from the reference to physical spaces. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1displacement_1_1vector_1_1residual}{serif\+::discretization\+::blocks\+::displacement\+::vector\+::residual}}
\begin{DoxyCompactList}\small\item\em The residual block is a block that contains the residual of the displacement vector term. It is a vector field that is associated with the mapping of the domain from the reference to physical spaces. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1surface__deformation}{serif\+::discretization\+::blocks\+::surface\+\_\+deformation}}
\begin{DoxyCompactList}\small\item\em The surface corollary field to the full displacement field. This is in some ways more general than the others in so far as it is not pointwise defined over the domain. Rather, it is some general field of numbers, divorced from the underlying discrimination, that is used to represent the surface deformation of the system. This may be used, for example to represent spherical harmonic coefficients of the surface deformation. For more information see the surface and deformation systems. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1surface__deformation_1_1coefficients}{serif\+::discretization\+::blocks\+::surface\+\_\+deformation\+::coefficients}}
\begin{DoxyCompactList}\small\item\em The coefficients term represents some set of coefficients associated with whatever surface representation is being used to represent the surface deformation. Note how we do not have a functional space, support, or a quantity. This is also where we associate the values with. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1surface__deformation_1_1coefficients_1_1value}{serif\+::discretization\+::blocks\+::surface\+\_\+deformation\+::coefficients\+::value}}
\begin{DoxyCompactList}\small\item\em The actual values of the coefficients for whatever surface representation is being used. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1surface__deformation_1_1shape__equilibrium}{serif\+::discretization\+::blocks\+::surface\+\_\+deformation\+::shape\+\_\+equilibrium}}
\begin{DoxyCompactList}\small\item\em The shape equilibrium term represents the shape equilibrium condition of the system. This is a term that is associated with the surface deformation field and is used to enforce the shape equilibrium condition in the weak form. This is where we associate the residuals with. Note how we do not have a functional space, support, or a quantity. This is because the shape equilibrium condition is a global condition that is not associated with any particular functional space, support, or quantity. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1surface__deformation_1_1shape__equilibrium_1_1residual}{serif\+::discretization\+::blocks\+::surface\+\_\+deformation\+::shape\+\_\+equilibrium\+::residual}}
\begin{DoxyCompactList}\small\item\em The residuals of the shape equilibrium condition. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1gravity}{serif\+::discretization\+::blocks\+::gravity}}
\begin{DoxyCompactList}\small\item\em The gravity field contains the scalar potential. The primal formulation solves the potential and obtains its gradient by differentiation. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1gravity_1_1potential}{serif\+::discretization\+::blocks\+::gravity\+::potential}}
\begin{DoxyCompactList}\small\item\em The gravitational potential term is a fourth order H1 scalar field that is used to represent the gravitational potential of the system. Its continuous trace supports the surface potential condition, and its spatial gradient supplies gravity in the primal formulation. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1gravity_1_1potential_1_1value}{serif\+::discretization\+::blocks\+::gravity\+::potential\+::value}}
\begin{DoxyCompactList}\small\item\em The value block is a block that contains the value of the gravitational potential term. It is a scalar field that is associated with the gravitational potential of the system. \end{DoxyCompactList}\item
struct \mbox{\hyperlink{structserif_1_1discretization_1_1blocks_1_1gravity_1_1potential_1_1residual}{serif\+::discretization\+::blocks\+::gravity\+::potential\+::residual}}
\begin{DoxyCompactList}\small\item\em The residual block is a block that contains the residual of the gravitational potential term. It is a scalar field that is associated with the gravitational potential of the system. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item
namespace \mbox{\hyperlink{namespaceserif}{serif}}
\item
namespace \mbox{\hyperlink{namespaceserif_1_1discretization}{serif\+::discretization}}
\item
namespace \mbox{\hyperlink{namespaceserif_1_1discretization_1_1blocks}{serif\+::discretization\+::blocks}}
\end{DoxyCompactItemize}
\doxysubsection{Detailed Description}
Define the fields and their associated terms for the discretization. This is a key file to understand if you are to understand SERiF\textquotesingle{}s numerics. Each of these field types should contain all the information needed for the compiler to generate the correct.
\begin{DoxyAuthor}{Author}
Emily M. Boudreaux
\begin{DoxyItemize}
\item blocks
\item functional spaces
\item support domains
\item quantities
\item symbols
\item and any other information needed to generate the correct weak form for the field Broadly you can think of these as where we define the "{}physics"{} that we want to solve for or the unknowns of the system. If you find yourself adding any sort of unknown to the system and you are not adding it to this file you should step back and reconsider\textbackslash{} if that belongs here instead.
\end{DoxyItemize}
\end{DoxyAuthor}