File zero_current.hxx#

Defines

ZERO_CURRENT#
struct ZeroCurrent : public Component#
#include <zero_current.hxx>

Set the velocity of a species so that there is no net current, by summing the current from other species.

This is most often used in the electron species, but does not need to be.

Public Functions

ZeroCurrent(std::string name, Options &alloptions, Solver*)#

Inputs

Parameters:
  • name – Short name for species e.g. “e”

  • alloptionsComponent configuration options

    • <name>

      • charge (must not be zero)

virtual void transform(Options &state) override#

Required inputs

  • species

    • <name>

      • density

      • charge

    • <one or more other species>

      • density

      • velocity

      • charge

Sets in the state

  • species

    • <name>

      • velocity

inline virtual void finally(const Options &state) override#

Use the final simulation state to update internal state (e.g. time derivatives)

virtual void outputVars(Options &state) override#

Add extra fields for output, or set attributes e.g docstrings.

Private Members

std::string name#

Name of this species.

BoutReal charge#

The charge of this species.

Field3D velocity#

Species velocity (for writing to output)