Files
MeanField_SERiF/docs/man/man3/serif_equations_DisplacementForce.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

137 lines
6.7 KiB
Groff

.TH "serif::equations::DisplacementForce< EOST >" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
.ad l
.nh
.SH NAME
serif::equations::DisplacementForce< EOST >
.SH SYNOPSIS
.br
.PP
.PP
\fR#include <displacement_force\&.hpp>\fP
.SS "Public Types"
.in +1c
.ti -1c
.RI "using \fBTest\fP = \fBdiscretization::blocks::displacement::vector\fP"
.br
.RI "The test type is the model displacement vector, which is the quantity being constrained by the mechanical balance equation\&. Effectively here we say that all these forces control what the geometry of the surface is (and then other equations connect that geometry to the mass distribution) "
.in -1c
.SS "Public Member Functions"
.in +1c
.ti -1c
.RI "\fBDisplacementForce\fP (\fBPressureForce\fP< EOST > pressure, \fBRigidRotation::Vector\fP axis={0\&.0, 0\&.0, 1\&.0}, \fBRigidRotation::Vector\fP center={})"
.br
.RI "Construct a mechanical balance equation\&. "
.ti -1c
.RI "const auto & \fBcontributions\fP () const noexcept"
.br
.RI "Return the contributions of the mechanical balance equation\&. "
.in -1c
.SS "Static Public Attributes"
.in +1c
.ti -1c
.RI "static constexpr std::string_view \fBname\fP = 'displacement force'"
.br
.RI "Compile time name for the mechanical balance equation, used for debugging and logging\&. "
.in -1c
.SS "Private Attributes"
.in +1c
.ti -1c
.RI "\fBEquationSum\fP< \fBPressureForce\fP< EOST >, \fBGravityForce\fP, \fBRotationalForce\fP > \fBm_equation\fP"
.br
.RI "The mechanical balance residual is a sum of residuals from the pressure force, gravity force, and rotational force equations\&. "
.in -1c
.SH "Detailed Description"
.PP
.SS "template<eos::models::PressureForceEOS EOST>
.br
class serif::equations::DisplacementForce< EOST >"
.PP
\fBTemplate Parameters\fP
.RS 4
\fIEOST\fP The equation of state type, this must satisfy the PressureForceEOS concept\&. The requires section below lays out what the PressureForceEOS concept requires\&.
.RE
.PP
Requirements
.PD 0
.IP "\(bu" 2
The equation of state type must publish a valid Relation catalog
.IP "\(bu" 2
The equation of state type must implement all relations required by the catalog it publishes
.IP "\(bu" 2
The equation of state type must support the relation pressure from specific enthalpy
.IP "\(bu" 2
The equation of state type must support the partial derivative pressure from specific enthalpy with respect to specific enthalpy
.PP
.PP
This class represents the mechanical balance equation in SERiF\&. It is a sum of the pressure force, gravity force, and rotational force equations\&.
.PP
As I have said in a number of other locations this is an important file / class to understand\&. You might note that this file is where we actually build the momentum equation (though in the case of a polytrope it looks a lot more like a mechanical balance equation)\&. You may note though how little code there actually is here\&. That is because we have split up the separated physics into the gravity_force, the pressure_force, and the rotational_force equations\&. Then we use the arithmetic equation routines sum their contributions together\&. Further, this is where we actually define the rotational axis of the star (note how we set it along the z-axis) and the center of rotation\&.
.PP
Generally this equation should be used as a model for how to implement other multi-term equations\&. We want to avoid monolithic equations\&. There are a few reasons for this, one would be maintainability\&. This software is, by requirement, exceedingly complex, the more we can break things up into semantically meaningful pieces the easier it will be for a developer to hold parts of the code in their head\&. However, more than just maintainability there is a performance reason for this (though one that we admittedly do not exploit at the moment)\&. The backend of SERiF makes heavy use of a computational graph with aggressive inter-node caching\&. If we split equations up into smaller pieces and then represent their sums as operations on this graph the backend can more aggressively avoid recomputing certain parts which may, provably, have not changes from one evaluation to the next\&. Currently, we do not do this; however, this is future optimization will not require modifying this code at all only the equation sum backend\&.
.PP
\fBNote\fP
.RS 4
The \fBDisplacementForce\fP equation owns all three contributing equations
.RE
.PP
.SH "Member Typedef Documentation"
.PP
.SS "template<eos::models::PressureForceEOS EOST> using \fBserif::equations::DisplacementForce\fP< EOST >::Test = \fBdiscretization::blocks::displacement::vector\fP"
.PP
The test type is the model displacement vector, which is the quantity being constrained by the mechanical balance equation\&. Effectively here we say that all these forces control what the geometry of the surface is (and then other equations connect that geometry to the mass distribution)
.SH "Constructor & Destructor Documentation"
.PP
.SS "template<eos::models::PressureForceEOS EOST> \fBserif::equations::DisplacementForce\fP< EOST >::DisplacementForce (\fBPressureForce\fP< EOST > pressure, \fBRigidRotation::Vector\fP axis = \fR{0\&.0, 0\&.0, 1\&.0}\fP, \fBRigidRotation::Vector\fP center = \fR{}\fP)\fR [inline]\fP, \fR [explicit]\fP"
.PP
Construct a mechanical balance equation\&.
.PP
\fBParameters\fP
.RS 4
\fIpressure\fP The pressure force equation, which must be constructed with the same EOS type as the \fBDisplacementForce\fP (note generally this can be inferred)\&.
.br
\fIaxis\fP The axis of rotation for the rotational force equation\&. Defaults to the z-axis\&.
.br
\fIcenter\fP The center of rotation for the rotational force equation\&. Defaults to the origin\&.
.RE
.PP
.SH "Member Function Documentation"
.PP
.SS "template<eos::models::PressureForceEOS EOST> const auto & \fBserif::equations::DisplacementForce\fP< EOST >::contributions () const\fR [inline]\fP, \fR [nodiscard]\fP, \fR [noexcept]\fP"
.PP
Return the contributions of the mechanical balance equation\&.
.PP
\fBReturns\fP
.RS 4
A tuple containing the contributions of the mechanical balance equation\&.
.RE
.PP
.SH "Member Data Documentation"
.PP
.SS "template<eos::models::PressureForceEOS EOST> \fBEquationSum\fP<\fBPressureForce\fP<EOST>, \fBGravityForce\fP, \fBRotationalForce\fP> \fBserif::equations::DisplacementForce\fP< EOST >::m_equation\fR [private]\fP"
.PP
The mechanical balance residual is a sum of residuals from the pressure force, gravity force, and rotational force equations\&.
.SS "template<eos::models::PressureForceEOS EOST> std::string_view \fBserif::equations::DisplacementForce\fP< EOST >::name = 'displacement force'\fR [static]\fP, \fR [constexpr]\fP"
.PP
Compile time name for the mechanical balance equation, used for debugging and logging\&.
.SH "Author"
.PP
Generated automatically by Doxygen for SERiF from the source code\&.