Subversion Repositories public iLand

Rev

Rev 428 | Rev 475 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 428 Rev 470
Line 220... Line 220...
220
220
221
/** calculates the lightResponse based on a value for LRI and the species lightResponseClass.
221
/** calculates the lightResponse based on a value for LRI and the species lightResponseClass.
222
    LightResponse is classified from 1 (very shade inolerant) and 5 (very shade tolerant) and interpolated for values between 1 and 5.
222
    LightResponse is classified from 1 (very shade inolerant) and 5 (very shade tolerant) and interpolated for values between 1 and 5.
223
    Returns a value between 0..1
223
    Returns a value between 0..1
224
    @sa http://iland.boku.ac.at/allocation#reserve_and_allocation_to_stem_growth */
224
    @sa http://iland.boku.ac.at/allocation#reserve_and_allocation_to_stem_growth */
225
double SpeciesSet::lightResponse(const double lightResourceIndex, const double lightResponseClass)
-
 
-
 
225
double SpeciesSet::lightResponse(const double lightResourceIndex, const double lightResponseClass) const
226
{
226
{
227
    double low = mLightResponseIntolerant.calculate(lightResourceIndex);
227
    double low = mLightResponseIntolerant.calculate(lightResourceIndex);
228
    double high = mLightResponseTolerant.calculate(lightResourceIndex);
228
    double high = mLightResponseTolerant.calculate(lightResourceIndex);
229
    double result = low + 0.25*(lightResponseClass-1.)*(high-low);
229
    double result = low + 0.25*(lightResponseClass-1.)*(high-low);
230
    return limit(result, 0., 1.);
230
    return limit(result, 0., 1.);