|
SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
|
File containing the mixed gravity equation and its contributions. More...
#include <cmath>#include <tuple>#include <string_view>#include <stdexcept>#include "serif/equations/contributions.hpp"#include "serif/equations/point.hpp"#include "serif/utils/error/errors.hpp"Classes | |
| class | serif::equations::gravity_contributions::GradientValue |
| 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. More... | |
| class | serif::equations::gravity_contributions::PotentialValue |
| 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. More... | |
| class | serif::equations::gravity_contributions::GradientDivergence |
| 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. More... | |
| struct | serif::equations::gravity_contributions::DensitySource |
| struct | serif::equations::GravityGradientRelation |
| class | serif::equations::PoissonBalance |
Namespaces | |
| namespace | serif |
| namespace | serif::equations |
| The equations namespace, intended to be, to the best of my design ability, where the vast majority of the actual physics lives. | |
| namespace | serif::equations::gravity_contributions |
Typedefs | |
| using | serif::equations::gravity_contributions::Gradient = discretization::blocks::gravity::gradient |
| using | serif::equations::gravity_contributions::Potential = discretization::blocks::gravity::potential |
| using | serif::equations::gravity_contributions::Density = discretization::blocks::density::mass |
| using | serif::equations::gravity_contributions::Value = discretization::forms::Operation::Value |
| using | serif::equations::gravity_contributions::Divergence = discretization::forms::Operation::Divergence |
| template<typename Term, typename Operation = Value> | |
| using | serif::equations::gravity_contributions::Operand = discretization::forms::Operand<Term, Operation> |
File containing the mixed gravity equation and its contributions.
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.