Tests the clPuertoRicoEstablishment class.
More...
#include <TestPuertoRicoEstablishment.h>
|
void | TestNormalProcessing (clSimManager *p_oSimManager) |
| This tests normal processing.
|
|
void | TestErrorProcessing (clSimManager *p_oSimManager) |
| Tests error processing.
|
|
const char * | WriteXMLFile1 () |
| Writes a setup file.
|
|
const char * | WriteXMLErrorFile1 () |
| Writes a file where a light extinction coefficient is not between 0 and 1.
|
|
const char * | WriteXMLErrorFile2 () |
| Writes a file where the value for m_fLightHeight is not zero or greater.
|
|
const char * | WriteXMLErrorFile3 () |
| Writes a file where the value for mp_fOptimumGLI is not between 0 and 100.
|
|
const char * | WriteXMLErrorFile4 () |
| Writes a file where there is no disperse behavior.
|
|
const char * | WriteXMLErrorFile5 () |
| Writes a file where there is no storm behavior.
|
|
const char * | WriteXMLErrorFile6 () |
| Writes a file where the number of altitude angles is less than 1.
|
|
const char * | WriteXMLErrorFile7 () |
| Writes a file where the number of azimuth angles is less than 1.
|
|
void | WriteCommonStuff (std::fstream &oOut) |
| Writes common portions of the test parameter files (tree pop, plot, etc).
|
|
Tests the clPuertoRicoEstablishment class.
void clTestPuertoRicoEstablishment::TestErrorProcessing |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests error processing.
It checks for the following errors:
-
Any of the light extinction coefficient values are not between 0 and 1.
-
The value for m_fLightHeight is not zero or greater
-
The value for mp_fOptimumGLI is not between 0 and 100.
-
There is no disperse behavior enabled.
void clTestPuertoRicoEstablishment::TestNormalProcessing |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
This tests normal processing.
A plot is set up and a set of trees added designed to give target GLI values to certain "Dispersed Seed" grid cells. Mostly there is only one neighbor, and the trees are placed such that the GLI point is completely within their canopies, to make test calculations easy. (GLI calculations themselves don't need testing here.) A given number of seeds of species 2, 3, and 4 is added to each of 9 grid cells. The run goes, and then we check that the appropriate number of seedlings of each species in each cell exists. WriteXMLFile1() writes the parameter file.
- Parameters
-
p_oSimManager | Sim Manager object. |
void clTestPuertoRicoEstablishment::TestPuertoRicoEstablishment |
( |
| ) |
|
Tests the clPuertoRicoEstablishment class.
void clTestPuertoRicoEstablishment::WriteCommonStuff |
( |
std::fstream & |
oOut | ) |
|
|
protected |
Writes common portions of the test parameter files (tree pop, plot, etc).
- Parameters
-
oOut | File stream to write to. |
const char* clTestPuertoRicoEstablishment::WriteXMLErrorFile1 |
( |
| ) |
|
|
protected |
Writes a file where a light extinction coefficient is not between 0 and 1.
- Returns
- Filename written.
const char* clTestPuertoRicoEstablishment::WriteXMLErrorFile2 |
( |
| ) |
|
|
protected |
Writes a file where the value for m_fLightHeight is not zero or greater.
- Returns
- Filename written.
const char* clTestPuertoRicoEstablishment::WriteXMLErrorFile3 |
( |
| ) |
|
|
protected |
Writes a file where the value for mp_fOptimumGLI is not between 0 and 100.
- Returns
- Filename written.
const char* clTestPuertoRicoEstablishment::WriteXMLErrorFile4 |
( |
| ) |
|
|
protected |
Writes a file where there is no disperse behavior.
- Returns
- Filename written.
const char* clTestPuertoRicoEstablishment::WriteXMLErrorFile5 |
( |
| ) |
|
|
protected |
Writes a file where there is no storm behavior.
- Returns
- Filename written.
const char* clTestPuertoRicoEstablishment::WriteXMLErrorFile6 |
( |
| ) |
|
|
protected |
Writes a file where the number of altitude angles is less than 1.
- Returns
- Filename written.
const char* clTestPuertoRicoEstablishment::WriteXMLErrorFile7 |
( |
| ) |
|
|
protected |
Writes a file where the number of azimuth angles is less than 1.
- Returns
- Filename written.
const char* clTestPuertoRicoEstablishment::WriteXMLFile1 |
( |
| ) |
|
|
protected |
Writes a setup file.
This contains 4 species, one unused (species 1; this helps catch array-index problems). Non-spatial disperse is applied to adults of all species, with values such that no seeds will be dispersed from any trees. Species 2-4 get Puerto Rico establishment.
- Returns
- Filename written.
The documentation for this class was generated from the following file: