Closed dogukanteber closed 5 months ago
An example of a commenting structure for this method both in ParentLayer.cpp
and SnowLayer.cpp
could look something like the following. It may be wise to add the comment above the heat capacity and thermal conductivity functions respectively.
// get layer volumetric heat capacity (vhc)
// Note: though the following functions return the same value
// they require different names to work inside TempUpdator.cpp
// where these will be called by name and not by layer type.
// Hence they must match with the functions used in Layer.cpp
// and SoilLayer.cpp.
// get frozen layer volumetric heat capacity
double ParentLayer::getFrzVolHeatCapa() {
double vhc = vhcsolid ;
return vhc;
};
// get unfrozen layer volumetric heat capacity
double ParentLayer::getUnfVolHeatCapa() {
double vhc= vhcsolid ;
return vhc;
};
// get mixed (partially frozen) layer volumetric heat capacity
double ParentLayer::getMixVolHeatCapa() {
double vhc= vhcsolid ;
return vhc;
};
Here are the plots after this change:
Layer
class has the following virtual methods:The implementation of some of these methods are same in
ParentLayer.cpp
andSnowLayer.cpp
. We cannot merge the same methods in a single method. So, this PR attempts to explain why these methods have the same implementation. It also cleans up the method implementation.