template<Equation FirstT, Equation... RestTs>
requires (std::same_as<typename FirstT::Test, typename RestTs::Test> && ...)
class serif::equations::EquationSum< FirstT, RestTs >
Sum multiple equations together.
This class is a compile-time tag that indicates that the weak contributions from multiple equations should be summed together. The actual summation is performed by the backend. A simple example would be if two equations are summed together, then the weak contributions from both equations would be integrated and then added together to form the final residual. Note also that we do not define a coefficient here. The backend only ever sums things, as you can see in EquationDifference to subtract we locally introduce a -1 scaling factor.
| Requirements |
-
The FirstT and RestTs equations must share the same test type, otherwise the summation is not well-defined.
|
- Note
- Only equations sharing a residual row can or should be summed together.
- Template Parameters
-
| FirstT | The first equation type to sum. |
| RestTs | The remaining equation types to sum. |