Tests the clStormDamageApplier class.
More...
#include <TestStormDamageApplier.h>
|
void | TestStormDamageApplier () |
| Assembles all other testing functions into one test.
|
|
void | MakeGraphs () |
| If you wish a visual test, this will output a spreadsheet for graph making.
|
|
Tests the clStormDamageApplier class.
void clTestStormDamageApplier::MakeGraphs |
( |
| ) |
|
If you wish a visual test, this will output a spreadsheet for graph making.
It will write a tab-delimited file called "StormTest.txt". There is one table for each species. It does storms at 0.02 severity intervals from 0 to 1, a thousand trees of each species, then outputs how many were no damage, medium damage, and severe damage.
void clTestStormDamageApplier::TestErrorProcessing |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
void clTestStormDamageApplier::TestNormalProcessingRun1 |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests normal processing.
WriteXMLFile1() writes the parameter file. Aspects of the run:
-
Grid resolution of "Storm Damage" is default.
-
Run is 5 timesteps.
-
1 year per timestep.
-
This behavior kills no trees.
-
There are no snags for this behavior.
-
The following trees will be added, with the appropriate storm triggered for timestep 1:
-
Grid (0,0): 1000 trees of Species 1 and 2, DBH 30. Damage index is 0.
-
Grid (0,1): 1000 trees of Species 1 and 2, DBH 30. Damage index is 0.5.
-
Grid (0,2): 1000 trees of Species 1 and 2, DBH 30. Damage index is 1.
-
Grid (1,0): 1000 trees of Species 1 and 2, DBH 8. Damage index is 0.
-
Grid (1,1): 1000 trees of Species 1 and 2, DBH 8. Damage index is 0.3.
-
Grid (1,2): 1000 trees of Species 1 and 2, DBH 8. Damage index is 1.
-
Grid (2,0): 1000 trees of Species 1 and 2, DBH 45. Damage index is 0.2. Initial counter is 1002.
-
Grid (2,1): 1000 trees of Species 1 and 2, DBH 15. Damage index is 0.7. Initial counter is 2003.
-
All grids get 100 trees of DBH 4, Species 1, and DBH 5, Species 2.
The run proceeds for 5 timesteps and the number of trees with each damage counter is checked through time.
- Parameters
-
p_oSimManager | Sim Manager object to run our test run. |
void clTestStormDamageApplier::TestNormalProcessingRun2 |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests normal processing.
WriteXMLFile2() writes the parameter file. Aspects of the run:
-
Grid resolution of "Storm Damage" is default.
-
Run is 3 timesteps.
-
3 years per timestep.
-
This behavior kills no trees.
-
There are no snags for this behavior.
-
The following trees will be added, with the appropriate storm triggered for timestep 1:
-
Grid (0,0): 1000 trees of Species 1 and 2, DBH 30. Damage index is 0.
-
Grid (0,1): 1000 trees of Species 1 and 2, DBH 30. Damage index is 0.5.
-
Grid (0,2): 1000 trees of Species 1 and 2, DBH 30. Damage index is 1.
-
Grid (1,0): 1000 trees of Species 1 and 2, DBH 8. Damage index is 0.
-
Grid (1,1): 1000 trees of Species 1 and 2, DBH 8. Damage index is 0.3.
-
Grid (1,2): 1000 trees of Species 1 and 2, DBH 8. Damage index is 1.
-
Grid (2,0): 1000 trees of Species 1 and 2, DBH 45. Damage index is 0.2. Initial counter is 1002.
-
Grid (2,1): 1000 trees of Species 1 and 2, DBH 15. Damage index is 0.7. Initial counter is 2003.
-
All grids get 100 trees of DBH 4, Species 1, and DBH 5, Species 2.
The run proceeds for 3 timesteps and the number of trees with each damage counter is checked through time.
- Parameters
-
p_oSimManager | Sim Manager object to run our test run. |
void clTestStormDamageApplier::TestNormalProcessingRun3 |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests normal processing.
WriteXMLFile1() writes the parameter file. Tests multiple storms in one timestep. Aspects of the run:
-
Grid resolution of "Storm Damage" is default.
-
Run is 5 timesteps.
-
1 year per timestep.
-
This behavior kills no trees.
-
There are no snags for this behavior.
-
The following trees will be added, with the appropriate storm triggered for timestep 1:
-
Grid (0,0): 1000 trees of Species 1 and 2, DBH 30. Damage index is 0 and 0.
-
Grid (0,1): 1000 trees of Species 1 and 2, DBH 30. Damage index is 0.5 and 0.7.
-
Grid (0,2): 1000 trees of Species 1 and 2, DBH 30. Damage index is 1 and 0.
-
Grid (1,0): 1000 trees of Species 1 and 2, DBH 30. Damage index is 0 and 0.2.
-
Grid (1,1): 1000 trees of Species 1 and 2, DBH 30. Damage index is 0.5 and 0.3.
-
Grid (1,2): 1000 trees of Species 1 and 2, DBH 30. Damage index is 1 and 0.8.
-
All grids get 100 trees of DBH 4, Species 1, and DBH 5, Species 2.
The run proceeds for 5 timesteps and the number of trees with each damage counter is checked through time.
- Parameters
-
p_oSimManager | Sim Manager object to run our test run. |
void clTestStormDamageApplier::TestRun1Timestep1 |
( |
clTreePopulation * |
p_oPop | ) |
|
|
protected |
void clTestStormDamageApplier::TestRun1Timestep2 |
( |
clTreePopulation * |
p_oPop | ) |
|
|
protected |
void clTestStormDamageApplier::TestRun1Timestep3 |
( |
clTreePopulation * |
p_oPop | ) |
|
|
protected |
void clTestStormDamageApplier::TestRun1Timestep4 |
( |
clTreePopulation * |
p_oPop | ) |
|
|
protected |
void clTestStormDamageApplier::TestRun1Timestep5 |
( |
clTreePopulation * |
p_oPop | ) |
|
|
protected |
void clTestStormDamageApplier::TestStormDamageApplier |
( |
| ) |
|
Assembles all other testing functions into one test.
void clTestStormDamageApplier::WriteBehaviorList |
( |
std::fstream & |
oOut | ) |
|
|
protected |
Writes the behavior list for the test parameter files.
- Parameters
-
oOut | File stream to write to. |
void clTestStormDamageApplier::WriteCommonStuff |
( |
std::fstream & |
oOut | ) |
|
|
protected |
Writes common portions of the test parameter files.
Starts with <randomSeed> and ends with </allometry>.
- Parameters
-
oOut | File stream to write to. |
const char* clTestStormDamageApplier::WriteXMLErrorFile1 |
( |
| ) |
|
|
protected |
Writes an error file where the storm behavior is not also enabled.
- Returns
- File name of the freshly written parameter file.
const char* clTestStormDamageApplier::WriteXMLErrorFile2 |
( |
| ) |
|
|
protected |
Writes an error file where the storm damage applier behavior is applied to seedlings.
- Returns
- File name of the freshly written parameter file.
const char* clTestStormDamageApplier::WriteXMLErrorFile3 |
( |
| ) |
|
|
protected |
Writes an error file where the value for number of years to heal is not positive.
- Returns
- File name of the freshly written parameter file.
const char* clTestStormDamageApplier::WriteXMLFile1 |
( |
| ) |
|
|
protected |
Writes the parameter file for TestNormalProcessing1().
- Returns
- File name of the freshly written parameter file.
const char* clTestStormDamageApplier::WriteXMLFile2 |
( |
| ) |
|
|
protected |
Writes the parameter file for TestNormalProcessing2().
- Returns
- File name of the freshly written parameter file.
const char* clTestStormDamageApplier::WriteXMLFile3 |
( |
| ) |
|
|
protected |
Writes the parameter file for MakeGraphs().
- Returns
- File name of the freshly written parameter file.
The documentation for this class was generated from the following file: