AdvectionDiffusion Struct ReferenceΒΆ
|
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
|
Scalar advection-diffusion: d_t u + a . More...
#include <advection_diffusion.hpp>
Collaboration diagram for pops::validation::AdvectionDiffusion:Public Types | |
| using | State = StateVec< 1 > |
| one conservative variable: the scalar u | |
| using | Aux = pops::Aux |
| auxiliary fields (unused, not coupled) | |
Public Member Functions | |
| POPS_HD State | flux (const State &u, const Aux &, int dir) const |
| Advection flux F = a u in direction dir. | |
| POPS_HD Real | max_wave_speed (const State &, const Aux &, int dir) const |
| Maximum wave speed: magnitude of the advection velocity in direction dir. | |
| POPS_HD State | source (const State &, const Aux &) const |
| Zero source term. | |
| POPS_HD Real | elliptic_rhs (const State &u) const |
| Poisson right-hand side: u (not coupled here, present for the concept). | |
| POPS_HD Real | diffusivity () const |
| Diffusivity nu: enables the parabolic term on the core side (DiffusiveModel trait). | |
Public Attributes | |
| Real | ax = 1.0 |
| advection velocity in x | |
| Real | ay = 0.0 |
| advection velocity in y | |
| Real | nu = 0.0 |
| diffusivity (0 = pure advection) | |
Static Public Attributes | |
| static constexpr int | n_vars = 1 |
| number of conservative variables | |
Detailed Description
Scalar advection-diffusion: d_t u + a .
grad u = nu Lap u.
VALIDATION/REFERENCE brick (not used by adc_cases as of 2026-06-06); kept as an example and as a reference model for tests/test_weno5_ssprk3.cpp.
Illustrates the remark "diffusion is just one more flux": we keep the advection PhysicalModel and add only the diffusivity() method. The parabolic term +nu Lap(u) is then provided by the core (assemble_rhs detects the DiffusiveModel trait), without touching the coupler. nu = 0 recovers pure advection.
Member Typedef Documentation
◆ Aux
auxiliary fields (unused, not coupled)
◆ State
one conservative variable: the scalar u
Member Function Documentation
◆ diffusivity()
Diffusivity nu: enables the parabolic term on the core side (DiffusiveModel trait).
◆ elliptic_rhs()
Poisson right-hand side: u (not coupled here, present for the concept).
◆ flux()
|
inline |
Advection flux F = a u in direction dir.
◆ max_wave_speed()
|
inline |
Maximum wave speed: magnitude of the advection velocity in direction dir.
◆ source()
|
inline |
Zero source term.
Member Data Documentation
◆ ax
| Real pops::validation::AdvectionDiffusion::ax = 1.0 |
advection velocity in x
◆ ay
| Real pops::validation::AdvectionDiffusion::ay = 0.0 |
advection velocity in y
◆ n_vars
|
staticconstexpr |
number of conservative variables
◆ nu
| Real pops::validation::AdvectionDiffusion::nu = 0.0 |
diffusivity (0 = pure advection)
The documentation for this struct was generated from the following file:
- include/pops/validation/physics/advection_diffusion.hpp
Generated by