#include <TestDimensionAnalysis.h>
Public Member Functions | |
void | TestDimensionAnalysis () |
Performs all the tests from one function. | |
Protected Member Functions | |
void | TestNormalProcessing (clSimManager *p_oSimManager) |
Tests normal processing. | |
void | TestErrorProcessing (clSimManager *p_oSimManager) |
Tests error processing. | |
void | TestRun1 (clSimManager *p_oSimManager) |
Performs test run 1. | |
void | TestRun2 (clSimManager *p_oSimManager) |
Performs test run 2. | |
void | TestRun3 (clSimManager *p_oSimManager) |
Performs test run 3. | |
void | TestRun4 (clSimManager *p_oSimManager) |
Performs test run 4. | |
void | TestRun5 (clSimManager *p_oSimManager) |
Performs test run 5. | |
void | TestRun6 (clSimManager *p_oSimManager) |
Performs test run 6. | |
void | TestRun7 (clSimManager *p_oSimManager) |
Performs test run 7. | |
char * | WriteXMLFile1 () |
Writes the parameter file for run 1. | |
char * | WriteXMLFile2 () |
Writes the parameter file for run 2. | |
char * | WriteXMLFile3 () |
Writes the parameter file for run 3. | |
char * | WriteXMLFile4 () |
Writes the parameter file for run 4. | |
char * | WriteXMLFile5 () |
Writes the parameter file for run 5. | |
char * | WriteXMLFile6 () |
Writes the parameter file for run 6. | |
char * | WriteXMLFile7 () |
Writes the parameter file for run 7. | |
char * | WriteXMLErrorFile1 () |
Writes an error file where an equation ID is unrecognized. | |
char * | WriteXMLErrorFile2 () |
Writes an error file where a DBH units value is unrecognized. | |
char * | WriteXMLErrorFile3 () |
Writes an error file where the biomass calculator is applied to a seedling. | |
char * | WriteXMLErrorFile4 () |
Writes an error file where a biomass units value is unrecognized. | |
char * | WriteXMLErrorFile5 () |
Writes an error file where a correction factor flag value is unrecognized. | |
void | WriteCommonStuff (std::fstream &oOut) |
Writes common portions of the test parameter files (tree pop, plot, etc). | |
void | WriteCommonErrorStuff (std::fstream &oOut) |
Writes common portions of the test parameter files (tree pop, plot, etc). | |
clTree ** | CreateTrees (clTreePopulation *p_oPop) |
Creates the trees. |
void clTestDimensionAnalysis::TestNormalProcessing | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing.
This does runs 1 - 7.
p_oSimManager | Sim Manager object to call for runs. |
void clTestDimensionAnalysis::TestErrorProcessing | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests error processing.
This uses WriteXMLErrorFileX() to introduce errors and makes sure that they are caught.
p_oSimManager | Sim Manager object to call for runs. |
void clTestDimensionAnalysis::TestRun1 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Performs test run 1.
Tests equation 1, all possible units conversions. WriteXMLFile1() does setup. This function creates three trees for each species, of varying sizes. The run goes for a timestep and then the function checks the biomass values.
p_oSimManager | Sim Manager object to call for runs. |
void clTestDimensionAnalysis::TestRun2 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Performs test run 2.
Tests equation 2, all possible units conversions. WriteXMLFile2() does setup. This function creates three trees for each species, of varying sizes. The run goes for a timestep and then the function checks the biomass values.
p_oSimManager | Sim Manager object to call for runs. |
void clTestDimensionAnalysis::TestRun3 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Performs test run 3.
Tests equation 3, all possible units conversions. WriteXMLFile3() does setup. This function creates three trees for each species, of varying sizes. The run goes for a timestep and then the function checks the biomass values.
p_oSimManager | Sim Manager object to call for runs. |
void clTestDimensionAnalysis::TestRun4 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Performs test run 4.
Tests equations 4 and 5, all possible units conversions. WriteXMLFile4() does setup. This function creates three trees for each species, of varying sizes. The run goes for a timestep and then the function checks the biomass values.
p_oSimManager | Sim Manager object to call for runs. |
void clTestDimensionAnalysis::TestRun5 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Performs test run 5.
Tests equations 6 and 7, all possible units conversions. WriteXMLFile5() does setup. This function creates three trees for each species, of varying sizes. The run goes for a timestep and then the function checks the biomass values.
p_oSimManager | Sim Manager object to call for runs. |
void clTestDimensionAnalysis::TestRun6 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Performs test run 6.
Tests equation 8, all possible units conversions. WriteXMLFile6() does setup. This function creates three trees for each species, of varying sizes. The run goes for a timestep and then the function checks the biomass values.
p_oSimManager | Sim Manager object to call for runs. |
void clTestDimensionAnalysis::TestRun7 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Performs test run 7.
Tests equation 9, all possible units conversions. WriteXMLFile7() does setup. This function creates three trees for each species, of varying sizes. The run goes for a timestep and then the function checks the biomass values.
p_oSimManager | Sim Manager object to call for runs. |
char* clTestDimensionAnalysis::WriteXMLFile1 | ( | ) | [protected] |
Writes the parameter file for run 1.
There are 19 species (Species 13 is not used). The biomass calculator is the only behavior and is applied to saplings and adults of all used species. All 18 used species use equation 1. The first 9 use a correction factor; the second 9 don't.
char* clTestDimensionAnalysis::WriteXMLFile2 | ( | ) | [protected] |
Writes the parameter file for run 2.
There are 19 species (Species 13 is not used). The biomass calculator is the only behavior and is applied to saplings and adults of all used species. All 18 used species use equation 2. The first 9 use a correction factor; the second 9 don't.
char* clTestDimensionAnalysis::WriteXMLFile3 | ( | ) | [protected] |
Writes the parameter file for run 3.
There are 19 species (Species 13 is not used). The biomass calculator is the only behavior and is applied to saplings and adults of all used species. All 18 used species use equation 3. The first 9 use a correction factor; the second 9 don't.
char* clTestDimensionAnalysis::WriteXMLFile4 | ( | ) | [protected] |
Writes the parameter file for run 4.
There are 19 species (Species 13 is not used). The biomass calculator is the only behavior and is applied to saplings and adults of all used species. The first 9 species use equation 4; the second 9 use equation 5.
char* clTestDimensionAnalysis::WriteXMLFile5 | ( | ) | [protected] |
Writes the parameter file for run 5.
There are 19 species (Species 13 is not used). The biomass calculator is the only behavior and is applied to saplings and adults of all used species. The first 9 species use equation 6; the second 9 use equation 7.
char* clTestDimensionAnalysis::WriteXMLFile6 | ( | ) | [protected] |
Writes the parameter file for run 6.
There are 19 species (Species 13 is not used). The biomass calculator is the only behavior and is applied to saplings and adults of all used species. All 18 used species use equation 8. The first 9 use a correction factor; the second 9 don't.
char* clTestDimensionAnalysis::WriteXMLFile7 | ( | ) | [protected] |
Writes the parameter file for run 7.
There are 19 species (Species 13 is not used). The biomass calculator is the only behavior and is applied to saplings and adults of all used species. All 18 used species use equation 9. The first 9 use a correction factor; the second 9 don't.
char* clTestDimensionAnalysis::WriteXMLErrorFile1 | ( | ) | [protected] |
Writes an error file where an equation ID is unrecognized.
char* clTestDimensionAnalysis::WriteXMLErrorFile2 | ( | ) | [protected] |
Writes an error file where a DBH units value is unrecognized.
char* clTestDimensionAnalysis::WriteXMLErrorFile3 | ( | ) | [protected] |
Writes an error file where the biomass calculator is applied to a seedling.
char* clTestDimensionAnalysis::WriteXMLErrorFile4 | ( | ) | [protected] |
Writes an error file where a biomass units value is unrecognized.
char* clTestDimensionAnalysis::WriteXMLErrorFile5 | ( | ) | [protected] |
Writes an error file where a correction factor flag value is unrecognized.
void clTestDimensionAnalysis::WriteCommonStuff | ( | std::fstream & | oOut | ) | [protected] |
Writes common portions of the test parameter files (tree pop, plot, etc).
This ends with </behaviorList>.
oOut | File stream to write to. |
void clTestDimensionAnalysis::WriteCommonErrorStuff | ( | std::fstream & | oOut | ) | [protected] |
Writes common portions of the test parameter files (tree pop, plot, etc).
This ends with </behaviorList>. There are only two species for this file.
oOut | File stream to write to. |
clTree** clTestDimensionAnalysis::CreateTrees | ( | clTreePopulation * | p_oPop | ) | [protected] |
Creates the trees.
3 of each species are created (Species 1 to Species 19, Species 13 excepted). There is one of DBH 5 cm, one of DBH 50 cm, and one of DBH 100 cm. Pointers to the new trees are placed in the passed array.
p_oPop | Tree population object. |