iLand
Public Member Functions | Static Public Member Functions | Friends | List of all members
Sapling Class Reference

saplings from 5cm to 4m More...

#include <sapling.h>

Public Member Functions

 Sapling ()
 
void setup (ResourceUnitSpecies *masterRUS)
 
void cleanupStorage ()
 maintenance function to clear dead/recruited saplings from storage More...
 
void clearStatistics ()
 
void newYear ()
 
void clear ()
 
const QVector< SaplingTreeOld > & saplings () const
 
void calculateGrowth ()
 perform growth + mortality + recruitment of all saplings of this RU and species More...
 
int addSapling (const QPoint &pos_lif, const float height=0.05f, const int age=1)
 add a new sapling at 'pos_lif' (i.e. More...
 
void clearSapling (SaplingTreeOld &tree, const bool remove)
 clear (either remove or kill) a specific sapling More...
 
void clearSapling (int index, const bool remove)
 
void clearSaplings (const QPoint &position)
 clear saplings on a given position (after recruitment) More...
 
void clearSaplings (const QRectF &rectangle, const bool remove_biomass)
 clear saplings within a given rectangle More...
 
bool hasSapling (const QPoint &position) const
 return true if sapling is present at position More...
 
double heightAt (const QPoint &position) const
 return the height at given position or 0 if position is not occupied More...
 
int newSaplings () const
 
int diedSaplings () const
 
int livingSaplings () const
 get the number More...
 
int recruitedSaplings () const
 
double livingStemNumber (double &rAvgDbh, double &rAvgHeight, double &rAvgAge) const
 returns the represented (Reineke's Law) number of trees (N/ha) and the mean dbh/height (cm/m) More...
 
double averageHeight () const
 
double averageAge () const
 
double averageDeltaHPot () const
 
double averageDeltaHRealized () const
 
double representedStemNumber (float height) const
 return the number of trees represented by one sapling of the current species and given 'height' More...
 
const CNPaircarbonLiving () const
 state of the living More...
 
const CNPaircarbonGain () const
 state of the living More...
 
void fillMaxHeightGrid (Grid< float > &grid) const
 fill a grid with the maximum height of saplings per pixel (2x2m). More...
 
const std::bitset< cPxPerRU *cPxPerRU > & presentPositions () const
 

Static Public Member Functions

static void setRecruitmentVariation (const double variation)
 
static void updateBrowsingPressure ()
 

Friends

class Snapshot
 

Detailed Description

saplings from 5cm to 4m

Sapling stores saplings per species and resource unit and computes sapling growth (before recruitment).

http://iland.boku.ac.at/sapling+growth+and+competition Saplings are established in a separate step (

See also
Regeneration). If sapling reach a height of 4m, they are recruited and become "real" iLand-trees. Within the regeneration layer, a cohort-approach is applied.

Constructor & Destructor Documentation

◆ Sapling()

Sapling::Sapling ( )

Member Function Documentation

◆ addSapling()

int Sapling::addSapling ( const QPoint &  pos_lif,
const float  height = 0.05f,
const int  age = 1 
)

add a new sapling at 'pos_lif' (i.e.

add a sapling at the given position (index on the LIF grid, i.e. 2x2m)

QPoint with LIF-coordiantes) and with (optionally) 'height' (m) and 'age' (years) Returns the index of the newly added sapling.

◆ averageAge()

double Sapling::averageAge ( ) const
inline

◆ averageDeltaHPot()

double Sapling::averageDeltaHPot ( ) const
inline

◆ averageDeltaHRealized()

double Sapling::averageDeltaHRealized ( ) const
inline

◆ averageHeight()

double Sapling::averageHeight ( ) const
inline

◆ calculateGrowth()

void Sapling::calculateGrowth ( )

perform growth + mortality + recruitment of all saplings of this RU and species

main growth function for saplings.

Statistics are cleared at the beginning of the year.

◆ carbonGain()

const CNPair & Sapling::carbonGain ( ) const
inline

state of the living

◆ carbonLiving()

const CNPair & Sapling::carbonLiving ( ) const
inline

state of the living

◆ cleanupStorage()

void Sapling::cleanupStorage ( )

maintenance function to clear dead/recruited saplings from storage

◆ clear()

void Sapling::clear ( )
inline

◆ clearSapling() [1/2]

void Sapling::clearSapling ( int  index,
const bool  remove 
)

◆ clearSapling() [2/2]

void Sapling::clearSapling ( SaplingTreeOld tree,
const bool  remove 
)

clear (either remove or kill) a specific sapling

◆ clearSaplings() [1/2]

void Sapling::clearSaplings ( const QPoint &  position)

clear saplings on a given position (after recruitment)

◆ clearSaplings() [2/2]

void Sapling::clearSaplings ( const QRectF &  rectangle,
const bool  remove_biomass 
)

clear saplings within a given rectangle

◆ clearStatistics()

void Sapling::clearStatistics ( )

◆ diedSaplings()

int Sapling::diedSaplings ( ) const
inline

◆ fillMaxHeightGrid()

void Sapling::fillMaxHeightGrid ( Grid< float > &  grid) const

fill a grid with the maximum height of saplings per pixel (2x2m).

this function is used for visualization only

◆ hasSapling()

bool Sapling::hasSapling ( const QPoint &  position) const

return true if sapling is present at position

◆ heightAt()

double Sapling::heightAt ( const QPoint &  position) const

return the height at given position or 0 if position is not occupied

retrieve the height of the sapling at the location 'position' (given in LIF-coordinates) this is quite expensive and only done for initialization

◆ livingSaplings()

int Sapling::livingSaplings ( ) const
inline

get the number

◆ livingStemNumber()

double Sapling::livingStemNumber ( double &  rAvgDbh,
double &  rAvgHeight,
double &  rAvgAge 
) const

returns the represented (Reineke's Law) number of trees (N/ha) and the mean dbh/height (cm/m)

get the represented (Reineke's Law) number of trees (N/ha)

◆ newSaplings()

int Sapling::newSaplings ( ) const
inline

◆ newYear()

void Sapling::newYear ( )
inline

◆ presentPositions()

const std::bitset< cPxPerRU *cPxPerRU > & Sapling::presentPositions ( ) const
inline

◆ recruitedSaplings()

int Sapling::recruitedSaplings ( ) const
inline

◆ representedStemNumber()

double Sapling::representedStemNumber ( float  height) const

return the number of trees represented by one sapling of the current species and given 'height'

◆ saplings()

const QVector< SaplingTreeOld > & Sapling::saplings ( ) const
inline

◆ setRecruitmentVariation()

static void Sapling::setRecruitmentVariation ( const double  variation)
inlinestatic

◆ setup()

void Sapling::setup ( ResourceUnitSpecies masterRUS)
inline

◆ updateBrowsingPressure()

void Sapling::updateBrowsingPressure ( )
static

Friends And Related Function Documentation

◆ Snapshot

friend class Snapshot
friend

The documentation for this class was generated from the following files: