OISEAU
A modern DGTD framework
Loading...
Searching...
No Matches
oiseau::dg::EquationSystem Class Reference

#include <equation.hpp>

Public Member Functions

 EquationSystem (std::initializer_list< Field > fields, std::initializer_list< Equation > equations)
 EquationSystem (std::vector< Field > fields, std::vector< Equation > equations)
std::span< const Field > fields () const
std::span< const Equation > equations () const
std::size_t field_index (const Field &field) const
 Position of a field in states whose last axis follows fields() order.
double flux_coefficient (const Field &equation_field, Derivative derivative, const Field &flux_field) const
 Coefficient in the conservative flux for derivative in this equation.

Detailed Description

A linear, first-order evolution system with one time derivative per field.

Each equation is normalized internally as lhs - rhs == 0. For a conservative system du/dt + div(F) = 0, flux_coefficient returns the coefficient of a field in the corresponding directional flux.

For example:

Field Ez{"Ez"}, Hx{"Hx"}, Hy{"Hy"};
EquationSystem tm({Ez, Hx, Hy}, {
epsilon * dt(Ez) == dx(Hy) - dy(Hx),
mu * dt(Hx) == -dy(Ez),
mu * dt(Hy) == dx(Ez),
});
Definition field.hpp:20

The documentation for this class was generated from the following file: