Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | cComponentTypeName | |||
character(len=*), | intent(in) | :: | cUniqueIDName | |||
character(len=*), | intent(in) | :: | cControlTypeName | |||
character(len=*), | intent(in) | :: | cUnits | |||
logical, | intent(in), | TARGET | :: | lEMSActuated | ||
logical, | intent(in), | TARGET | :: | lValue |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE SetupEMSLogicalActuator(cComponentTypeName, cUniqueIDName, cControlTypeName, cUnits, lEMSActuated, lValue )
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN August 2009
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! register a new actuator for EMS
! set up pointer to logical and logical value
!
! METHODOLOGY EMPLOYED:
! push size of ActuatorVariable and add a new one.
! check for duplicates.
! USE STATEMENTS:
USE DataInterfaces, ONLY: ShowSevereError, ShowContinueError
USE InputProcessor, ONLY: MakeUpperCase
USE DataPrecisionGlobals
USE DataRuntimeLanguage
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: cComponentTypeName
CHARACTER(len=*), INTENT(IN) :: cUniqueIDName
CHARACTER(len=*), INTENT(IN) :: cControlTypeName
CHARACTER(len=*), INTENT(IN) :: cUnits
LOGICAL, TARGET, INTENT(IN) :: lEMSActuated
LOGICAL, TARGET, INTENT(IN) :: lValue
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ActuatorVariableNum
LOGICAL :: FoundActuatorType
LOGICAL :: FoundDuplicate
CHARACTER(len=MaxNameLength) :: UpperCaseObjectType
CHARACTER(len=MaxNameLength) :: UpperCaseObjectName
CHARACTER(len=MaxNameLength) :: UpperCaseActuatorName
TYPE(EMSActuatorAvailableType), DIMENSION(:), ALLOCATABLE :: TempEMSActuatorAvailable
! FLOW:
FoundActuatorType = .FALSE.
FoundDuplicate = .FALSE.
UpperCaseObjectType = MakeUpperCase(cComponentTypeName)
UpperCaseObjectName = MakeUpperCase(cUniqueIDName)
UpperCaseActuatorName = MakeUpperCase(cControlTypeName)
DO ActuatorVariableNum = 1, numEMSActuatorsAvailable
IF ((EMSActuatorAvailable(ActuatorVariableNum)%ComponentTypeName == UpperCaseObjectType) &
.AND. (EMSActuatorAvailable(ActuatorVariableNum)%ControlTypeName == UpperCaseActuatorName)) THEN
FoundActuatorType = .TRUE.
IF (EMSActuatorAvailable(ActuatorVariableNum)%UniqueIDName == UpperCaseObjectName) THEN
FoundDuplicate = .TRUE.
EXIT
END IF
END IF
END DO
IF (FoundDuplicate) THEN
CALL ShowSevereError('Duplicate actuator was sent to SetupEMSLogicalActuator.')
ELSE
! Add new actuator
IF (numEMSActuatorsAvailable == 0) THEN
ALLOCATE(EMSActuatorAvailable(VarsAvailableAllocInc))
numEMSActuatorsAvailable = 1
maxEMSActuatorsAvailable = VarsAvailableAllocInc
ELSE
IF (numEMSActuatorsAvailable+1 > maxEMSActuatorsAvailable) THEN
ALLOCATE(TempEMSActuatorAvailable(maxEMSActuatorsAvailable+VarsAvailableAllocInc))
TempEMSActuatorAvailable(1:numEMSActuatorsAvailable) = EMSActuatorAvailable(1:numEMSActuatorsAvailable)
DEALLOCATE(EMSActuatorAvailable)
ALLOCATE(EMSActuatorAvailable(maxEMSActuatorsAvailable+VarsAvailableAllocInc))
EMSActuatorAvailable(1:numEMSActuatorsAvailable) = TempEMSActuatorAvailable(1:numEMSActuatorsAvailable)
DEALLOCATE(TempEMSActuatorAvailable)
maxEMSActuatorsAvailable=maxEMSActuatorsAvailable+VarsAvailableAllocInc
ENDIF
numEMSActuatorsAvailable = numEMSActuatorsAvailable + 1
END IF
ActuatorVariableNum = numEMSActuatorsAvailable
EMSActuatorAvailable(ActuatorVariableNum)%ComponentTypeName = cComponentTypeName
EMSActuatorAvailable(ActuatorVariableNum)%UniqueIDName = cUniqueIDName
EMSActuatorAvailable(ActuatorVariableNum)%ControlTypeName = cControlTypeName
EMSActuatorAvailable(ActuatorVariableNum)%Units = cUnits
EMSActuatorAvailable(ActuatorVariableNum)%Actuated => lEMSActuated ! Pointer assigment
EMSActuatorAvailable(ActuatorVariableNum)%LogValue => lValue ! Pointer assigment
EMSActuatorAvailable(ActuatorVariableNum)%PntrVarTypeUsed = PntrLogical
END IF
RETURN
END SUBROUTINE SetupEMSLogicalActuator