
#--------------------#
   source S12M6&12SC.tcl
#--------------------#

#################
# DISPLAY MODEL #
#################

set scale 35
recorder display DispShape 450 0 500 400 -wipe
vup 0 1 0 # dirn defining up direction of view plane
vpn 0 0 1 # direction of outward normal to view plane
prp 2 1.50 10 # eye location in local coord sys defined by viewing system
display 1 -5 1
viewWindow -$scale $scale -$scale  $scale ;#scale view for Structure


##################

# MODAL ANALYSIS #
##################

eigen 4;
for {set i 0} {$i < 4} {incr i} {
	puts "[expr 2*3.1416/(pow([lindex [eigen 4] $i],0.5))]";
}

##################
# GRAVITY SOLVER #
##################


constraints Plain;
numberer RCM;
system BandGeneral;
test NormDispIncr 1.e-8 8 2;
algorithm Newton; 
integrator LoadControl 0.1;
analysis Static;
analyze 10;
loadConst -time 0.0;


####################
# Define Recorders #
####################

file mkdir Data;
file mkdir Data/Nodes;
file mkdir Data/Springs;


# Define a list of Nodes
    set NodeList  { 202065 203065 204065 205065 206065 207065 208065 209065 210065 211065 212065 213065}

# Define a list of Column Sprigs
    set ColumnSprigsListAll { {	5001011	5001021	5001031	5001041	5001051	5001061	}
                              {	5001012	5001022	5001032	5001042	5001052	5001062	}
                              {	5002011	5002021	5002031	5002041	5002051	5002061	}
                              {	5002012	5002022	5002032	5002042	5002052	5002062	}
                              {	5003011	5003021	5003031	5003041	5003051	5003061	}
                              {	5003012	5003022	5003032	5003042	5003052	5003062	}
                              {	5004011	5004021	5004031	5004041	5004051	5004061	}
                              {	5004012	5004022	5004032	5004042	5004052	5004062	}
                              {	5005011	5005021	5005031	5005041	5005051	5005061	}
                              {	5005012	5005022	5005032	5005042	5005052	5005062	}
                              {	5006011	5006021	5006031	5006041	5006051	5006061	}
                              {	5006012	5006022	5006032	5006042	5006052	5006062	}
                              {	5007011	5007021	5007031	5007041	5007051	5007061	}
                              {	5007012	5007022	5007032	5007042	5007052	5007062	}
                              {	5008011	5008021	5008031	5008041	5008051	5008061	}
                              {	5008012	5008022	5008032	5008042	5008052	5008062	}
                              {	5009011	5009021	5009031	5009041	5009051	5009061	}
                              {	5009012	5009022	5009032	5009042	5009052	5009062	}
                              {	5010011	5010021	5010031	5010041	5010051	5010061	}
                              {	5010012	5010022	5010032	5010042	5010052	5010062	}
                              {	5011011	5011021	5011031	5011041	5011051	5011061	}
                              {	5011012	5011022	5011032	5011042	5011052	5011062	}
                              {	5012011	5012021	5012031	5012041	5012051	5012061	}
                              {	5012012	5012022	5012032	5012042	5012052	5012062	}
                                                                                                              }

# Define a list of Beam Sprigs
    set BeamSprigsListAll   { {	4002011	4002012	4002021	4002022	4002031	4002032	4002041	4002042	4002051	4002052	}
                              {	4003011	4003012	4003021	4003022	4003031	4003032	4003041	4003042	4003051	4003052	}
                              {	4004011	4004012	4004021	4004022	4004031	4004032	4004041	4004042	4004051	4004052	}
                              {	4005011	4005012	4005021	4005022	4005031	4005032	4005041	4005042	4005051	4005052	}
                              {	4006011	4006012	4006021	4006022	4006031	4006032	4006041	4006042	4006051	4006052	}
                              {	4007011	4007012	4007021	4007022	4007031	4007032	4007041	4007042	4007051	4007052	}
                              {	4008011	4008012	4008021	4008022	4008031	4008032	4008041	4008042	4008051	4008052	}
                              {	4009011	4009012	4009021	4009022	4009031	4009032	4009041	4009042	4009051	4009052	}
                              {	4010011	4010012	4010021	4010022	4010031	4010032	4010041	4010042	4010051	4010052	}
                              {	4011011	4011012	4011021	4011022	4011031	4011032	4011041	4011042	4011051	4011052	}
                              {	4012011	4012012	4012021	4012022	4012031	4012032	4012041	4012042	4012051	4012052	}
                              {	4013011	4013012	4013021	4013022	4013031	4013032	4013041	4013042	4013051	4013052	}
                                                                                                                                                              }


 foreach NodeListNUM $NodeList {
   recorder Node     -file Data/Nodes/$NodeListNUM._NodeDispl.out -time -node $NodeListNUM -dof 1 2 3 disp;
  }

 foreach ColumnSprigsList $ColumnSprigsListAll {
  foreach ColumnSprigsNUM $ColumnSprigsList {
   recorder Element  -file Data/Springs/$ColumnSprigsNUM._MomRot.out -ele $ColumnSprigsNUM defoANDforce;
  }
 }

 foreach BeamSprigsList $BeamSprigsListAll {
  foreach BeamSprigsNUM $BeamSprigsList {
   recorder Element  -file Data/Springs/$BeamSprigsNUM._MomRot.out -ele $BeamSprigsNUM defoANDforce;
  }
 }


