tNodes
This method returns the total number of nodes in DOF object.
This method is also avaiable as the generic method called SIZE
Calling examples:
Use .tNodes.
operator to get the total number of nodes for DOF_
.
ans=.tNodes. obj
This returns the size of DOF_
object. If you want to get the total nodes in a given degree of freedom then we can use the following.
ans=obj .tNodes. idof
If you want the size of several degrees of freedom then use
ans=obj .tNodes. [idof1, idof2, idof3]
If you want to know the size of a physical variable, then use the name of physical variable
ans= obj .tNodes. "U"
Interface 1
INTERFACE
MODULE PURE FUNCTION dof_tNodes1(obj) RESULT(ans)
CLASS(DOF_), INTENT(IN) :: obj
INTEGER(I4B) :: ans
END FUNCTION dof_tNodes1
END INTERFACE
This method is also avaiable as the generic method called SIZE
Interface 2
INTERFACE
MODULE PURE FUNCTION dof_tNodes2(obj, idof) RESULT(ans)
CLASS(DOF_), INTENT(IN) :: obj
INTEGER(I4B), INTENT(IN) :: idof
INTEGER(I4B) :: ans
END FUNCTION dof_tNodes2
END INTERFACE
- This function returns the total number of nodes for a given degree of freedom number
idof
idof
should be lesser than the total degree of freedom.
This method is also avaiable as the generic method called SIZE
Interface 3
INTERFACE
MODULE PURE FUNCTION dof_tNodes3(obj, varname) RESULT(ans)
CLASS(DOF_), INTENT(IN) :: obj
CHARACTER(*), INTENT(IN) :: varname
INTEGER(I4B) :: ans
END FUNCTION dof_tNodes3
END INTERFACE
- This function returns the total number of nodes for a physical variable.
- The physical variable is given by its name.
This method is also avaiable as the generic method called SIZE
Interface 4
INTERFACE
MODULE PURE FUNCTION dof_tNodes4(obj, idof) RESULT(ans)
CLASS(DOF_), INTENT(IN) :: obj
INTEGER(I4B), INTENT(IN) :: idof(:)
INTEGER(I4B) :: ans
END FUNCTION dof_tNodes4
END INTERFACE
- This function returns the total number of nodes in multiple degrees of freedom number.
- All degrees of freedom specified in idof should be lesser than the total degree of freedom.
This method is also avaiable as the generic method called SIZE
Examples
This example shows the usage of .tNodes.
to get total number of nodes of degree of freedom.
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( (.tNodes. obj) .EQ. 30, '.tNodes. obj [30] : ' )
CALL OK( (obj .tNodes. 1) .EQ. 10, 'obj .tNodes. 1: ' )
CALL OK( (obj .tNodes. 2) .EQ. 10, 'obj .tNodes. 2: ' )
CALL OK( (obj .tNodes. 3) .EQ. 10, 'obj .tNodes. 3: ' )
CALL OK( (obj .tNodes. [1,2,3]) .EQ. 30, 'obj .tNodes. [1,2,3]: ' )
CALL Deallocate( obj )
END PROGRAM main