FEAP User Forum
FEAP => FEAPpv => Topic started by: casebolt on May 15, 2024, 10:18:27 AM
-
Hello,
I am looking to build a user element that requires information outside of the local ix and xl terms.
To accomplish this I will be constructing a subroutine within the user element *.f file to be utilized instead of the shp2D, to keep the base program structure intact.
However, the new shape functions require information pertaining to the spacial coordinates of nodes outside of the element being evaluated.
How should/could I go about recalling the full list of nodal coordinates and addresses within a user element?
I am currently running FEAPpv 5.1.2
-
The coordinates are stored in hr(np(43)). The array is of size NDM * NUMNP. hr( ) is accessible via including comblk.h. The data is stored
by node, so, x_1, y_1, z_1, x_2, y_2, z_2, etc. (assuming NDM = 3). If NDM = 2, then it is just x_1, y_1, x_2, y_2, etc.
If you edit comblk.h and give the arrays mr and hr the target attribute, so real*8, target :: hr
integer, target :: mr
common /comblk/ hr(1024),mr(1024)
etc. then you can more easily deal with the striding of the array. If you do this make sure to fully re-build the entire code. Then in your routine, you can declare
real (kind=8), pointer :: X(:,:)
X(1:ndm,1:numnp) => hr(np(43):np(43)+ndm*numnp-1)
ndm and numnp are gotten by including sdata.h and cdata.h.