#include <TestWindstorm.h>
Public Member Functions | |
void | TestWindstorm () |
Assembles all other testing functions into one test. | |
Protected Member Functions | |
void | TestErrorProcessing (clSimManager *p_oSimManager) |
Tests error processing. | |
void | TestNormalProcessingRun1 (clSimManager *p_oSimManager) |
Tests normal processing Run 1. | |
void | TestNormalProcessingRun2 (clSimManager *p_oSimManager) |
Tests normal processing Run 2. | |
void | TestNormalProcessingRun3 (clSimManager *p_oSimManager) |
Tests normal processing Run 3. | |
void | TestNormalProcessingRun4 (clSimManager *p_oSimManager) |
Tests normal processing Run 4. | |
void | TestNormalProcessingRun5 (clSimManager *p_oSimManager) |
Tests normal processing Run 5. | |
void | TestNormalProcessingRun6 (clSimManager *p_oSimManager) |
Tests normal processing Run 6. | |
void | TestNormalProcessingRun7 (clSimManager *p_oSimManager) |
Tests normal processing Run 7. | |
void | TestNormalProcessingRun8 (clSimManager *p_oSimManager) |
Tests normal processing Run 8. | |
char * | WriteXMLFile1 () |
Writes the parameter file for TestNormalProcessing1(). | |
char * | WriteXMLFile2 () |
Writes the parameter file for TestNormalProcessing2(). | |
char * | WriteXMLFile3 () |
Writes the parameter file for TestNormalProcessing3(). | |
char * | WriteXMLFile4 () |
Writes the parameter file for TestNormalProcessing4(). | |
char * | WriteXMLFile5 () |
Writes the parameter file for TestNormalProcessing5(). | |
char * | WriteXMLFile6 () |
Writes the parameter file for TestNormalProcessing6(). | |
char * | WriteXMLFile7 () |
Writes the parameter file for TestNormalProcessing7(). | |
char * | WriteXMLFile8 () |
Writes the parameter file for TestNormalProcessing8(). | |
char * | WriteXMLErrorFile1 () |
Writes an error file where the minimum DBH is negative. | |
char * | WriteXMLErrorFile2 () |
Writes an error file where the storm damage applier behavior is applied to seedlings. | |
char * | WriteXMLErrorFile3 () |
Writes an error file where the timestep to start storms is negative. | |
char * | WriteXMLErrorFile4 () |
Writes an error file where the severity of a storm return interval is not between 0 and 1. | |
char * | WriteXMLErrorFile5 () |
Writes an error file where mortality behaviors are not applied to all trees. | |
char * | WriteXMLErrorFile6 () |
Writes an error file where the storm periodicity is zero. | |
void | WriteCommonStuff (std::fstream &oOut) |
Writes common portions of the test parameter files. | |
void | WriteSnagBehaviorList (std::fstream &oOut) |
Writes the behavior list for the test parameter files with snags. | |
void | WriteNoSnagBehaviorList (std::fstream &oOut) |
Writes the behavior list for the test parameter files without snags. |
void clTestWindstorm::TestNormalProcessingRun1 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing Run 1.
WriteXMLFile1() writes the parameter file. Aspects of the run:
The run proceeds for 1 timestep. The "Windstorm Results" grid is checked, and the actual number of trees alive and dead is checked as well.
p_oSimManager | Sim Manager object to run our test run. |
void clTestWindstorm::TestNormalProcessingRun2 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing Run 2.
WriteXMLFile2() writes the parameter file. Aspects of the run:
The run proceeds for 1 timestep. The "Windstorm Results" grid is checked, and the actual number of trees alive and dead is checked as well.
p_oSimManager | Sim Manager object to run our test run. |
void clTestWindstorm::TestNormalProcessingRun3 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing Run 3.
WriteXMLFile3() writes the parameter file. Aspects of the run:
The run proceeds for 1 timestep. The "Windstorm Results" grid is checked, and the actual number of trees alive and dead is checked as well.
p_oSimManager | Sim Manager object to run our test run. |
void clTestWindstorm::TestNormalProcessingRun4 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing Run 4.
WriteXMLFile4() writes the parameter file. Aspects of the run:
The run proceeds for 1 timestep. The "Windstorm Results" grid is checked, and the actual number of trees alive and dead is checked as well.
p_oSimManager | Sim Manager object to run our test run. |
void clTestWindstorm::TestNormalProcessingRun5 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing Run 5.
WriteXMLFile5() writes the parameter file. Storm severities for all return intervals are 0, and this makes sure that no storms occur.
The run proceeds for 1 timestep. The "Windstorm Results" grid is checked, and the actual number of trees alive and dead is checked as well to make sure nothing died.
p_oSimManager | Sim Manager object to run our test run. |
void clTestWindstorm::TestNormalProcessingRun6 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing Run 6.
WriteXMLFile6() writes the parameter file. Aspects of the run:
The run proceeds for 2 timesteps. The "Windstorm Results" grid is checked, and the actual number of trees alive and dead is checked as well. No storm should occur for timestep 1.
p_oSimManager | Sim Manager object to run our test run. |
void clTestWindstorm::TestNormalProcessingRun7 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing Run 7.
WriteXMLFile7() writes the parameter file. This run tests to make sure the "Windstorm Results" grid is refreshed for each timestep.
The 1 year return interval is 0. This runs for 2 timesteps, and verifies that the results for the two in the "Windstorm Results" grid are different.
p_oSimManager | Sim Manager object to run our test run. |
void clTestWindstorm::TestNormalProcessingRun8 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing Run 8.
WriteXMLFile8() writes the parameter file. This run tests to make sure storms below the minimum intensity are handled correctly. Aspects of the run:
The run proceeds for 1 timestep. The "Windstorm Results" grid is checked, and the actual number of trees alive and dead is checked as well.
p_oSimManager | Sim Manager object to run our test run. |
void clTestWindstorm::WriteCommonStuff | ( | std::fstream & | oOut | ) | [protected] |
Writes common portions of the test parameter files.
Starts with <randomSeed> and ends with </allometry>.
oOut | File stream to write to. |
void clTestWindstorm::WriteNoSnagBehaviorList | ( | std::fstream & | oOut | ) | [protected] |
Writes the behavior list for the test parameter files without snags.
oOut | File stream to write to. |
void clTestWindstorm::WriteSnagBehaviorList | ( | std::fstream & | oOut | ) | [protected] |
Writes the behavior list for the test parameter files with snags.
oOut | File stream to write to. |
char* clTestWindstorm::WriteXMLErrorFile1 | ( | ) | [protected] |
Writes an error file where the minimum DBH is negative.
char* clTestWindstorm::WriteXMLErrorFile2 | ( | ) | [protected] |
Writes an error file where the storm damage applier behavior is applied to seedlings.
char* clTestWindstorm::WriteXMLErrorFile3 | ( | ) | [protected] |
Writes an error file where the timestep to start storms is negative.
char* clTestWindstorm::WriteXMLErrorFile4 | ( | ) | [protected] |
Writes an error file where the severity of a storm return interval is not between 0 and 1.
char* clTestWindstorm::WriteXMLErrorFile5 | ( | ) | [protected] |
Writes an error file where mortality behaviors are not applied to all trees.
char* clTestWindstorm::WriteXMLErrorFile6 | ( | ) | [protected] |
Writes an error file where the storm periodicity is zero.
char* clTestWindstorm::WriteXMLFile1 | ( | ) | [protected] |
Writes the parameter file for TestNormalProcessing1().
char* clTestWindstorm::WriteXMLFile2 | ( | ) | [protected] |
Writes the parameter file for TestNormalProcessing2().
char* clTestWindstorm::WriteXMLFile3 | ( | ) | [protected] |
Writes the parameter file for TestNormalProcessing3().
char* clTestWindstorm::WriteXMLFile4 | ( | ) | [protected] |
Writes the parameter file for TestNormalProcessing4().
char* clTestWindstorm::WriteXMLFile5 | ( | ) | [protected] |
Writes the parameter file for TestNormalProcessing5().
char* clTestWindstorm::WriteXMLFile6 | ( | ) | [protected] |
Writes the parameter file for TestNormalProcessing6().
char* clTestWindstorm::WriteXMLFile7 | ( | ) | [protected] |
Writes the parameter file for TestNormalProcessing7().
char* clTestWindstorm::WriteXMLFile8 | ( | ) | [protected] |
Writes the parameter file for TestNormalProcessing8().