Rev 170 | Rev 189 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 170 | Rev 180 | ||
---|---|---|---|
Line 470... | Line 470... | ||
470 | partitioning(d); // split npp to compartments and grow (diameter, height) |
470 | partitioning(d); // split npp to compartments and grow (diameter, height) |
471 | 471 | ||
472 | mortality(d); |
472 | mortality(d); |
473 | 473 | ||
474 | mStressIndex = d.stress_index; |
474 | mStressIndex = d.stress_index; |
- | 475 | ||
- | 476 | if (!isDead()) |
|
- | 477 | mRU->ressourceUnitSpecies(species()).statistics().add(this); |
|
475 | }
|
478 | }
|
476 | 479 | ||
477 | 480 | ||
478 | inline void Tree::partitioning(TreeGrowthData &d) |
481 | inline void Tree::partitioning(TreeGrowthData &d) |
479 | {
|
482 | {
|
Line 677... | Line 680... | ||
677 | {
|
680 | {
|
678 | /// @see Species::volumeFactor() for details
|
681 | /// @see Species::volumeFactor() for details
|
679 | const double volume_factor = species()->volumeFactor(); |
682 | const double volume_factor = species()->volumeFactor(); |
680 | const double volume = volume_factor * mDbh*mDbh*mHeight * 0.0001; // dbh in cm: cm/100 * cm/100 = cm*cm * 0.0001 = m2 |
683 | const double volume = volume_factor * mDbh*mDbh*mHeight * 0.0001; // dbh in cm: cm/100 * cm/100 = cm*cm * 0.0001 = m2 |
681 | return volume; |
684 | return volume; |
- | 685 | }
|
|
- | 686 | ||
- | 687 | double Tree::basalArea() const |
|
- | 688 | {
|
|
- | 689 | // A = r^2 * pi = d/2*pi; from cm->m: d/200
|
|
- | 690 | const double b = (mDbh/200.)*(mDbh/200.)*M_PI; |
|
- | 691 | return b; |
|
682 | }
|
692 | }
|