program p44 !------------------------------------------------------------------------------ ! program 4.4 equilibrium of rigid-jointed frames using beam/rod elements ! in 1-, 2- or 3-dimensions !------------------------------------------------------------------------------ use new_library ; use geometry_lib ; use vlib ; implicit none integer::nels,neq,nn,nband,nr,nod=2,nodof,ndof,iel,i,k,ndim,loaded_nodes, & fixed_nodes,nprops,np_types !----------------------------dynamic arrays------------------------------------ real,allocatable::km(:,:),eld(:),kv(:),loads(:),coord(:,:), & action(:),g_coord(:,:),value(:),prop(:,:),gamma(:) integer,allocatable::nf(:,:),g(:),num(:),g_num(:,:),no(:),g_g(:,:), & node(:),sense(:),etype(:) !-------------------------input and initialisation----------------------------- open (10 , file = 'p44.dat' , status = 'old' , action ='read') open (11 , file = 'p44.res' , status = 'replace', action='write') open (12 , file = 'p44.vtk' , status = 'replace', action='write') read(10,*)nels,nn,ndim,nprops,np_types !!! write out write(11,'(a,i5,a,i5, a,i5,a,i5,a,i5)') & " ",nels," ",nn," ",ndim," ",nprops," ",np_types; select case(ndim) case(1); nodof=2; case(2); nodof=3; case(3); nodof=6 case default; write(11,'(a)')"Wrong number of dimensions input" end select ndof=nod*nodof allocate(nf(nodof,nn),km(ndof,ndof),coord(nod,ndim),g_coord(ndim,nn), & eld(ndof),action(ndof),g_num(nod,nels),num(nod),g(ndof), & gamma(nels),g_g(ndof,nels),prop(nprops,np_types),etype(nels)) read(10,*)prop; etype=1; if(np_types>1)read(10,*)etype if(ndim == 3)read(10,*)gamma read(10,*)g_coord; read(10,*)g_num read(10,*)nr nf=1; if(nr>0)read(10,*)(k,nf(:,k),i=1,nr); call formnf(nf); neq=maxval(nf) !---------------loop the elements to find global array sizes------------------ nband=0 elements_1: do iel=1,nels num=g_num(:,iel); call num_to_g ( num ,nf , g ) g_g(:,iel)=g; if(nband