Civil Engineering Reference
In-Depth Information
IF (NCode(Ldest(nel,nd)) == 0) THEN
Elres_u(nel,nd) = Elres_u(nel,nd) + u1(Ldest(nel,nd))
ELSE
Elres_t(nel,nd) = Elres_t(nel,nd) + u1(Ldest(nel,nd))
END IF
END IF
END DO &
D_o_F1
Elres_u(nel,:)= Elres_u(nel,:) * Scad
Elres_t(nel,:)= Elres_t(nel,:) / Scat
WRITE(2,'(24F12.5)') (Elres_u(nel,m), m=1,Ndofe)
WRITE(2,'(24F12.5)') (Elres_t(nel,m), m=1,Ndofe)
END DO &
Elements_2
END PROGRAM
To make the program more readable and easier to modify, the reading of the input
has been delegated to subroutines. This also gives the reader some freedom to determine
the input FORMAT and implement simple mesh-generation facilities.
SUBROUTINE Jobin(Title,Cdim,Ndof,Toa,Nreg,Ltyp,Con,E,ny &
,Isym,nodel,nodes,maxe)
!------------------------------------------------
! Subroutine to read in basic job information
!------------------------------------------------
CHARACTER(LEN=80), INTENT(OUT):: Title
INTEGER, INTENT(OUT) :: Cdim,Ndof,Toa,Nreg,Ltyp,Isym,nodel
INTEGER, INTENT(OUT) :: Nodes,Maxe
REAL, INTENT(OUT) :: Con,E,ny
READ (1,'(A80)') Title
WRITE( 2,*)'Project:',Title
READ (1,*) Cdim
WRITE (2,*)'Cartesian_dimension:',Cdim
READ (1,*) Ndof ! Degrees of freedom per node
IF (NDof == 1) THEN
WRITE (2,*)'Potential Problem'
ELSE
WRITE (2,*)'Elasticity Problem'
END IF
IF (Ndof == 2)THEN
READ (1,*) Toa ! Analysis type (plane strain= 1,plane stress= 2)
IF (Toa == 1) THEN
WRITE (2,*)'Type of Analysis: Solid Plane Strain'
ELSE
WRITE (2,*)'Type of Analysis: Solid Plane Stress'
END IF
END IF
READ( 1,*) Nreg ! Type of region
IF (NReg == 1) THEN
WRITE (2,*)'Finite Region'
 
Search WWH ::




Custom Search