iLand
Public Member Functions | List of all members
CNPool Class Reference

CNPool provides (in addition to CNPair) also a weighted parameter value (e.g. More...

#include <snag.h>

Inheritance diagram for CNPool:
CNPair

Public Member Functions

 CNPool ()
 
 CNPool (const double c, const double n, const double param_value)
 
double parameter () const
 get weighting parameter More...
 
double parameter (const CNPool &s) const
 'simulate' weighting (get weighted param value of 's' with the current content) More...
 
void clear ()
 
void addBiomass (const double biomass, const double CNratio, const double parameter_value)
 add biomass with a specific 'CNRatio' and 'parameter_value' More...
 
void add (const CNPair &s, const double parameter_value)
 convenience function More...
 
void setParameter (const double value)
 
void operator+= (const CNPool &s)
 
const CNPool operator* (const double factor) const
 return the pool multiplied with 'factor' More...
 
- Public Member Functions inherited from CNPair
 CNPair ()
 
 CNPair (const double c, const double n)
 
bool isEmpty () const
 returns true if pool is empty More...
 
bool isValid () const
 return true if pool is valid (content of C or N >=0) More...
 
double CN ()
 current CN ratio More...
 
void clear ()
 
double biomass () const
 retrieve the amount of biomass (kg/ha). Uses the global C-fraciton. Soil pools are in t/ha!!! More...
 
void addBiomass (const double biomass, const double CNratio)
 add biomass to the pool (kg dry mass/ha); CNratio is used to calculate the N-Content, the global C-Fraction of biomass is used to calculate the amount of carbon of 'biomass'. More...
 
void operator+= (const CNPair &s)
 add contents of a pool More...
 
void operator*= (const double factor)
 Multiply pool with 'factor'. More...
 
const CNPair operator+ (const CNPair &p2) const
 return the sum of two pools More...
 
const CNPair operator- (const CNPair &p2) const
 return the difference of two pools More...
 
const CNPair operator* (const double factor) const
 return the pool multiplied with 'factor' More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CNPair
static void setCFraction (const double fraction)
 set the global fraction of carbon of biomass More...
 
- Public Attributes inherited from CNPair
double C
 
double N
 
- Static Protected Attributes inherited from CNPair
static double biomassCFraction = biomassCFraction
 

Detailed Description

CNPool provides (in addition to CNPair) also a weighted parameter value (e.g.

a decay rate)

Constructor & Destructor Documentation

◆ CNPool() [1/2]

CNPool::CNPool ( )
inline

◆ CNPool() [2/2]

CNPool::CNPool ( const double  c,
const double  n,
const double  param_value 
)
inline

Member Function Documentation

◆ add()

void CNPool::add ( const CNPair s,
const double  parameter_value 
)
inline

convenience function

◆ addBiomass()

void CNPool::addBiomass ( const double  biomass,
const double  CNratio,
const double  parameter_value 
)

add biomass with a specific 'CNRatio' and 'parameter_value'

add biomass and weigh the parameter_value with the current C-content of the pool

◆ clear()

void CNPool::clear ( )
inline

◆ operator*()

const CNPool CNPool::operator* ( const double  factor) const
inline

return the pool multiplied with 'factor'

◆ operator+=()

void CNPool::operator+= ( const CNPool s)

◆ parameter() [1/2]

double CNPool::parameter ( ) const
inline

get weighting parameter

◆ parameter() [2/2]

double CNPool::parameter ( const CNPool s) const

'simulate' weighting (get weighted param value of 's' with the current content)

◆ setParameter()

void CNPool::setParameter ( const double  value)
inline

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