Mirheo State

This class provides a global context to all Mirheo objects of the simulation.

class MirState

Global quantities accessible by all simulation objects in Mirheo.

Public Types

using TimeType = double

type used to store time information

using StepType = long long

type to store time step information

Public Functions

MirState(DomainInfo domain, real dt = (real)InvalidDt)

Construct a MirState object.

Parameters

void checkpoint(MPI_Comm comm, std::string path)

Save internal state to file.

Parameters
  • comm: MPI comm of the simulation
  • path: The directory in which to save the file

void restart(MPI_Comm comm, std::string path)

Load internal state from file.

Parameters
  • comm: MPI comm of the simulation
  • path: The directory from which to load the file

real getDt() const

Get the current time step dt.

Accessible only during Mirheo::run.

void setDt(real dt)

Set the time step dt.

Parameters
  • dt: time step duration

Public Members

DomainInfo domain

Global DomainInfo.

TimeType currentTime

Current simulation time.

StepType currentStep

Current simulation step.

Public Static Attributes

constexpr real InvalidDt = -1

Special value used to initialize invalid dt.