Skip to main content

tDOF

This method returns total degrees of freedom.

This operator returns the total number of degrees of freedom in a physical variable.

Calling example:

Getting total degrees of freedom in DOF_

ans= .tdof. obj

Getting total degrees of freedom of a physical name

ans= obj .tdof. "U"

Getting the total number of degrees of freedom of a physical variable by number.

ans= obj .tdof. 1

Interface 1

INTERFACE
MODULE PURE FUNCTION dof_tdof1(obj) RESULT(ans)
CLASS(DOF_), INTENT(IN) :: obj
INTEGER(I4B) :: ans
END FUNCTION dof_tdof1
END INTERFACE

This method returns the total number of degrees of freedom.

Interface 2

 INTERFACE
MODULE PURE FUNCTION dof_tdof2(obj, Name) RESULT(ans)
CLASS(DOF_), INTENT(IN) :: obj
CHARACTER(1), INTENT(IN) :: Name
INTEGER(I4B) :: ans
END FUNCTION dof_tdof2
END INTERFACE

This function returns the total number of degrees of freedom in a physical variable. The physical variable is specified by using its name.

Interface 3

INTERFACE
MODULE PURE FUNCTION dof_tdof3(obj, ivar) RESULT(ans)
CLASS(DOF_), INTENT(IN) :: obj
INTEGER(I4B), INTENT(IN) :: ivar
INTEGER(I4B) :: ans
END FUNCTION dof_tdof3
END INTERFACE

This function returns the total number of degrees of freedom in a physical variable. The physical variable is specified by using its number.

Examples

This example shows the usage of .tDOF. operator.

PROGRAM main
USE easifemBase
IMPLICIT NONE
TYPE( DOF_ ) :: obj
CALL Initiate( obj, tNodes=[10], names=["U"], spaceCompo=[3], &
& timeCompo=[1], storageFMT = FMT_DOF )
CALL OK( (.tDOF. obj) .eq. 3, '.tDOF. obj: ' )
CALL OK( (obj .tDOF. 1) .eq. 3, 'obj .tDOF. 1: ' )
CALL OK( (obj .tDOF. 'U') .eq. 3, 'obj .tDOF. "U": ' )
CALL Deallocate( obj )
END PROGRAM main