anchor.diff:  !
   !**********************************************************************************************************************************
   PROGRAM MAIN
  - 
  +
      USE BeamDynLSGL
      USE BeamDyn_Types
   
  
positive.code:    ! write initial condition for q1
     !CALL WrScr  ( '  '//Num2LStr(t_global)//'  '//Num2LStr( BDyn_ContinuousState%q)//'  '//Num2LStr(BDyn_ContinuousState%q))   
     
  n=2
  
  !DO j=1,1	!ADDED LOOP TO RUN THROUGH ALL LOAD STEP SCENARIOS, NJ 3/18/2014
  !	CALL StaticSolutionGL(BD_Parameter%uuN0, BD_OtherState%uuNf,&
  
negative.code:                       &BD_Parameter%elem_total, BD_Parameter%dof_total,BD_Parameter%node_total,&
                        &BD_Parameter%ngp,BD_Parameter%niter,BD_Parameter%piter) 
          
          IF (BD_Parameter%piter .LT. BD_Parameter%niter) THEN
            n=0  
            EXIT
          ELSE
              n=n+1
              WRITE(*,*) "Warning: Load may be too large, BeamDyn will attempt to solve with addition steps"
              WRITE(*,*) "n=",n
              !BD_OtherState%uuNf=0
          ENDIF!CONDITION IF NR ITERATIONS HAVE BEEN REACHED ZERO OUT uunF, NJ 3/18/2014 
  		     
          ENDDO
  	END DO
  	
  
  !IF SOUTION IS NOT YET CONVERGED TRY TAKING LOAD IN 3 STEPS
  