from __future__ import absolute_import
__author__ = 'marafi'


def SolutionAlgorithim(OData, Dt, Tol, Steps):
    #Insert within the While loop, make sure parameter "ok" is defined
    import OpenSeesAPI
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Lower Dt: %f and Tol: %f ... "'%(Dt,Tol)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch(Tolerance=0.8))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze %d %f ]'%(Steps,Dt)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton with Initial Tangent ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.Newton(Initial=True))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze %d %f ]'%(Steps,Dt)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Broyden ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.Broyden(8))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze %d %f ]'%(Steps,Dt)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying KrylovNewton ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.KrylovNewton())
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze %d %f ]'%(Steps,Dt)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

def SolutionAlgorithimV2(OData, Dt, Tol, Steps):
    #Insert within the While loop, make sure parameter "ok" is defined
    import OpenSeesAPI
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Lower Dt: %f and Tol: %f ... "'%(Dt,Tol)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Krylov... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.KrylovNewton(MaxDim = 6))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze %d %f ]'%(Steps,Dt)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying NewtonLineSearch... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch(Tolerance=0.8))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze %d %f ]'%(Steps,Dt)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying NewtonLineSearch Bisection... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('Bisection'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze %d %f ]'%(Steps,Dt)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying NewtonLineSearch Secant... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('Secant'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze %d %f ]'%(Steps,Dt)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying NewtonLineSearch RegulaFalsi... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('RegulaFalsi'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze %d %f ]'%(Steps,Dt)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

def SolutionAlgorithimKrylovOnly(OData, Dt, Tol, Steps, MaxDim = 6):
    #Insert within the While loop, make sure parameter "ok" is defined
    import OpenSeesAPI
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Lower Dt: %e and Tol: %e ... "'%(Dt,Tol)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Krylov... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol, 1000, 2))
    # OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.KrylovNewton(MaxDim = MaxDim))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze %d %e ]'%(Steps,Dt)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

