2.3.15. swSource

Defined in swCore/swSource.h

class swSource

The swSource class computes the friction source term.

Public Functions

swSource(void)

Constructor Construct an empty mesh, small, gravity acceleration, threshold depth for wet/dry cells, debug.

~swSource(void)

Destructor.

void setParameters(swMesh *mesh, double small, bool res, bool prec, double g, double hmin, int debug = 0)

Set parameters for source terms.

Parameters
  • *mesh: : the pointer to mesh object

  • small: : numerical value for “equal to zero” tests

  • res: : friction source execution flag

  • prec: : precipitation source execution flag

  • g: : gravitational acceleration

  • hmin: : threshold value for wet/dry cells

  • debug: : verbosity flag

void setSettings(swSettings *settings)
void friction(double d_t, int layer = 0)

Compute the friction source term over time step d_t.

Compute the friction on time d_t

Parameters
  • d_t: computational time step

void precipitation(double d_t, xt::xarray<double> &precipRate, xt::xarray<double> &phi, int layer = 0)

Compute the precipitation source term over time step d_t.

Parameters
  • d_t: computational time step

  • precipRate: precipitation rates for the precipitation stations; value computed from time series

  • phi: cell porosities

void windForce(double d_t, const QString &wind, xt::xarray<double> &windVelocity)

Private Members

class swSourcePrivate *d