| 5 | #include <bout/physicsmodel.hxx> |
| 6 | |
| 7 | class Diffusion : public PhysicsModel { |
| 8 | protected: |
| 9 | int init(bool UNUSED(restarting)) override { |
| 10 | GRID_LOAD(k); |
| 11 | mesh->communicate(k); |
| 12 | |
| 13 | SOLVE_FOR(f); |
| 14 | |
| 15 | return 0; |
| 16 | } |
| 17 | |
| 18 | int rhs(BoutReal UNUSED(time)) override { |
| 19 | mesh->communicate(f); |
| 20 | |
| 21 | ddt(f) = FV::Div_par_K_Grad_par(k, f); |
| 22 | |
| 23 | return 0; |
| 24 | } |
| 25 | |
| 26 | private: |
| 27 | Field3D f; // Evolving field |
| 28 | Field3D k; // Diffusion coefficient |
| 29 | }; |
| 30 | |
| 31 | BOUTMAIN(Diffusion); |
nothing calls this directly
no outgoing calls
no test coverage detected