FEVariable example 64
!!! note ""
This example tests ABS
operator. Vector, Quadrature
Use association
- [[FEVariable_]]
Usage
!!! note "Import modules and declare variable"
PROGRAM main
USE easifemBase
IMPLICIT NONE
TYPE(FEVariable_) :: obj
TYPE(FEVariable_) :: ans
!!! note "constant"
obj = ABS(QuadratureVariable( &
& -arange(1.0_DFP, 3.0_DFP), &
& typeFEVariableVector, &
& typeFEVariableConstant ))
ans = QuadratureVariable( &
& arange(1.0_DFP, 3.0_DFP), &
& typeFEVariableVector, &
& typeFEVariableConstant )
CALL OK( obj .EQ. ans, "constant:" )
!!! note "space"
obj = ABS(QuadratureVariable( &
& reshape(-arange(1.0_DFP, 6.0_DFP), [3,2]), &
& typeFEVariableVector, &
& typeFEVariableSpace ))
ans = QuadratureVariable( &
& reshape(arange(1.0_DFP, 6.0_DFP), [3,2]), &
& typeFEVariableVector, &
& typeFEVariableSpace )
CALL OK( obj .EQ. ans, "space:" )
!!! note "time"
obj = ABS(QuadratureVariable( &
& reshape(-arange(1.0_DFP, 6.0_DFP), [3,2]), &
& typeFEVariableVector, &
& typeFEVariableTime ))
ans = QuadratureVariable( &
& reshape(arange(1.0_DFP, 6.0_DFP), [3,2]), &
& typeFEVariableVector, &
& typeFEVariableTime )
CALL OK( obj .EQ. ans, "time:" )
!!! note "spacetime"
obj = ABS(QuadratureVariable( &
& reshape(-arange(1.0_DFP, 12.0_DFP), [3,2,2]), &
& typeFEVariableVector, &
& typeFEVariableSpaceTime ))
ans = QuadratureVariable( &
& reshape(arange(1.0_DFP, 12.0_DFP), [3,2,2]), &
& typeFEVariableVector, &
& typeFEVariableSpaceTime )
CALL OK( obj .EQ. ans, "spacetime:" )
END PROGRAM main