Hello,
I am using the subroutine GetElementNodes( Nodes ), where Nodes is of type Nodes_t and after calling this subroutine it gets the nodes of the active element.
I suppose that there is a problem with the type Nodes_t or with the subroutine GetElementNodes because the attribute NumberOfNodes is zero while the attributes X and Y are different, they have the values of the global coordinates of the nodes.
I am using element 404, i.e. it has 4 nodes,
The following code
CALL GetElementNodes( Nodes )
PRINT *,"NumberOfNodes: ", Nodes % NumberOfNodes, Nodes % X(1),Nodes % X(2),Nodes % X(3),Nodes % X(4)
PRINT *,"NumberOfNodes: ", Nodes % NumberOfNodes, Nodes % Y(1),Nodes % Y(2),Nodes % Y(3),Nodes % Y(4)
PRINT *,"NumberOfNodes: ", Nodes % NumberOfNodes, Nodes % Z(1),Nodes % Z(2),Nodes % Z(3),Nodes % Z(4)
prints:
NumberOfNodes: 0 0.25000000000000000 0.50000000000000000 0.50000000000000000 0.25000000000000000
NumberOfNodes: 0 0.0000000000000000 0.0000000000000000 0.25000000000000000 0.25000000000000000
NumberOfNodes: 0 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
Can someone tell me is it normal to have Nodes % NumberOfNodes equal to zero, or there is some problem?
Regards,
Stan
NumberOfNodes
-
- Site Admin
- Posts: 4826
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: NumberOfNodes
Hi
I would not worry. Of course this is not consistant from the code. The "official" way to get the info would be:
In case you're using something else than the basic nodal elements your dofs may not always be the same as your nodes. Then you might use
-Peter
I would not worry. Of course this is not consistant from the code. The "official" way to get the info would be:
Code: Select all
!> Return the number of nodes in the active element
FUNCTION GetElementNOFNodes( Element ) RESULT(n)
In case you're using something else than the basic nodal elements your dofs may not always be the same as your nodes. Then you might use
Code: Select all
!> Return the number of element degrees of freedom
FUNCTION GetElementNOFDOFs( UElement,USolver ) RESULT(n)
Re: NumberOfNodes
Thank you Peter,
both functions, GetElementNOFNodes and GetElementNOFDOFs, work well. I will use them instead of Nodes % NumberOfNodes.
Regards,
Stan
both functions, GetElementNOFNodes and GetElementNOFDOFs, work well. I will use them instead of Nodes % NumberOfNodes.
Regards,
Stan