## To Get The Mode Shape: Uncomment The Code Below And Set Nsteps01=1

#  file mkdir Data/ModeShapes;
#  set numModes 4
#  for { set MN 1 } { $MN <= $numModes } { incr MN } {
#    recorder Node -file Data/ModeShapes/ModeShape_$MN.out -time -node 202065 203065 204065 205065 206065 207065 208065 209065 210065 211065 212065 213065 -dof 1 "eigen $MN"
#       }


###################
# Pushover Loads #
###################

# 2 Types of Lateral Loading Are Defined; Comment and Uncomment Which You Want To Use)

pattern Plain 2 Linear {

#Loads Based on Wihi (ASCE7-16 Eq 12.8-12)
   #         node         FX        FY    MZ
#   load 	202015	0.0013	0	0
#   load 	203015	0.0049	0	0
#   load 	204015	0.0111	0	0
#   load 	205015	0.0196	0	0
#   load 	206015	0.0304	0	0
#   load 	207015	0.0874	0	0
#   load 	208015	0.0593	0	0
#   load 	209015	0.0773	0	0
#   load 	210015	0.0976	0	0
#   load 	211015	0.1203	0	0
#   load 	212015	0.1454	0	0
#   load 	213015	0.3455	0	0

#Loads Based on Mode Shape 1
   #         node         FX        FY    MZ
   load 	202015	0.009104038	0	0
   load 	203015	0.022646638	0	0
   load 	204015	0.036512873	0	0
   load 	205015	0.051241518	0	0
   load 	206015	0.065423462	0	0
   load 	207015	0.07878128	0	0
   load 	208015	0.092686625	0	0
   load 	209015	0.105635156	0	0
   load 	210015	0.118691917	0	0
   load 	211015	0.130063088	0	0
   load 	212015	0.140855303	0	0
   load 	213015	0.148358102	0	0

 }


########################################

# Pushover Solver (Cyclic & Monotonic) #
########################################

## For Monotonic Pushover Set Nsteps01 and Set The Other Nsteps=0
## For Cyclic Pushover Set As Many Nsteps As You Want; Odd Nsteps Are For +x Displacement & Even Nsteps Are For -x Displacement

set PushInc 0.0005
set ControlNode 213065

set 	Nsteps01	1632
set 	Nsteps02	0
set 	Nsteps03	0
set 	Nsteps04	0
set 	Nsteps05	0
set 	Nsteps06	0
set 	Nsteps07	0
set 	Nsteps08	0
set 	Nsteps09	0
set 	Nsteps10	0
set 	Nsteps11	0
set 	Nsteps12	0
set 	Nsteps13	0
set 	Nsteps14	0
set 	Nsteps15	0
set 	Nsteps16	0
set 	Nsteps17	0
set 	Nsteps18	0
set 	Nsteps19	0
set 	Nsteps20	0
set 	Nsteps21	0
set 	Nsteps22	0
set 	Nsteps23	0
set 	Nsteps24	0
set 	Nsteps25	0



constraints Transformation;		
numberer RCM;
system BandGeneral;     
test NormDispIncr 1.e-8 200 2;
set algorithmTypeStatic KrylovNewton;
algorithm $algorithmTypeStatic; 
integrator DisplacementControl  $ControlNode  1 $PushInc;
analysis Static;

set Nsteps $Nsteps01;

# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
### -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps02;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps03;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps04;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps05;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------
integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps06;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps07;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps08;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps09;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------
integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps10;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps11;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps12;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps13;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------
integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps14;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps15;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps16;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps17;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------
integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps18;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps19;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps20;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps21;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps22;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps23;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------
integrator DisplacementControl  $ControlNode  1 -$PushInc;
set Nsteps $Nsteps24;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------

integrator DisplacementControl  $ControlNode  1 $PushInc;
set Nsteps $Nsteps25;
# -----------------------------------------------------------------------------------
for {set step 1} {$step <= $Nsteps} {incr step} {
	set ok [analyze 1];
# ------------------------------------if convergence failure-------------------------
	if {$ok != 0} {
		puts "\nTrying Newton with Initial Tangent...\n"
		test NormDispIncr 1.e-8 2000 2;
		algorithm Newton -initial;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying Broyden...\n"
		algorithm Broyden 8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying NewtonWithLineSearch...\n"
		algorithm NewtonLineSearch 0.8;
		set ok [analyze 1];
	}
	if {$ok != 0} {
		puts "\nTrying ModifiedNewton...\n"
		algorithm ModifiedNewton;
		set ok [analyze 1];
	}
	test NormDispIncr 1.e-8 200 2;
	algorithm $algorithmTypeStatic;
};
# -----------------------------------------------------------------------------------------------------
