clTestWindstorm Class Reference

Tests the clWindstorm class. More...

#include <TestWindstorm.h>

List of all members.

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.


Detailed Description

Tests the clWindstorm class.

Member Function Documentation

void clTestWindstorm::TestWindstorm (  ) 

Assembles all other testing functions into one test.

void clTestWindstorm::TestErrorProcessing ( clSimManager *  p_oSimManager  )  [protected]

Tests error processing.

void clTestWindstorm::TestNormalProcessingRun1 ( clSimManager *  p_oSimManager  )  [protected]

Tests normal processing Run 1.

WriteXMLFile1() writes the parameter file. Aspects of the run:

  • 1 year per timestep.
  • Snag run.
  • This run tests correct damage calculation and killing.
  • The following trees will be added, with a storm of 0.2 triggered for timestep 1:
    • Grid (0,0): 1000 trees of Species 1 and 2, DBH 30.
    • Grid (1,0): 1000 trees of Species 1 and 2, DBH 8.
    • All grids get 1000 trees of DBH 4, Species 1, and DBH 5, Species 2.

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.

Parameters:
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:

  • 1 year per timestep.
  • Snag run.
  • This run tests correct damage calculation and killing.
  • The following trees will be added, with a storm of 0.8 triggered for timestep 1:
    • Grid (0,0): 1000 trees of Species 1 and 2, DBH 30.
    • Grid (1,0): 1000 trees of Species 1 and 2, DBH 8.
    • All grids get 1000 trees of DBH 4, Species 1, and DBH 5, Species 2.

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.

Parameters:
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:

  • 3 years per timestep.
  • Snag run.
  • This run tests multiple storms per timestep, and making sure dead trees are ignored.
  • The following trees will be added, with 3 storms of 0.2 triggered for timestep 1:
    • Grid (0,0): 1000 trees of Species 1 and 2, DBH 30.
    • Grid (1,0): 1000 trees of Species 1 and 2, DBH 8.

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.

Parameters:
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:

  • 1 year per timestep.
  • No snags.
  • This run tests correct handling when there are no snags.
  • The following trees will be added, with a storm of 0.4 triggered for timestep 1:
    • Grid (0,0): 1000 trees of Species 1 and 2, DBH 30.
    • Grid (1,0): 1000 trees of Species 1 and 2, DBH 8.
    • All grids get 1000 trees of DBH 4, Species 1, and DBH 5, Species 2.

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.

Parameters:
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.

Parameters:
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:

  • 1 year per timestep.
  • No snags.
  • This run tests when storms don't start at timestep 1.
  • The following trees will be added, with a storm of 0.5 triggered for timestep 2:
    • Grid (0,0): 1000 trees of Species 1 and 2, DBH 30.
    • Grid (1,0): 1000 trees of Species 1 and 2, DBH 8.

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.

Parameters:
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.

Parameters:
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:

  • 1 year per timestep.
  • No snags.
  • The following trees will be added, with a storm of 0.07 triggered for timestep 1:
    • Grid (0,0): 1000 trees of Species 1 and 2, DBH 30.
    • Grid (1,0): 1000 trees of Species 1 and 2, DBH 8.

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.

Parameters:
p_oSimManager Sim Manager object to run our test run.

char* clTestWindstorm::WriteXMLFile1 (  )  [protected]

Writes the parameter file for TestNormalProcessing1().

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLFile2 (  )  [protected]

Writes the parameter file for TestNormalProcessing2().

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLFile3 (  )  [protected]

Writes the parameter file for TestNormalProcessing3().

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLFile4 (  )  [protected]

Writes the parameter file for TestNormalProcessing4().

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLFile5 (  )  [protected]

Writes the parameter file for TestNormalProcessing5().

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLFile6 (  )  [protected]

Writes the parameter file for TestNormalProcessing6().

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLFile7 (  )  [protected]

Writes the parameter file for TestNormalProcessing7().

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLFile8 (  )  [protected]

Writes the parameter file for TestNormalProcessing8().

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLErrorFile1 (  )  [protected]

Writes an error file where the minimum DBH is negative.

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::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.

char* clTestWindstorm::WriteXMLErrorFile3 (  )  [protected]

Writes an error file where the timestep to start storms is negative.

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLErrorFile4 (  )  [protected]

Writes an error file where the severity of a storm return interval is not between 0 and 1.

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLErrorFile5 (  )  [protected]

Writes an error file where mortality behaviors are not applied to all trees.

Returns:
File name of the freshly written parameter file.

char* clTestWindstorm::WriteXMLErrorFile6 (  )  [protected]

Writes an error file where the storm periodicity is zero.

Returns:
File name of the freshly written parameter file.

void clTestWindstorm::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.

void clTestWindstorm::WriteSnagBehaviorList ( std::fstream &  oOut  )  [protected]

Writes the behavior list for the test parameter files with snags.

Parameters:
oOut File stream to write to.

void clTestWindstorm::WriteNoSnagBehaviorList ( std::fstream &  oOut  )  [protected]

Writes the behavior list for the test parameter files without snags.

Parameters:
oOut File stream to write to.


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

Generated on Wed Oct 28 14:03:23 2009 for SORTIE C++ Test Documentation by  doxygen 1.5.6