clTestExpResourceMortality Class Reference

Tests the clExpResourceMortality class. More...

#include <TestExpResourceMortality.h>

List of all members.

Public Member Functions

void TestExpResourceMortality ()
 Tests the growth-and-resource mortality class.

Protected Member Functions

char * WriteXMLFile1 ()
 Writes a parameter file with the specifications given for TestExpResourceMortality(), run 1.
char * WriteXMLFile2 ()
 Writes a parameter file with the specifications given for TestExpResourceMortality(), run 2.


Detailed Description

Tests the clExpResourceMortality class.

Author:
Lora E. Murphy

Member Function Documentation

void clTestExpResourceMortality::TestExpResourceMortality (  ) 

Tests the growth-and-resource mortality class.

First run: WriteXMLFile1() creates the parameter file. The file has the following characteristics:

  • Timestep length of 1 year.
  • 4 species: Species 1, Species 2, Species 3, Species 4 (Species 2 isn't used).
  • Growth and resource mortality applied to saplings of species 1 and 3, and adults of species 1 and 4.
  • The resource grid has specified values for 5 cells.
The function does the following:
  1. Grid 1: Resource = 0, 1000 saplings of species 1 all with a value of 0 in their "Growth" data member; 1000 each of saplings and adults of species 2.
  2. Grid 2: Resource = 0.5, 1000 adults of Species 1 all with a value of 0 in their "Growth" data member.
  3. Grid 3: Resource = 0, 1000 saplings of Species 3 all with a value of 4 in their "Growth" data member.
  4. Grid 4: Resource = 1, 1000 saplings of Species 1 all with a value of 0 in their "Growth" data member.
  5. Grid 5: Resource = 0.6, 1000 adults of Species 4 all with a value of 25.1 in their "Growth" data member.
  6. Grid 6: Resource = 3, 1000 saplings of Species 4 all with a value of 10 in their "Growth" data member.
  7. Grid 7: Resource = 5, 1000 adults of Species 3 all with a value of 14 in their "Growth" data member.
  8. The model is run for 1 timestep.
  9. The remaining trees of each tree type and species are counted.
  10. The counts are compared to expected results, give or take 5% (or greater tolerance at lower numbers).

Second run: WriteXMLFile2() creates the parameter file. Everything is exactly as it is in the first run except the timestep length is 3 years.

char* clTestExpResourceMortality::WriteXMLFile1 (  )  [protected]

Writes a parameter file with the specifications given for TestExpResourceMortality(), run 1.

Returns:
Filename written.

char* clTestExpResourceMortality::WriteXMLFile2 (  )  [protected]

Writes a parameter file with the specifications given for TestExpResourceMortality(), run 2.

Returns:
Filename written.


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

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