FEVariable example 22a
!!! note "" This example tests subtraction operator. Vector, Nodal
Use association
- [[FEVariable_]]
Usage
!!! note "Import modules and declare variable"
PROGRAM main
USE easifemBase
IMPLICIT NONE
TYPE(FEVariable_) :: obj
!!! note "constant - constant"
obj = NodalVariable( arange(1.0_DFP, 3.0_DFP), &
& typeFEVariableVector, &
& typeFEVariableConstant ) &
- NodalVariable( arange(1.0_DFP, 3.0_DFP), &
& typeFEVariableVector, &
& typeFEVariableConstant )
CALL Display(obj, "constant-constant")
obj = NodalVariable( arange(1.0_DFP, 3.0_DFP), &
& typeFEVariableVector, &
& typeFEVariableConstant ) &
- 1.0_DFP
CALL Display(obj, "constant-constant")
!!! note "space-constant"
call display("=================================")
obj = NodalVariable( reshape(arange(1.0_DFP, 6.0_DFP), [3,2]), &
& typeFEVariableVector, &
& typeFEVariableSpace ) &
- NodalVariable( arange(1.0_DFP, 3.0_DFP), &
& typeFEVariableVector, &
& typeFEVariableConstant )
CALL Display(obj, "space-constant")
call display("=================================")
obj = NodalVariable( reshape(arange(1.0_DFP, 6.0_DFP), [3,2]), &
& typeFEVariableVector, &
& typeFEVariableSpace ) &
- 1.0_DFP
CALL Display(obj, "space-constant")
!!! note "time-constant"
call display("=================================")
obj = NodalVariable( reshape(arange(1.0_DFP, 6.0_DFP), [3,2]), &
& typeFEVariableVector, &
& typeFEVariableTime ) &
- NodalVariable( arange(1.0_DFP, 3.0_DFP), &
& typeFEVariableVector, &
& typeFEVariableConstant )
CALL Display(obj, "time-constant")
call display("=================================")
obj = NodalVariable( reshape(arange(1.0_DFP, 6.0_DFP), [3,2]), &
& typeFEVariableVector, &
& typeFEVariableTime ) &
- 1.0_DFP
CALL Display(obj, "time-constant")
!!! note "spacetime-constant"
call display("=================================")
obj = NodalVariable( reshape(arange(1.0_DFP, 12.0_DFP), [3,2,2]), &
& typeFEVariableVector, &
& typeFEVariableSpaceTime ) &
- NodalVariable( arange(1.0_DFP, 3.0_DFP), &
& typeFEVariableVector, &
& typeFEVariableConstant )
CALL Display(obj, "spacetime-constant")
call display("=================================")
obj = NodalVariable( reshape(arange(1.0_DFP, 12.0_DFP), [3,2,2]), &
& typeFEVariableVector, &
& typeFEVariableSpaceTime ) &
- 1.0_DFP
CALL Display(obj, "spacetime-constant")
END PROGRAM main