Civil Engineering Reference
In-Depth Information
END DO
ALLOCATE (inci(lnodes),cor(Cdim,lnodes))
CALL Gauss_coor(Gcor,Wi,Intord)! Gauss coordinates and weigths
Area= 0.0 ! Start sum for area/length
Element_loop: &
DO nelem=1,noelem
inci= inciG(:,nelem)! Store incidences locally
cor= corG(:,inci)! gather element coordinates
SELECT CASE (ldim)
CASE (1)! One-dim. problem determine length
Gauss_loop: &
DO I=1,INTORD
xsi= Gcor(i)
CALL Normal_Jac(v3,Jac,xsi,eta,ldim,lnodes,inci,cor)
Area= Area + Jac*Wi(i)
END DO &
Gauss_loop
CASE (2)! Two-dim. problem determine area
Gauss_loop1: &
DO I=1,INTORD
DO j=1,INTORD
xsi= Gcor(i)
eta= Gcor(j)
CALL Normal_Jac(v3,Jac,xsi,eta,ldim,lnodes,inci,cor)
Area= Area + Jac*Wi(i)*Wi(j)
END DO
END DO &
Gauss_loop1
CASE DEFAULT
END SELECT
END DO &
Element_loop
IF (ldim == 1) THEN
WRITE(11,*) ' Length =',Area
ELSE
WRITE(11,*) ' Area =',Area
END IF
END PROGRAM Compute_Area
We define allocable arrays for storing the incidences of all elements, the incidences
of one element, the coordinates of all node points, the coordinates of all nodes of one
element and the vector normal to the surface. The dimensions of these arrays depend on
the element dimension (one-dimensional, two-dimensional), the number of element
nodes (linear/parabolic shape function) and the number of elements and nodes. The
dimension of these arrays will be allocated once this information is known.
The first executable statements read the information necessary to allocate the
dynamic arrays and the integration order to be used for the example. Here we use two
files INPUT.DAT and OUTPUT.DAT for input and output. The input file has to be
created by the user before the program can be run. The FORMAT of inputting data is
 
Search WWH ::




Custom Search