#include <TestCarbonValueCalculator.h>
Public Member Functions | |
void | TestCarbonValueCalculator () |
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. | |
char * | WriteXMLFile1 () |
Writes the parameter file for normal processing. | |
char * | WriteXMLErrorFile1 () |
Writes an error file where the Dimension Analysis behavior is not enabled for all trees for carbon value. | |
char * | WriteXMLErrorFile2 () |
Writes an error file where the percentage of biomass that is carbon is negative. | |
char * | WriteXMLErrorFile3 () |
Writes an error file where the percentage of biomass that is carbon is more than 100. | |
void | WriteCommonErrorStuff (std::fstream &oOut) |
Writes common portions of the test parameter files (tree pop, plot, etc). |
void clTestCarbonValueCalculator::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 clTestCarbonValueCalculator::TestNormalProcessing | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing.
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 carbon and carbon value for each species. Then this kills all trees and runs another timestep to check grid reset.
p_oSimManager | Sim Manager object to call for runs. |
void clTestCarbonValueCalculator::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. |
char* clTestCarbonValueCalculator::WriteXMLErrorFile1 | ( | ) | [protected] |
Writes an error file where the Dimension Analysis behavior is not enabled for all trees for carbon value.
char* clTestCarbonValueCalculator::WriteXMLErrorFile2 | ( | ) | [protected] |
Writes an error file where the percentage of biomass that is carbon is negative.
char* clTestCarbonValueCalculator::WriteXMLErrorFile3 | ( | ) | [protected] |
Writes an error file where the percentage of biomass that is carbon is more than 100.
char* clTestCarbonValueCalculator::WriteXMLFile1 | ( | ) | [protected] |
Writes the parameter file for normal processing.
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 dimension analysis equation 1. The first 9 use a correction factor; the second 9 don't.