FEVariable example 66
!!! note ""
This example tests ABS
operator. Matrix, 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( &
& reshape(-arange(1.0_DFP, 6.0_DFP), [3,2]), &
& typeFEVariableMatrix, &
& typeFEVariableConstant ))
ans = QuadratureVariable( &
& reshape(arange(1.0_DFP, 6.0_DFP), [3,2]), &
& typeFEVariableMatrix, &
& typeFEVariableConstant )
CALL OK( obj .eq. ans, 'constant' )
!!! note "space"
obj = ABS(Quadraturevariable( &
& reshape(-arange(1.0_dfp, 12.0_dfp), [3,2,2]), &
& typefevariablematrix, &
& typefevariablespace ))
ans = Quadraturevariable( &
& reshape(arange(1.0_dfp, 12.0_dfp), [3,2,2]), &
& typefevariablematrix, &
& typefevariablespace )
CALL OK( obj .eq. ans, 'space')
!!! note "time"
obj = ABS(Quadraturevariable( &
& reshape(-arange(1.0_dfp, 12.0_dfp), [3,2,2]), &
& typefevariablematrix, &
& typefevariabletime ))
ans = Quadraturevariable( &
& reshape(arange(1.0_dfp, 12.0_dfp), [3,2,2]), &
& typefevariablematrix, &
& typefevariabletime )
CALL OK( obj .eq. ans, 'time')
!!! note "spacetime"
obj = ABS(QuadratureVariable( &
& reshape(-arange(1.0_DFP, 24.0_DFP), [3,2,2,2]), &
& typeFEVariableMatrix, &
& typeFEVariableSpaceTime ))
ans = QuadratureVariable( &
& reshape(arange(1.0_DFP, 24.0_DFP) , [3,2,2,2]), &
& typeFEVariableMatrix, &
& typeFEVariableSpaceTime )
CALL OK( obj .eq. ans, 'spacetime')
END PROGRAM main