File component_scheduler.hxx#

Defines

COMPONENT_SCHEDULER_H#
class ComponentScheduler#
#include <component_scheduler.hxx>

Creates and schedules model components

Currently only one implementation, but in future alternative scheduler types could be created. There is therefore a static create function which in future could switch between types.

Public Functions

ComponentScheduler(Options &scheduler_options, Options &component_options, Solver *solver)#
void transform(Options &state)#

Run the scheduler, modifying the state. This calls all components’ transform() methods, then all component’s finally() methods.

void outputVars(Options &state)#

Add metadata, extra outputs. This would typically be called only for writing to disk, rather than every internal timestep.

void restartVars(Options &state)#

Add variables to restart files.

void precon(const Options &state, BoutReal gamma)#

Preconditioning.

Public Static Functions

static std::unique_ptr<ComponentScheduler> create(Options &scheduler_options, Options &component_options, Solver *solver)#

Inputs

Parameters:
  • scheduler_options – Configuration of the scheduler Should contain “components”, a comma-separated list of component names

  • component_options – Configuration of the components.

    • <name>

      • type = Component classes, … If not provided, the type is the same as the name Multiple classes can be given, separated by commas. All classes will use the same Options section.

      • … Options to control the component(s)

  • solver – Used for time-dependent components to evolve quantities

Private Members

std::vector<std::unique_ptr<Component>> components#

The components to be executed in order.