Closed luchete80 closed 3 years ago
##--------------------------------------------------------------- ##Boundary conditions ##--------------------------------------------------------------- #Velocity DOFs #In this example velocities are known iu=int(0) if (form==2): iF=int(var_dim[0]*numnodes) fbc=1 else: iF=int((var_dim[0]+var_dim[1])*numnodes) fbc=2 # BEFORE ------------------------------------------- # for i in range(ney+1): # for j in range(dof): # Kglob[iu ,j ]=Kglob[j,iu]=0. # Kglob[iu ,iu ]=1. # Kglob[iu+1,iu+1]=1. # for k in range(4): # Kglob[iu,j]=Kglob[j,iu]=0. # Kglob[iF+k,iF+k]=1. # iu+=(nex+1)*var_dim[0] #Increase nx nodes # iF+=(nex+1)*var_dim[fbc] #Increase nx nodes # Rglob[iu ]=0 # Rglob[iu+1]=0 # #Fvp=I # Rglob[iF ]=Rglob[iF+3]=1. #xx,yy # Rglob[iF+1]=Rglob[iF+2]=0. #----------------------------- for n in range(numnodes): iu=ndof*n Rglob[iu ]=0 Rglob[iu+1]=0 Kglob[iu,iu]=Kglob[iu+1,iu]=Kglob[iu,iu+1]=Kglob[iu+1,iu+1]=1 # K[4,i] = K[i,4] = 0.0 # K[5,i] = K[i,5] = 0.0 # K[7,i] = K[i,7] = 0.0 print("Rglob",Rglob)
Corrected.