MCPcopy Create free account
hub / github.com/boutproject/BOUT-dev / Diffusion

Class Diffusion

examples/finite-volume/diffusion/diffusion.cxx:7–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <bout/physicsmodel.hxx>
6
7class Diffusion : public PhysicsModel {
8protected:
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
26private:
27 Field3D f; // Evolving field
28 Field3D k; // Diffusion coefficient
29};
30
31BOUTMAIN(Diffusion);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected