GCBM
Public Member Functions | Private Attributes | List of all members
CBMBuildLandUnitModule Class Reference

#include <cbmbuildlandunitmodule.h>

Inheritance diagram for CBMBuildLandUnitModule:
Inheritance graph
Collaboration diagram for CBMBuildLandUnitModule:
Collaboration graph

Public Member Functions

 CBMBuildLandUnitModule ()
 
virtual ~CBMBuildLandUnitModule ()
 
void configure (const DynamicObject &config) override
 
void subscribe (NotificationCenter &notificationCenter) override
 
void doLocalDomainInit () override
 
void doPreTimingSequence () override
 
- Public Member Functions inherited from CBMModuleBase
virtual ~CBMModuleBase ()=default
 
void onSystemInit () override
 
void onSystemShutdown () override
 
void onLocalDomainInit () override
 
void onLocalDomainShutdown () override
 
void onLocalDomainProcessingUnitInit () override
 
void onLocalDomainProcessingUnitShutdown () override
 
void onPreTimingSequence () override
 
void onTimingInit () override
 
void onTimingPrePostInit () override
 
void onTimingPostInit () override
 
void onTimingPostInit2 () override
 
void onTimingShutdown () override
 
void onTimingStep () override
 
void onTimingPreEndStep () override
 
void onTimingEndStep () override
 
void onTimingPostStep () override
 
void onOutputStep () override
 
void onPrePostDisturbanceEvent () override
 
void onPostDisturbanceEvent () override
 
void onPostDisturbanceEvent2 () override
 
void onError (std::string msg) override
 
void onDisturbanceEvent (DynamicVar e) override
 
void onPostNotification (short preMessageSignal) override
 
virtual void doSystemInit ()
 
virtual void doSystemShutdown ()
 
virtual void doLocalDomainShutdown ()
 
virtual void doLocalDomainProcessingUnitInit ()
 
virtual void doLocalDomainProcessingUnitShutdown ()
 
virtual void doTimingInit ()
 
virtual void doTimingPrePostInit ()
 
virtual void doTimingPostInit ()
 
virtual void doTimingPostInit2 ()
 
virtual void doTimingShutdown ()
 
virtual void doTimingStep ()
 
virtual void doTimingPreEndStep ()
 
virtual void doTimingEndStep ()
 
virtual void doTimingPostStep ()
 
virtual void doOutputStep ()
 
virtual void doError (std::string msg)
 
virtual void doDisturbanceEvent (DynamicVar)
 
virtual void doPrePostDisturbanceEvent ()
 
virtual void doPostDisturbanceEvent ()
 
virtual void doPostDisturbanceEvent2 ()
 
virtual void doPostNotification (short preMessageSignal)
 

Private Attributes

std::vector< std::string > _maskVarNames
 
std::vector< const flint::IVariable * > _maskVars
 
const flint::IVariable * _initialAge
 
const flint::IVariable * _initialCSet
 
const flint::IVariable * _initialHistoricLandClass
 
const flint::IVariable * _initialCurrentLandClass
 
flint::IVariable * _age
 
flint::IVariable * _buildWorked
 
flint::IVariable * _cset
 
flint::IVariable * _historicLandClass
 
flint::IVariable * _currentLandClass
 
flint::IVariable * _isForest
 

Constructor & Destructor Documentation

◆ CBMBuildLandUnitModule()

◆ ~CBMBuildLandUnitModule()

virtual ~CBMBuildLandUnitModule ( )
virtual

Member Function Documentation

◆ configure()

void configure ( const DynamicObject &  config)
override

Configuration function

Add all mask variables to CBMBuildLandUnitModule._maskVarNames if parameter config has variable "mask_vars"

Parameters
configDynamicObject&
Returns
void

◆ doLocalDomainInit()

void doLocalDomainInit ( )
overridevirtual

Initialise CBMBuildLandUnitModule._initialAge, CBMBuildLandUnitModule._age, CBMBuildLandUnitModule._buildWorked, CBMBuildLandUnitModule._initialCSet,
CBMBuildLandUnitModule._cset, CBMBuildLandUnitModule._intialHistoricLandClass, CBMBuildLandUnitModule._initialCurrentLandClass, _historicLandClass
_currentLandClass and _isForest from _landUnitData
Add CBMBuildLandUnitModule._initialCSet for the non-peatland run and all mask variables to CBMBuildLandUnitModule._maskVars

Returns
void

Reimplemented from CBMModuleBase.

◆ doPreTimingSequence()

void doPreTimingSequence ( )
overridevirtual

If CBMBuildLandUnitModule._initialCSet is empty, _landUnitData has the variable "peatland_class" and it is empty,
assign a false boolean value to CBMBuildLandUnitModule._buildWorked and return
Else assign CBMBuildLandUnitModule._cset the value of CBMBuildLandUnitModule._initialCSet
If the value of each mask variable in CBMBuildLandUnitModule._maskVars is empty, assign a false boolean
value to CBMBuildLandUnitModule._buildWorked and return

Assign CBMBuildLandUnitModule._historicLandClass the value of CBMBuildLandUnitModule._initialHistoricLandClass
CBMBuildLandUnitModule._currentLandClass the value of CBMBuildLandUnitModule._initialCurrentLandClass if it is not empty,
else to CBMBuildLandUnitModule._historicLandClass

If the value of CBMBuildLandUnitModule._intialAge is empty, assign the number 0 to CBMBuildLandUnitModule._age
Assign a true boolean value to CBMBuildLandUnitModule._isForest and to CBMBuildLandUnitModule._buildWorked

Returns
void

Reimplemented from CBMModuleBase.

◆ subscribe()

void subscribe ( NotificationCenter &  notificationCenter)
override

Subscribe the signal LocalDomainInit and PreTimingSequence.

Parameters
notificationCenterNotificationCenter&
Returns
void

Member Data Documentation

◆ _age

flint::IVariable* _age
private

◆ _buildWorked

flint::IVariable* _buildWorked
private

◆ _cset

flint::IVariable* _cset
private

◆ _currentLandClass

flint::IVariable* _currentLandClass
private

◆ _historicLandClass

flint::IVariable* _historicLandClass
private

◆ _initialAge

const flint::IVariable* _initialAge
private

◆ _initialCSet

const flint::IVariable* _initialCSet
private

◆ _initialCurrentLandClass

const flint::IVariable* _initialCurrentLandClass
private

◆ _initialHistoricLandClass

const flint::IVariable* _initialHistoricLandClass
private

◆ _isForest

flint::IVariable* _isForest
private

◆ _maskVarNames

std::vector<std::string> _maskVarNames
private

◆ _maskVars

std::vector<const flint::IVariable*> _maskVars
private

The documentation for this class was generated from the following files: