Grass forage in a habitat.
More...
#include <grass_forage.h>
Grass forage in a habitat.
◆ GrassForage()
| Fauna::GrassForage::GrassForage |
( |
| ) |
|
|
inline |
Constructor with zero values.
◆ get_fpc()
| double Fauna::GrassForage::get_fpc |
( |
| ) |
const |
|
inline |
Fraction of habitat covered by grass [fractional].
Grass-covered area as a fraction of the habitat. (FPC = “foliar projective cover” might not be the ideal term, but you can interprect the acronym also as “Fraction of Patch Covered [by grass]”.)
- Exceptions
-
| std::logic_error | If the values of mass and FPC don’t fit together: If mass is zero, FPC must also be zero, and if mass is non-zero, FPC must not be zero. (Call set_mass() and set_fpc() with correct values before calling get_fpc().) |
◆ get_sward_density()
| double Fauna::GrassForage::get_sward_density |
( |
| ) |
const |
|
inline |
Dry matter forage in the area covered by grass [kgDM/km²].
Note that this is always greater or equal than get_mass()
- Exceptions
-
| std::logic_error | If the result is greater than MAX_SWARD_DENSITY. In this case, the fpc value set by the vegetation model is probably unreasonably low. |
◆ merge()
| GrassForage & GrassForage::merge |
( |
const GrassForage & |
other, |
|
|
const double |
this_weight, |
|
|
const double |
other_weight |
|
) |
| |
◆ set_fpc()
| void Fauna::GrassForage::set_fpc |
( |
const double |
f | ) |
|
|
inline |
Fraction of habitat covered by grass [fractional].
- Note
- Call get_mass() before this function to avoid any illogical state (see exceptions in get_fpc()).
- Exceptions
-
| std::invalid_argument | If not 0.0<=f<=1.0. |
| std::logic_error | If f==0.0 && get_mass()==0.0 or f==0.0 && get_mass()>0.0. |
◆ fpc
| double Fauna::GrassForage::fpc |
|
private |
◆ MAX_SWARD_DENSITY
| constexpr double Fauna::GrassForage::MAX_SWARD_DENSITY = 2e7 |
|
staticconstexprprivate |
Maximum imaginable real-world sward density [kgDM/km²].
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/include/Fauna/grass_forage.h
- /home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/src/Fauna/grass_forage.cpp