clTestNCIBAGrowth Class Reference

Tests the clNCIBAGrowth class. More...

#include <TestNCIBAGrowth.h>

List of all members.

Public Member Functions

void TestNCIBAGrowth ()
 Tests the clNCIBAGrowth class.
void TestAutoHeightVsDiamOnly (clSimManager *p_oSimManager)
 Tests to make sure that the two NCI growth behaviors, diam only and auto height, work correctly.
void TestRun1 (clSimManager *p_oSimManager)
 Performs a test run of NCI growth.
void TestRun2 (clSimManager *p_oSimManager)
 Performs a test run of NCI growth.
void TestErrorProcessing (clSimManager *p_oSimManager)
 Tests error processing for input files.

Protected Member Functions

char * WriteXMLFile1 ()
 Writes a parameter file to direct testing.
char * WriteXMLFile2 ()
 Writes a 1-year timestep file.
char * WriteXMLFile3 ()
 Writes a 3-year timestep file.
char * WriteXMLErrorFile1 ()
 Writes an error condition where max radius of neighbor effects is < 0.
char * WriteXMLErrorFile2 ()
 Writes an error condition where max growth for a species is < 0.
char * WriteXMLErrorFile3 ()
 Writes an error condition where Xb for a species = 0.
char * WriteXMLErrorFile4 ()
 Writes an error condition where X0 for a species = 0.
char * WriteXMLErrorFile5 ()
 Writes an error condition where a neighbor DBH is less than 0.
void WriteCommonStuff (std::fstream &oOut)
 Writes common portions of the test parameter files (tree pop, plot, etc).
void WriteErrorFileCommonStuff (std::fstream &oOut)
 Writes common portions of the test error parameter files (tree pop, plot, etc).


Detailed Description

Tests the clNCIBAGrowth class.


Member Function Documentation

void clTestNCIBAGrowth::TestAutoHeightVsDiamOnly clSimManager *  p_oSimManager  ) 
 

Tests to make sure that the two NCI growth behaviors, diam only and auto height, work correctly.

WriteXMLFile1() is used to do setup. Then, this will create two trees, one of each species. Species 1 and Species 2 are identical in every way. Species 1 is assigned NCI growth as a diameter-auto, and Species 2 is assigned NCI growth as diameter-only. The two trees are assigned identical diameters and heights (heights that do not match the diameters, allometrically-speaking). The same shade will be assigned to each (0.5). Growth will be allowed to occur, and then this makes sure that the new diameters are identical but the heights are not.

Parameters:
p_oSimManager Sim Manager object to do the runs.

void clTestNCIBAGrowth::TestErrorProcessing clSimManager *  p_oSimManager  ) 
 

Tests error processing for input files.

WriteXMLErrorFileX (where X = 1-5) is written and checked to make sure that each produces an error.

void clTestNCIBAGrowth::TestRun1 clSimManager *  p_oSimManager  ) 
 

Performs a test run of NCI growth.

WriteXMLFile2() performs setup for a 1-year timestep. There are 9 target trees whose values will be tested according to the testing spreadsheet prepared.

Parameters:
p_oSimManager Sim Manager object to do the runs.

void clTestNCIBAGrowth::TestRun2 clSimManager *  p_oSimManager  ) 
 

Performs a test run of NCI growth.

WriteXMLFile3() performs setup for a 3-year timestep. There are 9 target trees whose values will be tested according to the testing spreadsheet prepared.

Parameters:
p_oSimManager Sim Manager object to do the runs.

void clTestNCIBAGrowth::WriteCommonStuff std::fstream &  oOut  )  [protected]
 

Writes common portions of the test parameter files (tree pop, plot, etc).

Picks up right after the number of years per timestep and finishes out the file.

Parameters:
oOut File stream to write to.

void clTestNCIBAGrowth::WriteErrorFileCommonStuff std::fstream &  oOut  )  [protected]
 

Writes common portions of the test error parameter files (tree pop, plot, etc).

Starts at the beginning of the file and ends at the closing tree tag.

Parameters:
oOut File stream to write to.

char* clTestNCIBAGrowth::WriteXMLErrorFile1  )  [protected]
 

Writes an error condition where max radius of neighbor effects is < 0.

Returns:
Filename written.

char* clTestNCIBAGrowth::WriteXMLErrorFile2  )  [protected]
 

Writes an error condition where max growth for a species is < 0.

Returns:
Filename written.

char* clTestNCIBAGrowth::WriteXMLErrorFile3  )  [protected]
 

Writes an error condition where Xb for a species = 0.

Returns:
Filename written.

char* clTestNCIBAGrowth::WriteXMLErrorFile4  )  [protected]
 

Writes an error condition where X0 for a species = 0.

Returns:
Filename written.

char* clTestNCIBAGrowth::WriteXMLErrorFile5  )  [protected]
 

Writes an error condition where a neighbor DBH is less than 0.

Returns:
Filename written.

char* clTestNCIBAGrowth::WriteXMLFile1  )  [protected]
 

Writes a parameter file to direct testing.

This contains two species, identical in all ways except Species 1 is assigned NCI growth as a diameter-auto, and Species 2 is assigned NCI growth as diameter-only.

Returns:
Filename written.

char* clTestNCIBAGrowth::WriteXMLFile2  )  [protected]
 

Writes a 1-year timestep file.

This contains 4 species. NCI growth (auto-height) is assigned to saplings and adults of Species 2, 3, and 4.

Returns:
Filename written.

char* clTestNCIBAGrowth::WriteXMLFile3  )  [protected]
 

Writes a 3-year timestep file.

This contains 4 species. NCI growth (auto-height) is assigned to saplings and adults of Species 2, 3, and 4.

Returns:
Filename written.


The documentation for this class was generated from the following file:
Generated on Mon Mar 27 15:13:45 2006 for SORTIE C++ Test Documentation by  doxygen 1.4.6-NO