def SenSolutionAlgorithim(OData, Dt, Steps, Tol = 1e-12, KrylovMaxDim = 12, MinDt = 1e-12, NoOfIterations=3000):
    import OpenSeesAPI
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set conv_tol %e'%Tol))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set max_iter %d;'%NoOfIterations))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol, 3000, 0))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('test EnergyIncr $conv_tol $max_iter;'))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('algorithm Newton;'))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('integrator Newmark 0.5 0.25;'))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('analysis Transient;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set dt %e;'%Dt))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set min_dt %e;'%MinDt))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set n_steps %d;'%Steps))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set cur_step 1;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set div 10.0;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set tol 1.0e-12;'))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('set eigenvalue [eigen 9];'))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('modalDamping 0.02;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('while {$cur_step < $n_steps} {'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol, NoOfIterations, 0))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('	test EnergyIncr $conv_tol $max_iter;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('	algorithm Newton;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('	set ok [analyze 1 $dt];'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('	if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('		set dt_temp [expr $dt];'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('		puts "> analysis failed to converge at step $cur_step";'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('		puts "> trying KrylovNewton";'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('		algorithm KrylovNewton -maxDim %d;'%KrylovMaxDim))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('		set ok [analyze 1 $dt];'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('		if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('			set t 0.0;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('			set mini_t 0.0;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('			set dt_temp [expr round($dt/$div/$tol)*$tol];'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('			set mini_dt_temp 0.0;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('			while {$t < $dt} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('				if {$dt_temp < $min_dt} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('					puts "<< model did not converge (reason: time step less than $min_dt)";'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('					puts "<< exiting safely";'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('					wipe;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('					exit;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('				};'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('				if {$dt_temp < [expr $dt/pow($div, 2)]} {'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol*10, NoOfIterations, 0))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('					test EnergyIncr [expr $conv_tol*10.0] $max_iter;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('				};'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('				set ok [analyze 1 $dt_temp];'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('				if {$ok == 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('					set t [expr round(($t + $dt_temp)/$tol)*$tol];'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('					set mini_t [expr round(($mini_t + $dt_temp)/$tol)*$tol];'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('					if {$mini_t >= $mini_dt_temp} {set dt_temp [expr round($dt_temp*$div/$tol)*$tol]};'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('				} else {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('					set mini_t 0.0;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('					set mini_dt_temp [expr round($dt_temp/$tol)*$tol];'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('					set dt_temp [expr round($dt_temp/$div/$tol)*$tol];'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('				};'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('			};'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('		};'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('	};'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('	if {$cur_step % 1 == 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('		puts "Running Tim History Step: $cur_step out of %d (Sen Algo.)";'%Steps))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('	};'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('	incr cur_step;'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('};'))


def PushOverSolutionAlgorithim(OData, StepSize, Tol, ControlNode):
    #Insert within the While loop, make sure parameter "ok" is defined
    import OpenSeesAPI
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Smaller Step: %f and Tol: %f ... "'%(StepSize,Tol)))

    OData.AddObject(OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl(ControlNode, 1, StepSize))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying KrylovNewton ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.KrylovNewton())
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch(Tolerance=0.8))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton with Initial Tangent ... "'))
    # OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol,1000,0))
    # OData.AddObject(OpenSeesAPI.Analysis.Algorithm.Newton(Initial=True))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))
    #
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Broyden ... "'))
    # OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    # OData.AddObject(OpenSeesAPI.Analysis.Algorithm.Broyden(8))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    # OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search BiSection ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('Bisection'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search Secant... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('Secant'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search RegulaFalsi ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('RegulaFalsi'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

def PushOverSolutionAlgorithimDispIncr(OData, StepSize, Tol, ControlNode):
    #Insert within the While loop, make sure parameter "ok" is defined
    import OpenSeesAPI
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Smaller Step: %f and Tol: %f ... "'%(StepSize,Tol)))

    OData.AddObject(OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl(ControlNode, 1, StepSize))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying KrylovNewton ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.KrylovNewton())
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch(Tolerance=0.8))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search BiSection ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('Bisection'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search Secant... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('Secant'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search RegulaFalsi ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('RegulaFalsi'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

def PushOverSolutionAlgorithimConstantAlgorithm(OData, StepSize, Tol, ControlNode, Iter=1000):
    import OpenSeesAPI
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Smaller Step: %f and Tol: %f ... "'%(StepSize,Tol)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl(ControlNode, 1, StepSize))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying KrylovNewton ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,1000,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.KrylovNewton())
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

def PushOverSolutionAlgorithimConstantAlgorithmDispIncr(OData, StepSize, Tol, ControlNode, NoOfIterations=1000):
    import OpenSeesAPI
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Smaller Step: %f and Tol: %f ... "'%(StepSize,Tol)))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl(ControlNode, 1, StepSize))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying KrylovNewton ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.NormDispIncr(Tol,NoOfIterations,2))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.KrylovNewton())
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

def PushOverSolutionAlgorithimConstantTol(OData, Tol, Iter=1000):
    import OpenSeesAPI
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying KrylovNewton ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,Iter,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.KrylovNewton())
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,Iter,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch(Tolerance=0.8))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search BiSection ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,Iter,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('Bisection'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search Secant... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,Iter,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('Secant'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))

    OData.AddObject(OpenSeesAPI.TCL.TCLScript('if {$ok != 0} {'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('puts "Trying Newton Line Search RegulaFalsi ... "'))
    OData.AddObject(OpenSeesAPI.Analysis.Test.EnergyIncr(Tol,Iter,0))
    OData.AddObject(OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch('RegulaFalsi'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('set ok [analyze 1]'))
    OData.AddObject(OpenSeesAPI.TCL.TCLScript('}'))
[((8, 20, 8, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(8, 46, 8, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((9, 20, 9, 101), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(9, 46, 9, 100): '(\'puts "Trying Lower Dt: %f and Tol: %f ... "\' % (Dt, Tol))'}, {}), '(\'puts "Trying Lower Dt: %f and Tol: %f ... "\' % (\n    Dt, Tol))', False, 'import OpenSeesAPI\n'), ((10, 20, 10, 86), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(10, 46, 10, 85): '"""puts "Trying Newton Line Search ... \\""""'}, {}), '(\'puts "Trying Newton Line Search ... "\')', False, 'import OpenSeesAPI\n'), ((11, 20, 11, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(11, 57, 11, 60): 'Tol', (11, 61, 11, 65): '(1000)', (11, 66, 11, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((12, 20, 12, 82), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (), '', False, 'import OpenSeesAPI\n'), ((13, 20, 13, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(13, 46, 13, 82): "('set ok [analyze %d %f ]' % (Steps, Dt))"}, {}), "('set ok [analyze %d %f ]' % (Steps, Dt))", False, 'import OpenSeesAPI\n'), ((14, 20, 14, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(14, 46, 14, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((16, 20, 16, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(16, 46, 16, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((17, 20, 17, 95), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(17, 46, 17, 94): '"""puts "Trying Newton with Initial Tangent ... \\""""'}, {}), '(\'puts "Trying Newton with Initial Tangent ... "\')', False, 'import OpenSeesAPI\n'), ((18, 20, 18, 70), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(18, 59, 18, 62): 'Tol', (18, 63, 18, 67): '(1000)', (18, 68, 18, 69): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((19, 20, 19, 71), 'OpenSeesAPI.Analysis.Algorithm.Newton', 'OpenSeesAPI.Analysis.Algorithm.Newton', (), '', False, 'import OpenSeesAPI\n'), ((20, 20, 20, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(20, 46, 20, 82): "('set ok [analyze %d %f ]' % (Steps, Dt))"}, {}), "('set ok [analyze %d %f ]' % (Steps, Dt))", False, 'import OpenSeesAPI\n'), ((21, 20, 21, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(21, 46, 21, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((23, 20, 23, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(23, 46, 23, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((24, 20, 24, 75), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(24, 46, 24, 74): '"""puts "Trying Broyden ... \\""""'}, {}), '(\'puts "Trying Broyden ... "\')', False, 'import OpenSeesAPI\n'), ((25, 20, 25, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(25, 57, 25, 60): 'Tol', (25, 61, 25, 65): '(1000)', (25, 66, 25, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((26, 20, 26, 61), 'OpenSeesAPI.Analysis.Algorithm.Broyden', 'OpenSeesAPI.Analysis.Algorithm.Broyden', ({(26, 59, 26, 60): '(8)'}, {}), '(8)', False, 'import OpenSeesAPI\n'), ((27, 20, 27, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(27, 46, 27, 82): "('set ok [analyze %d %f ]' % (Steps, Dt))"}, {}), "('set ok [analyze %d %f ]' % (Steps, Dt))", False, 'import OpenSeesAPI\n'), ((28, 20, 28, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(28, 46, 28, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((30, 20, 30, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(30, 46, 30, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((31, 20, 31, 80), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(31, 46, 31, 79): '"""puts "Trying KrylovNewton ... \\""""'}, {}), '(\'puts "Trying KrylovNewton ... "\')', False, 'import OpenSeesAPI\n'), ((32, 20, 32, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(32, 57, 32, 60): 'Tol', (32, 61, 32, 65): '(1000)', (32, 66, 32, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((33, 20, 33, 65), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ({}, {}), '()', False, 'import OpenSeesAPI\n'), ((34, 20, 34, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(34, 46, 34, 82): "('set ok [analyze %d %f ]' % (Steps, Dt))"}, {}), "('set ok [analyze %d %f ]' % (Steps, Dt))", False, 'import OpenSeesAPI\n'), ((35, 20, 35, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(35, 46, 35, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((40, 20, 40, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(40, 46, 40, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((41, 20, 41, 101), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(41, 46, 41, 100): '(\'puts "Trying Lower Dt: %f and Tol: %f ... "\' % (Dt, Tol))'}, {}), '(\'puts "Trying Lower Dt: %f and Tol: %f ... "\' % (\n    Dt, Tol))', False, 'import OpenSeesAPI\n'), ((42, 20, 42, 73), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(42, 46, 42, 72): '"""puts "Trying Krylov... \\""""'}, {}), '(\'puts "Trying Krylov... "\')', False, 'import OpenSeesAPI\n'), ((43, 20, 43, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(43, 57, 43, 60): 'Tol', (43, 61, 43, 65): '(1000)', (43, 66, 43, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((44, 20, 44, 75), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', (), '', False, 'import OpenSeesAPI\n'), ((45, 20, 45, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(45, 46, 45, 82): "('set ok [analyze %d %f ]' % (Steps, Dt))"}, {}), "('set ok [analyze %d %f ]' % (Steps, Dt))", False, 'import OpenSeesAPI\n'), ((46, 20, 46, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(46, 46, 46, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((48, 20, 48, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(48, 46, 48, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((49, 20, 49, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(49, 46, 49, 82): '"""puts "Trying NewtonLineSearch... \\""""'}, {}), '(\'puts "Trying NewtonLineSearch... "\')', False, 'import OpenSeesAPI\n'), ((50, 20, 50, 70), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(50, 59, 50, 62): 'Tol', (50, 63, 50, 67): '(1000)', (50, 68, 50, 69): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((51, 20, 51, 82), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (), '', False, 'import OpenSeesAPI\n'), ((52, 20, 52, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(52, 46, 52, 82): "('set ok [analyze %d %f ]' % (Steps, Dt))"}, {}), "('set ok [analyze %d %f ]' % (Steps, Dt))", False, 'import OpenSeesAPI\n'), ((53, 20, 53, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(53, 46, 53, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((55, 20, 55, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(55, 46, 55, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((56, 20, 56, 93), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(56, 46, 56, 92): '"""puts "Trying NewtonLineSearch Bisection... \\""""'}, {}), '(\'puts "Trying NewtonLineSearch Bisection... "\')', False, 'import OpenSeesAPI\n'), ((57, 20, 57, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(57, 57, 57, 60): 'Tol', (57, 61, 57, 65): '(1000)', (57, 66, 57, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((58, 20, 58, 80), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(58, 68, 58, 79): '"""Bisection"""'}, {}), "('Bisection')", False, 'import OpenSeesAPI\n'), ((59, 20, 59, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(59, 46, 59, 82): "('set ok [analyze %d %f ]' % (Steps, Dt))"}, {}), "('set ok [analyze %d %f ]' % (Steps, Dt))", False, 'import OpenSeesAPI\n'), ((60, 20, 60, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(60, 46, 60, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((62, 20, 62, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(62, 46, 62, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((63, 20, 63, 90), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(63, 46, 63, 89): '"""puts "Trying NewtonLineSearch Secant... \\""""'}, {}), '(\'puts "Trying NewtonLineSearch Secant... "\')', False, 'import OpenSeesAPI\n'), ((64, 20, 64, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(64, 57, 64, 60): 'Tol', (64, 61, 64, 65): '(1000)', (64, 66, 64, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((65, 20, 65, 77), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(65, 68, 65, 76): '"""Secant"""'}, {}), "('Secant')", False, 'import OpenSeesAPI\n'), ((66, 20, 66, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(66, 46, 66, 82): "('set ok [analyze %d %f ]' % (Steps, Dt))"}, {}), "('set ok [analyze %d %f ]' % (Steps, Dt))", False, 'import OpenSeesAPI\n'), ((67, 20, 67, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(67, 46, 67, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((69, 20, 69, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(69, 46, 69, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((70, 20, 70, 95), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(70, 46, 70, 94): '"""puts "Trying NewtonLineSearch RegulaFalsi... \\""""'}, {}), '(\'puts "Trying NewtonLineSearch RegulaFalsi... "\')', False, 'import OpenSeesAPI\n'), ((71, 20, 71, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(71, 57, 71, 60): 'Tol', (71, 61, 71, 65): '(1000)', (71, 66, 71, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((72, 20, 72, 82), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(72, 68, 72, 81): '"""RegulaFalsi"""'}, {}), "('RegulaFalsi')", False, 'import OpenSeesAPI\n'), ((73, 20, 73, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(73, 46, 73, 82): "('set ok [analyze %d %f ]' % (Steps, Dt))"}, {}), "('set ok [analyze %d %f ]' % (Steps, Dt))", False, 'import OpenSeesAPI\n'), ((74, 20, 74, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(74, 46, 74, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((79, 20, 79, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(79, 46, 79, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((80, 20, 80, 101), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(80, 46, 80, 100): '(\'puts "Trying Lower Dt: %e and Tol: %e ... "\' % (Dt, Tol))'}, {}), '(\'puts "Trying Lower Dt: %e and Tol: %e ... "\' % (\n    Dt, Tol))', False, 'import OpenSeesAPI\n'), ((81, 20, 81, 73), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(81, 46, 81, 72): '"""puts "Trying Krylov... \\""""'}, {}), '(\'puts "Trying Krylov... "\')', False, 'import OpenSeesAPI\n'), ((82, 20, 82, 72), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(82, 59, 82, 62): 'Tol', (82, 64, 82, 68): '(1000)', (82, 70, 82, 71): '(2)'}, {}), '(Tol, 1000, 2)', False, 'import OpenSeesAPI\n'), ((84, 20, 84, 80), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', (), '', False, 'import OpenSeesAPI\n'), ((85, 20, 85, 83), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(85, 46, 85, 82): "('set ok [analyze %d %e ]' % (Steps, Dt))"}, {}), "('set ok [analyze %d %e ]' % (Steps, Dt))", False, 'import OpenSeesAPI\n'), ((86, 20, 86, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(86, 46, 86, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((90, 20, 90, 68), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(90, 46, 90, 67): "('set conv_tol %e' % Tol)"}, {}), "('set conv_tol %e' % Tol)", False, 'import OpenSeesAPI\n'), ((91, 20, 91, 80), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(91, 46, 91, 79): "('set max_iter %d;' % NoOfIterations)"}, {}), "('set max_iter %d;' % NoOfIterations)", False, 'import OpenSeesAPI\n'), ((92, 20, 92, 72), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(92, 59, 92, 62): 'Tol', (92, 64, 92, 68): '(3000)', (92, 70, 92, 71): '(0)'}, {}), '(Tol, 3000, 0)', False, 'import OpenSeesAPI\n'), ((97, 20, 97, 62), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(97, 46, 97, 61): "('set dt %e;' % Dt)"}, {}), "('set dt %e;' % Dt)", False, 'import OpenSeesAPI\n'), ((98, 20, 98, 69), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(98, 46, 98, 68): "('set min_dt %e;' % MinDt)"}, {}), "('set min_dt %e;' % MinDt)", False, 'import OpenSeesAPI\n'), ((99, 20, 99, 70), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(99, 46, 99, 69): "('set n_steps %d;' % Steps)"}, {}), "('set n_steps %d;' % Steps)", False, 'import OpenSeesAPI\n'), ((100, 20, 100, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(100, 46, 100, 63): '"""set cur_step 1;"""'}, {}), "('set cur_step 1;')", False, 'import OpenSeesAPI\n'), ((101, 20, 101, 62), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(101, 46, 101, 61): '"""set div 10.0;"""'}, {}), "('set div 10.0;')", False, 'import OpenSeesAPI\n'), ((102, 20, 102, 65), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(102, 46, 102, 64): '"""set tol 1.0e-12;"""'}, {}), "('set tol 1.0e-12;')", False, 'import OpenSeesAPI\n'), ((105, 20, 105, 79), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(105, 46, 105, 78): '"""while {$cur_step < $n_steps} {"""'}, {}), "('while {$cur_step < $n_steps} {')", False, 'import OpenSeesAPI\n'), ((106, 20, 106, 82), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(106, 59, 106, 62): 'Tol', (106, 64, 106, 78): 'NoOfIterations', (106, 80, 106, 81): '(0)'}, {}), '(Tol, NoOfIterations, 0)', False, 'import OpenSeesAPI\n'), ((108, 20, 108, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(108, 46, 108, 66): '"""\talgorithm Newton;"""'}, {}), "('\\talgorithm Newton;')", False, 'import OpenSeesAPI\n'), ((109, 20, 109, 73), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(109, 46, 109, 72): '"""\tset ok [analyze 1 $dt];"""'}, {}), "('\\tset ok [analyze 1 $dt];')", False, 'import OpenSeesAPI\n'), ((110, 20, 110, 65), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(110, 46, 110, 64): '"""\tif {$ok != 0} {"""'}, {}), "('\\tif {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((111, 20, 111, 74), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(111, 46, 111, 73): '"""\t\tset dt_temp [expr $dt];"""'}, {}), "('\\t\\tset dt_temp [expr $dt];')", False, 'import OpenSeesAPI\n'), ((112, 20, 112, 106), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(112, 46, 112, 105): '"""\t\tputs "> analysis failed to converge at step $cur_step";"""'}, {}), '(\n    \'\\t\\tputs "> analysis failed to converge at step $cur_step";\')', False, 'import OpenSeesAPI\n'), ((113, 20, 113, 80), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(113, 46, 113, 79): '"""\t\tputs "> trying KrylovNewton";"""'}, {}), '(\'\\t\\tputs "> trying KrylovNewton";\')', False, 'import OpenSeesAPI\n'), ((114, 20, 114, 98), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(114, 46, 114, 97): "('\\t\\talgorithm KrylovNewton -maxDim %d;' % KrylovMaxDim)"}, {}), "('\\t\\talgorithm KrylovNewton -maxDim %d;' %\n    KrylovMaxDim)", False, 'import OpenSeesAPI\n'), ((115, 20, 115, 74), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(115, 46, 115, 73): '"""\t\tset ok [analyze 1 $dt];"""'}, {}), "('\\t\\tset ok [analyze 1 $dt];')", False, 'import OpenSeesAPI\n'), ((116, 20, 116, 66), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(116, 46, 116, 65): '"""\t\tif {$ok != 0} {"""'}, {}), "('\\t\\tif {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((117, 20, 117, 62), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(117, 46, 117, 61): '"""\t\t\tset t 0.0;"""'}, {}), "('\\t\\t\\tset t 0.0;')", False, 'import OpenSeesAPI\n'), ((118, 20, 118, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(118, 46, 118, 66): '"""\t\t\tset mini_t 0.0;"""'}, {}), "('\\t\\t\\tset mini_t 0.0;')", False, 'import OpenSeesAPI\n'), ((119, 20, 119, 97), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(119, 46, 119, 96): '"""\t\t\tset dt_temp [expr round($dt/$div/$tol)*$tol];"""'}, {}), "('\\t\\t\\tset dt_temp [expr round($dt/$div/$tol)*$tol];'\n    )", False, 'import OpenSeesAPI\n'), ((120, 20, 120, 73), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(120, 46, 120, 72): '"""\t\t\tset mini_dt_temp 0.0;"""'}, {}), "('\\t\\t\\tset mini_dt_temp 0.0;')", False, 'import OpenSeesAPI\n'), ((121, 20, 121, 70), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(121, 46, 121, 69): '"""\t\t\twhile {$t < $dt} {"""'}, {}), "('\\t\\t\\twhile {$t < $dt} {')", False, 'import OpenSeesAPI\n'), ((122, 20, 122, 78), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(122, 46, 122, 77): '"""\t\t\t\tif {$dt_temp < $min_dt} {"""'}, {}), "('\\t\\t\\t\\tif {$dt_temp < $min_dt} {')", False, 'import OpenSeesAPI\n'), ((123, 20, 123, 125), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(123, 46, 123, 124): '"""\t\t\t\t\tputs "<< model did not converge (reason: time step less than $min_dt)";"""'}, {}), '(\n    \'\\t\\t\\t\\t\\tputs "<< model did not converge (reason: time step less than $min_dt)";\'\n    )', False, 'import OpenSeesAPI\n'), ((124, 20, 124, 79), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(124, 46, 124, 78): '"""\t\t\t\t\tputs "<< exiting safely";"""'}, {}), '(\'\\t\\t\\t\\t\\tputs "<< exiting safely";\')', False, 'import OpenSeesAPI\n'), ((125, 20, 125, 59), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(125, 46, 125, 58): '"""\t\t\t\t\twipe;"""'}, {}), "('\\t\\t\\t\\t\\twipe;')", False, 'import OpenSeesAPI\n'), ((126, 20, 126, 59), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(126, 46, 126, 58): '"""\t\t\t\t\texit;"""'}, {}), "('\\t\\t\\t\\t\\texit;')", False, 'import OpenSeesAPI\n'), ((127, 20, 127, 55), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(127, 46, 127, 54): '"""\t\t\t\t};"""'}, {}), "('\\t\\t\\t\\t};')", False, 'import OpenSeesAPI\n'), ((128, 20, 128, 94), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(128, 46, 128, 93): '"""\t\t\t\tif {$dt_temp < [expr $dt/pow($div, 2)]} {"""'}, {}), "('\\t\\t\\t\\tif {$dt_temp < [expr $dt/pow($div, 2)]} {')", False, 'import OpenSeesAPI\n'), ((129, 20, 129, 85), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(129, 59, 129, 65): '(Tol * 10)', (129, 67, 129, 81): 'NoOfIterations', (129, 83, 129, 84): '(0)'}, {}), '(Tol * 10, NoOfIterations, 0)', False, 'import OpenSeesAPI\n'), ((131, 20, 131, 55), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(131, 46, 131, 54): '"""\t\t\t\t};"""'}, {}), "('\\t\\t\\t\\t};')", False, 'import OpenSeesAPI\n'), ((132, 20, 132, 81), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(132, 46, 132, 80): '"""\t\t\t\tset ok [analyze 1 $dt_temp];"""'}, {}), "('\\t\\t\\t\\tset ok [analyze 1 $dt_temp];')", False, 'import OpenSeesAPI\n'), ((133, 20, 133, 68), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(133, 46, 133, 67): '"""\t\t\t\tif {$ok == 0} {"""'}, {}), "('\\t\\t\\t\\tif {$ok == 0} {')", False, 'import OpenSeesAPI\n'), ((134, 20, 134, 100), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(134, 46, 134, 99): '"""\t\t\t\t\tset t [expr round(($t + $dt_temp)/$tol)*$tol];"""'}, {}), "(\n    '\\t\\t\\t\\t\\tset t [expr round(($t + $dt_temp)/$tol)*$tol];')", False, 'import OpenSeesAPI\n'), ((135, 20, 135, 110), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(135, 46, 135, 109): '"""\t\t\t\t\tset mini_t [expr round(($mini_t + $dt_temp)/$tol)*$tol];"""'}, {}), "(\n    '\\t\\t\\t\\t\\tset mini_t [expr round(($mini_t + $dt_temp)/$tol)*$tol];')", False, 'import OpenSeesAPI\n'), ((136, 20, 136, 136), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(136, 46, 136, 135): '"""\t\t\t\t\tif {$mini_t >= $mini_dt_temp} {set dt_temp [expr round($dt_temp*$div/$tol)*$tol]};"""'}, {}), "(\n    '\\t\\t\\t\\t\\tif {$mini_t >= $mini_dt_temp} {set dt_temp [expr round($dt_temp*$div/$tol)*$tol]};'\n    )", False, 'import OpenSeesAPI\n'), ((137, 20, 137, 61), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(137, 46, 137, 60): '"""\t\t\t\t} else {"""'}, {}), "('\\t\\t\\t\\t} else {')", False, 'import OpenSeesAPI\n'), ((138, 20, 138, 69), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(138, 46, 138, 68): '"""\t\t\t\t\tset mini_t 0.0;"""'}, {}), "('\\t\\t\\t\\t\\tset mini_t 0.0;')", False, 'import OpenSeesAPI\n'), ((139, 20, 139, 104), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(139, 46, 139, 103): '"""\t\t\t\t\tset mini_dt_temp [expr round($dt_temp/$tol)*$tol];"""'}, {}), "(\n    '\\t\\t\\t\\t\\tset mini_dt_temp [expr round($dt_temp/$tol)*$tol];')", False, 'import OpenSeesAPI\n'), ((140, 20, 140, 104), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(140, 46, 140, 103): '"""\t\t\t\t\tset dt_temp [expr round($dt_temp/$div/$tol)*$tol];"""'}, {}), "(\n    '\\t\\t\\t\\t\\tset dt_temp [expr round($dt_temp/$div/$tol)*$tol];')", False, 'import OpenSeesAPI\n'), ((141, 20, 141, 55), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(141, 46, 141, 54): '"""\t\t\t\t};"""'}, {}), "('\\t\\t\\t\\t};')", False, 'import OpenSeesAPI\n'), ((142, 20, 142, 54), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(142, 46, 142, 53): '"""\t\t\t};"""'}, {}), "('\\t\\t\\t};')", False, 'import OpenSeesAPI\n'), ((143, 20, 143, 53), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(143, 46, 143, 52): '"""\t\t};"""'}, {}), "('\\t\\t};')", False, 'import OpenSeesAPI\n'), ((144, 20, 144, 52), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(144, 46, 144, 51): '"""\t};"""'}, {}), "('\\t};')", False, 'import OpenSeesAPI\n'), ((145, 20, 145, 75), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(145, 46, 145, 74): '"""\tif {$cur_step % 1 == 0} {"""'}, {}), "('\\tif {$cur_step % 1 == 0} {')", False, 'import OpenSeesAPI\n'), ((146, 20, 146, 122), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(146, 46, 146, 121): '(\'\\t\\tputs "Running Tim History Step: $cur_step out of %d (Sen Algo.)";\' %\n    Steps)'}, {}), '(\n    \'\\t\\tputs "Running Tim History Step: $cur_step out of %d (Sen Algo.)";\' %\n    Steps)', False, 'import OpenSeesAPI\n'), ((147, 20, 147, 52), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(147, 46, 147, 51): '"""\t};"""'}, {}), "('\\t};')", False, 'import OpenSeesAPI\n'), ((148, 20, 148, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(148, 46, 148, 63): '"""\tincr cur_step;"""'}, {}), "('\\tincr cur_step;')", False, 'import OpenSeesAPI\n'), ((149, 20, 149, 51), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(149, 46, 149, 50): '"""};"""'}, {}), "('};')", False, 'import OpenSeesAPI\n'), ((155, 20, 155, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(155, 46, 155, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((156, 20, 156, 111), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(156, 46, 156, 110): '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' % (StepSize, Tol))'}, {}), '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' %\n    (StepSize, Tol))', False, 'import OpenSeesAPI\n'), ((158, 20, 158, 104), 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', ({(158, 79, 158, 90): 'ControlNode', (158, 92, 158, 93): '(1)', (158, 95, 158, 103): 'StepSize'}, {}), '(ControlNode, 1,\n    StepSize)', False, 'import OpenSeesAPI\n'), ((160, 20, 160, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(160, 46, 160, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((162, 20, 162, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(162, 46, 162, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((163, 20, 163, 80), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(163, 46, 163, 79): '"""puts "Trying KrylovNewton ... \\""""'}, {}), '(\'puts "Trying KrylovNewton ... "\')', False, 'import OpenSeesAPI\n'), ((164, 20, 164, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(164, 57, 164, 60): 'Tol', (164, 61, 164, 65): '(1000)', (164, 66, 164, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((165, 20, 165, 65), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ({}, {}), '()', False, 'import OpenSeesAPI\n'), ((166, 20, 166, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(166, 46, 166, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((167, 20, 167, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(167, 46, 167, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((169, 20, 169, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(169, 46, 169, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((170, 20, 170, 86), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(170, 46, 170, 85): '"""puts "Trying Newton Line Search ... \\""""'}, {}), '(\'puts "Trying Newton Line Search ... "\')', False, 'import OpenSeesAPI\n'), ((171, 20, 171, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(171, 57, 171, 60): 'Tol', (171, 61, 171, 65): '(1000)', (171, 66, 171, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((172, 20, 172, 82), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (), '', False, 'import OpenSeesAPI\n'), ((173, 20, 173, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(173, 46, 173, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((174, 20, 174, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(174, 46, 174, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((190, 20, 190, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(190, 46, 190, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((191, 20, 191, 96), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(191, 46, 191, 95): '"""puts "Trying Newton Line Search BiSection ... \\""""'}, {}), '(\'puts "Trying Newton Line Search BiSection ... "\')', False, 'import OpenSeesAPI\n'), ((192, 20, 192, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(192, 57, 192, 60): 'Tol', (192, 61, 192, 65): '(1000)', (192, 66, 192, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((193, 20, 193, 80), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(193, 68, 193, 79): '"""Bisection"""'}, {}), "('Bisection')", False, 'import OpenSeesAPI\n'), ((194, 20, 194, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(194, 46, 194, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((195, 20, 195, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(195, 46, 195, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((197, 20, 197, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(197, 46, 197, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((198, 20, 198, 92), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(198, 46, 198, 91): '"""puts "Trying Newton Line Search Secant... \\""""'}, {}), '(\'puts "Trying Newton Line Search Secant... "\')', False, 'import OpenSeesAPI\n'), ((199, 20, 199, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(199, 57, 199, 60): 'Tol', (199, 61, 199, 65): '(1000)', (199, 66, 199, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((200, 20, 200, 77), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(200, 68, 200, 76): '"""Secant"""'}, {}), "('Secant')", False, 'import OpenSeesAPI\n'), ((201, 20, 201, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(201, 46, 201, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((202, 20, 202, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(202, 46, 202, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((204, 20, 204, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(204, 46, 204, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((205, 20, 205, 98), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(205, 46, 205, 97): '"""puts "Trying Newton Line Search RegulaFalsi ... \\""""'}, {}), '(\'puts "Trying Newton Line Search RegulaFalsi ... "\')', False, 'import OpenSeesAPI\n'), ((206, 20, 206, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(206, 57, 206, 60): 'Tol', (206, 61, 206, 65): '(1000)', (206, 66, 206, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((207, 20, 207, 82), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(207, 68, 207, 81): '"""RegulaFalsi"""'}, {}), "('RegulaFalsi')", False, 'import OpenSeesAPI\n'), ((208, 20, 208, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(208, 46, 208, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((209, 20, 209, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(209, 46, 209, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((214, 20, 214, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(214, 46, 214, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((215, 20, 215, 111), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(215, 46, 215, 110): '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' % (StepSize, Tol))'}, {}), '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' %\n    (StepSize, Tol))', False, 'import OpenSeesAPI\n'), ((217, 20, 217, 104), 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', ({(217, 79, 217, 90): 'ControlNode', (217, 92, 217, 93): '(1)', (217, 95, 217, 103): 'StepSize'}, {}), '(ControlNode, 1,\n    StepSize)', False, 'import OpenSeesAPI\n'), ((219, 20, 219, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(219, 46, 219, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((221, 20, 221, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(221, 46, 221, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((222, 20, 222, 80), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(222, 46, 222, 79): '"""puts "Trying KrylovNewton ... \\""""'}, {}), '(\'puts "Trying KrylovNewton ... "\')', False, 'import OpenSeesAPI\n'), ((223, 20, 223, 70), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(223, 59, 223, 62): 'Tol', (223, 63, 223, 67): '(1000)', (223, 68, 223, 69): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((224, 20, 224, 65), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ({}, {}), '()', False, 'import OpenSeesAPI\n'), ((225, 20, 225, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(225, 46, 225, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((226, 20, 226, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(226, 46, 226, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((228, 20, 228, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(228, 46, 228, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((229, 20, 229, 86), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(229, 46, 229, 85): '"""puts "Trying Newton Line Search ... \\""""'}, {}), '(\'puts "Trying Newton Line Search ... "\')', False, 'import OpenSeesAPI\n'), ((230, 20, 230, 70), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(230, 59, 230, 62): 'Tol', (230, 63, 230, 67): '(1000)', (230, 68, 230, 69): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((231, 20, 231, 82), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (), '', False, 'import OpenSeesAPI\n'), ((232, 20, 232, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(232, 46, 232, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((233, 20, 233, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(233, 46, 233, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((235, 20, 235, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(235, 46, 235, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((236, 20, 236, 96), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(236, 46, 236, 95): '"""puts "Trying Newton Line Search BiSection ... \\""""'}, {}), '(\'puts "Trying Newton Line Search BiSection ... "\')', False, 'import OpenSeesAPI\n'), ((237, 20, 237, 70), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(237, 59, 237, 62): 'Tol', (237, 63, 237, 67): '(1000)', (237, 68, 237, 69): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((238, 20, 238, 80), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(238, 68, 238, 79): '"""Bisection"""'}, {}), "('Bisection')", False, 'import OpenSeesAPI\n'), ((239, 20, 239, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(239, 46, 239, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((240, 20, 240, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(240, 46, 240, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((242, 20, 242, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(242, 46, 242, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((243, 20, 243, 92), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(243, 46, 243, 91): '"""puts "Trying Newton Line Search Secant... \\""""'}, {}), '(\'puts "Trying Newton Line Search Secant... "\')', False, 'import OpenSeesAPI\n'), ((244, 20, 244, 70), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(244, 59, 244, 62): 'Tol', (244, 63, 244, 67): '(1000)', (244, 68, 244, 69): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((245, 20, 245, 77), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(245, 68, 245, 76): '"""Secant"""'}, {}), "('Secant')", False, 'import OpenSeesAPI\n'), ((246, 20, 246, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(246, 46, 246, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((247, 20, 247, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(247, 46, 247, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((249, 20, 249, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(249, 46, 249, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((250, 20, 250, 98), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(250, 46, 250, 97): '"""puts "Trying Newton Line Search RegulaFalsi ... \\""""'}, {}), '(\'puts "Trying Newton Line Search RegulaFalsi ... "\')', False, 'import OpenSeesAPI\n'), ((251, 20, 251, 70), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(251, 59, 251, 62): 'Tol', (251, 63, 251, 67): '(1000)', (251, 68, 251, 69): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((252, 20, 252, 82), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(252, 68, 252, 81): '"""RegulaFalsi"""'}, {}), "('RegulaFalsi')", False, 'import OpenSeesAPI\n'), ((253, 20, 253, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(253, 46, 253, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((254, 20, 254, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(254, 46, 254, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((258, 20, 258, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(258, 46, 258, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((259, 20, 259, 111), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(259, 46, 259, 110): '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' % (StepSize, Tol))'}, {}), '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' %\n    (StepSize, Tol))', False, 'import OpenSeesAPI\n'), ((260, 20, 260, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(260, 46, 260, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((262, 20, 262, 104), 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', ({(262, 79, 262, 90): 'ControlNode', (262, 92, 262, 93): '(1)', (262, 95, 262, 103): 'StepSize'}, {}), '(ControlNode, 1,\n    StepSize)', False, 'import OpenSeesAPI\n'), ((264, 20, 264, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(264, 46, 264, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((265, 20, 265, 80), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(265, 46, 265, 79): '"""puts "Trying KrylovNewton ... \\""""'}, {}), '(\'puts "Trying KrylovNewton ... "\')', False, 'import OpenSeesAPI\n'), ((266, 20, 266, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(266, 57, 266, 60): 'Tol', (266, 61, 266, 65): '(1000)', (266, 66, 266, 67): '(0)'}, {}), '(Tol, 1000, 0)', False, 'import OpenSeesAPI\n'), ((267, 20, 267, 65), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ({}, {}), '()', False, 'import OpenSeesAPI\n'), ((268, 20, 268, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(268, 46, 268, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((269, 20, 269, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(269, 46, 269, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((273, 20, 273, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(273, 46, 273, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((274, 20, 274, 111), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(274, 46, 274, 110): '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' % (StepSize, Tol))'}, {}), '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' %\n    (StepSize, Tol))', False, 'import OpenSeesAPI\n'), ((275, 20, 275, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(275, 46, 275, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((277, 20, 277, 104), 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', ({(277, 79, 277, 90): 'ControlNode', (277, 92, 277, 93): '(1)', (277, 95, 277, 103): 'StepSize'}, {}), '(ControlNode, 1,\n    StepSize)', False, 'import OpenSeesAPI\n'), ((279, 20, 279, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(279, 46, 279, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((280, 20, 280, 80), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(280, 46, 280, 79): '"""puts "Trying KrylovNewton ... \\""""'}, {}), '(\'puts "Trying KrylovNewton ... "\')', False, 'import OpenSeesAPI\n'), ((281, 20, 281, 80), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', ({(281, 59, 281, 62): 'Tol', (281, 63, 281, 77): 'NoOfIterations', (281, 78, 281, 79): '(2)'}, {}), '(Tol, NoOfIterations, 2)', False, 'import OpenSeesAPI\n'), ((282, 20, 282, 65), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ({}, {}), '()', False, 'import OpenSeesAPI\n'), ((283, 20, 283, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(283, 46, 283, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((284, 20, 284, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(284, 46, 284, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((288, 20, 288, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(288, 46, 288, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((289, 20, 289, 80), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(289, 46, 289, 79): '"""puts "Trying KrylovNewton ... \\""""'}, {}), '(\'puts "Trying KrylovNewton ... "\')', False, 'import OpenSeesAPI\n'), ((290, 20, 290, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(290, 57, 290, 60): 'Tol', (290, 61, 290, 65): 'Iter', (290, 66, 290, 67): '(0)'}, {}), '(Tol, Iter, 0)', False, 'import OpenSeesAPI\n'), ((291, 20, 291, 65), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ({}, {}), '()', False, 'import OpenSeesAPI\n'), ((292, 20, 292, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(292, 46, 292, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((293, 20, 293, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(293, 46, 293, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((295, 20, 295, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(295, 46, 295, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((296, 20, 296, 86), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(296, 46, 296, 85): '"""puts "Trying Newton Line Search ... \\""""'}, {}), '(\'puts "Trying Newton Line Search ... "\')', False, 'import OpenSeesAPI\n'), ((297, 20, 297, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(297, 57, 297, 60): 'Tol', (297, 61, 297, 65): 'Iter', (297, 66, 297, 67): '(0)'}, {}), '(Tol, Iter, 0)', False, 'import OpenSeesAPI\n'), ((298, 20, 298, 82), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (), '', False, 'import OpenSeesAPI\n'), ((299, 20, 299, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(299, 46, 299, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((300, 20, 300, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(300, 46, 300, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((302, 20, 302, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(302, 46, 302, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((303, 20, 303, 96), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(303, 46, 303, 95): '"""puts "Trying Newton Line Search BiSection ... \\""""'}, {}), '(\'puts "Trying Newton Line Search BiSection ... "\')', False, 'import OpenSeesAPI\n'), ((304, 20, 304, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(304, 57, 304, 60): 'Tol', (304, 61, 304, 65): 'Iter', (304, 66, 304, 67): '(0)'}, {}), '(Tol, Iter, 0)', False, 'import OpenSeesAPI\n'), ((305, 20, 305, 80), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(305, 68, 305, 79): '"""Bisection"""'}, {}), "('Bisection')", False, 'import OpenSeesAPI\n'), ((306, 20, 306, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(306, 46, 306, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((307, 20, 307, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(307, 46, 307, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((309, 20, 309, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(309, 46, 309, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((310, 20, 310, 92), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(310, 46, 310, 91): '"""puts "Trying Newton Line Search Secant... \\""""'}, {}), '(\'puts "Trying Newton Line Search Secant... "\')', False, 'import OpenSeesAPI\n'), ((311, 20, 311, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(311, 57, 311, 60): 'Tol', (311, 61, 311, 65): 'Iter', (311, 66, 311, 67): '(0)'}, {}), '(Tol, Iter, 0)', False, 'import OpenSeesAPI\n'), ((312, 20, 312, 77), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(312, 68, 312, 76): '"""Secant"""'}, {}), "('Secant')", False, 'import OpenSeesAPI\n'), ((313, 20, 313, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(313, 46, 313, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((314, 20, 314, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(314, 46, 314, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n'), ((316, 20, 316, 64), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(316, 46, 316, 63): '"""if {$ok != 0} {"""'}, {}), "('if {$ok != 0} {')", False, 'import OpenSeesAPI\n'), ((317, 20, 317, 98), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(317, 46, 317, 97): '"""puts "Trying Newton Line Search RegulaFalsi ... \\""""'}, {}), '(\'puts "Trying Newton Line Search RegulaFalsi ... "\')', False, 'import OpenSeesAPI\n'), ((318, 20, 318, 68), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', ({(318, 57, 318, 60): 'Tol', (318, 61, 318, 65): 'Iter', (318, 66, 318, 67): '(0)'}, {}), '(Tol, Iter, 0)', False, 'import OpenSeesAPI\n'), ((319, 20, 319, 82), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ({(319, 68, 319, 81): '"""RegulaFalsi"""'}, {}), "('RegulaFalsi')", False, 'import OpenSeesAPI\n'), ((320, 20, 320, 67), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(320, 46, 320, 66): '"""set ok [analyze 1]"""'}, {}), "('set ok [analyze 1]')", False, 'import OpenSeesAPI\n'), ((321, 20, 321, 50), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', ({(321, 46, 321, 49): '"""}"""'}, {}), "('}')", False, 'import OpenSeesAPI\n')]