-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVegetationPatch.cpp
More file actions
36 lines (32 loc) · 1.39 KB
/
Copy pathVegetationPatch.cpp
File metadata and controls
36 lines (32 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "VegetationPatch.h"
#include "Input.h"
#include "Patch.h"
#include "Plant.h"
/////////////////////////////////////////////////////////
VegetationPatch::VegetationPatch(int xCor, int yCor, const Input& _input, const Patch& _patch):
xCor(((xCor+1.0)*_input.cellSize)-(_input.cellSize/2.0)), yCor(((yCor+1.0)*_input.cellSize)-(_input.cellSize/2.0)), patch(_patch)
{
relativeRoots.resize(patch.waterPatch->waterLayer.size(), 0.0);
abovegroundLitterCMass = 0.0;
abovegroundLitterNMass = 0.0;
standingDeadCMass = 0.0;
standingDeadNMass = 0.0;
deadAboveLitterCMass = 0.0;
deadAboveLitterNMass = 0.0;
belowgroundLitterCMass.resize(patch.waterPatch->waterLayer.size(), 0.0);
belowgroundLitterNMass.resize(patch.waterPatch->waterLayer.size(), 0.0);
belowgroundCMass.resize(patch.waterPatch->waterLayer.size(), 0.0);
deadBelowLitterCMass.resize(patch.waterPatch->waterLayer.size(), 0.0);
belowgroundNMass.resize(patch.waterPatch->waterLayer.size(), 0.0);
deadBelowLitterNMass.resize(patch.waterPatch->waterLayer.size(), 0.0);
fracRelWaterWP.resize(patch.waterPatch->waterLayer.size(), 0.0);
}
/////////////////////////////////////////////////////////
void VegetationPatch::deletePlantIDList()
{
presentPlants.erase(presentPlants.begin(),presentPlants.end());
}
/////////////////////////////////////////////////////////
VegetationPatch::~VegetationPatch()
{
}