State

Header file: <libs/superdrops/state.hpp> [source]

struct State

Struct representing the state of a certain volume at a given time.

Variables which define the state of a certain volume (e.g., inside a gridbox) at a given time. State variables are, for example, thermodynamic variables required for SDM such as temperature, pressure, etc.

Public Functions

State() = default

Default constructor requirement for use of State in Kokkos View.

~State() = default

Default destructor requirement for use of State in Kokkos View.

inline State(const double volume, const double press, const double temp, const double qvap, const double qcond, const Kokkos::pair<double, double> wvel, const Kokkos::pair<double, double> uvel, const Kokkos::pair<double, double> vvel)

Constructor with parameters.

Parameters:
  • volume – The volume of the state.

  • press – The pressure defined at the center of the volume.

  • temp – The temperature defined at the center of the volume.

  • qvap – The vapor mass mixing ratio defined at the center of the volume.

  • qcond – The liquid (condensate) mass mixing ratio defined at the center of the volume.

  • wvel – The vertical velocity (coord3 direction) defined on {lower, upper} coord3 faces of the volume.

  • uvel – The horizontal eastwards velocity (coord1 direction) defined on {lower, upper} coord1 faces of the volume.

  • vvel – The horizontal northwards velocity (coord2 direction) defined on {lower, upper} coord2 faces of the volume.

inline auto get_volume() const

Get the volume of the state.

Returns:

The volume of the state.

inline double wvelcentre() const

Get the vertical velocity (in the coord3 direction) defined at the center of volume.

Returns:

The vertical velocity component ‘w’ defined at the center of volume.

inline double uvelcentre() const

Get the horizontal eastwards velocity (in the coord1 direction) defined at the center of volume.

Returns:

The horizontal eastwards velocity component ‘u’ defined at the center of volume.

inline double vvelcentre() const

Get the horizontal northwards velocity (in the coord2 direction) defined at the center of volume.

Returns:

The horizontal northwards velocity component ‘v’ defined at the center of volume.

Public Members

double press

Pressure defined at the center of volume.

double temp

Temperature defined at the center of volume.

double qvap

Vapor mass mixing ratio at the center of volume.

double qcond

Liquid mass mixing ratio at the center of volume.

Kokkos::pair<double, double> wvel

Vertical velocity (coord3 direction) defined on {lower, upper} coord3 faces of volume.

Kokkos::pair<double, double> uvel

Eastwards velocity (coord1 direction) defined on {lower, upper} coord1 faces of volume.

Kokkos::pair<double, double> vvel

Northwards velocity (coord2 direction) defined on {lower, upper} coord2 faces of volume.

Private Members

double volume