|
SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
|
File containing the EquationScale and EquationSum templates, which allow for scaling and summing equations. More...
#include <cmath>#include <concepts>#include <stdexcept>#include <string_view>#include <tuple>#include <utility>#include "serif/equations/concepts.hpp"#include "serif/utils/error/errors.hpp"Classes | |
| class | serif::equations::EquationScale< EquationT > |
| Scale an equation by a constant coefficient. More... | |
| class | serif::equations::EquationSum< FirstT, RestTs > |
| Sum multiple equations together. More... | |
| class | serif::equations::EquationDifference< LeftT, RightT > |
| Subtract one equation from another. More... | |
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. | |
File containing the EquationScale and EquationSum templates, which allow for scaling and summing equations.
The astute observer will notice that none of the code in this file or indeed in in any part of the equations module actually implements summation or scaled addition more generally. Rather, the code to manage that is implemented in the operator/backend/mfem module. Effectively these templates are compile time tags telling that system how to combine weak contributions. The reason for this comes down to we dont really want to sum at the point wise level; rather, we generally want to sum already integrated contributions. Since equations, by design, do not know any details about the global system they are unable to manage this themselves.
There is another, as yet unexplored case, where we introduce some point-wise summation equation. This could be implemented in a much more local fashion and would probably be easier to trace; however, it would be semantically different in its meaning.