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('}'))
[((224, 268), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (249, 268), False, 'import OpenSeesAPI\n'), ((290, 379), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['(\'puts "Trying Lower Dt: %f and Tol: %f ... "\' % (Dt, Tol))'], {}), '(\'puts "Trying Lower Dt: %f and Tol: %f ... "\' % (\n    Dt, Tol))\n', (315, 379), False, 'import OpenSeesAPI\n'), ((393, 459), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search ... \\""""'], {}), '(\'puts "Trying Newton Line Search ... "\')\n', (418, 459), False, 'import OpenSeesAPI\n'), ((481, 531), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (517, 531), False, 'import OpenSeesAPI\n'), ((551, 613), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ([], {'Tolerance': '(0.8)'}), '(Tolerance=0.8)\n', (598, 613), False, 'import OpenSeesAPI\n'), ((635, 701), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set ok [analyze %d %f ]' % (Steps, Dt))"], {}), "('set ok [analyze %d %f ]' % (Steps, Dt))\n", (660, 701), False, 'import OpenSeesAPI\n'), ((720, 750), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (745, 750), False, 'import OpenSeesAPI\n'), ((773, 817), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (798, 817), False, 'import OpenSeesAPI\n'), ((839, 914), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton with Initial Tangent ... \\""""'], {}), '(\'puts "Trying Newton with Initial Tangent ... "\')\n', (864, 914), False, 'import OpenSeesAPI\n'), ((936, 988), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (974, 988), False, 'import OpenSeesAPI\n'), ((1008, 1059), 'OpenSeesAPI.Analysis.Algorithm.Newton', 'OpenSeesAPI.Analysis.Algorithm.Newton', ([], {'Initial': '(True)'}), '(Initial=True)\n', (1045, 1059), False, 'import OpenSeesAPI\n'), ((1081, 1147), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set ok [analyze %d %f ]' % (Steps, Dt))"], {}), "('set ok [analyze %d %f ]' % (Steps, Dt))\n", (1106, 1147), False, 'import OpenSeesAPI\n'), ((1166, 1196), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (1191, 1196), False, 'import OpenSeesAPI\n'), ((1219, 1263), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (1244, 1263), False, 'import OpenSeesAPI\n'), ((1285, 1340), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Broyden ... \\""""'], {}), '(\'puts "Trying Broyden ... "\')\n', (1310, 1340), False, 'import OpenSeesAPI\n'), ((1362, 1412), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (1398, 1412), False, 'import OpenSeesAPI\n'), ((1432, 1473), 'OpenSeesAPI.Analysis.Algorithm.Broyden', 'OpenSeesAPI.Analysis.Algorithm.Broyden', (['(8)'], {}), '(8)\n', (1470, 1473), False, 'import OpenSeesAPI\n'), ((1495, 1561), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set ok [analyze %d %f ]' % (Steps, Dt))"], {}), "('set ok [analyze %d %f ]' % (Steps, Dt))\n", (1520, 1561), False, 'import OpenSeesAPI\n'), ((1580, 1610), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (1605, 1610), False, 'import OpenSeesAPI\n'), ((1633, 1677), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (1658, 1677), False, 'import OpenSeesAPI\n'), ((1699, 1759), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying KrylovNewton ... \\""""'], {}), '(\'puts "Trying KrylovNewton ... "\')\n', (1724, 1759), False, 'import OpenSeesAPI\n'), ((1781, 1831), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (1817, 1831), False, 'import OpenSeesAPI\n'), ((1851, 1896), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ([], {}), '()\n', (1894, 1896), False, 'import OpenSeesAPI\n'), ((1918, 1984), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set ok [analyze %d %f ]' % (Steps, Dt))"], {}), "('set ok [analyze %d %f ]' % (Steps, Dt))\n", (1943, 1984), False, 'import OpenSeesAPI\n'), ((2003, 2033), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (2028, 2033), False, 'import OpenSeesAPI\n'), ((2199, 2243), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (2224, 2243), False, 'import OpenSeesAPI\n'), ((2265, 2354), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['(\'puts "Trying Lower Dt: %f and Tol: %f ... "\' % (Dt, Tol))'], {}), '(\'puts "Trying Lower Dt: %f and Tol: %f ... "\' % (\n    Dt, Tol))\n', (2290, 2354), False, 'import OpenSeesAPI\n'), ((2368, 2421), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Krylov... \\""""'], {}), '(\'puts "Trying Krylov... "\')\n', (2393, 2421), False, 'import OpenSeesAPI\n'), ((2443, 2493), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (2479, 2493), False, 'import OpenSeesAPI\n'), ((2513, 2566), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ([], {'MaxDim': '(6)'}), '(MaxDim=6)\n', (2556, 2566), False, 'import OpenSeesAPI\n'), ((2590, 2656), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set ok [analyze %d %f ]' % (Steps, Dt))"], {}), "('set ok [analyze %d %f ]' % (Steps, Dt))\n", (2615, 2656), False, 'import OpenSeesAPI\n'), ((2675, 2705), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (2700, 2705), False, 'import OpenSeesAPI\n'), ((2728, 2772), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (2753, 2772), False, 'import OpenSeesAPI\n'), ((2794, 2857), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying NewtonLineSearch... \\""""'], {}), '(\'puts "Trying NewtonLineSearch... "\')\n', (2819, 2857), False, 'import OpenSeesAPI\n'), ((2879, 2931), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (2917, 2931), False, 'import OpenSeesAPI\n'), ((2951, 3013), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ([], {'Tolerance': '(0.8)'}), '(Tolerance=0.8)\n', (2998, 3013), False, 'import OpenSeesAPI\n'), ((3035, 3101), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set ok [analyze %d %f ]' % (Steps, Dt))"], {}), "('set ok [analyze %d %f ]' % (Steps, Dt))\n", (3060, 3101), False, 'import OpenSeesAPI\n'), ((3120, 3150), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (3145, 3150), False, 'import OpenSeesAPI\n'), ((3173, 3217), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (3198, 3217), False, 'import OpenSeesAPI\n'), ((3239, 3312), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying NewtonLineSearch Bisection... \\""""'], {}), '(\'puts "Trying NewtonLineSearch Bisection... "\')\n', (3264, 3312), False, 'import OpenSeesAPI\n'), ((3334, 3384), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (3370, 3384), False, 'import OpenSeesAPI\n'), ((3404, 3464), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""Bisection"""'], {}), "('Bisection')\n", (3451, 3464), False, 'import OpenSeesAPI\n'), ((3486, 3552), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set ok [analyze %d %f ]' % (Steps, Dt))"], {}), "('set ok [analyze %d %f ]' % (Steps, Dt))\n", (3511, 3552), False, 'import OpenSeesAPI\n'), ((3571, 3601), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (3596, 3601), False, 'import OpenSeesAPI\n'), ((3624, 3668), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (3649, 3668), False, 'import OpenSeesAPI\n'), ((3690, 3760), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying NewtonLineSearch Secant... \\""""'], {}), '(\'puts "Trying NewtonLineSearch Secant... "\')\n', (3715, 3760), False, 'import OpenSeesAPI\n'), ((3782, 3832), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (3818, 3832), False, 'import OpenSeesAPI\n'), ((3852, 3909), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""Secant"""'], {}), "('Secant')\n", (3899, 3909), False, 'import OpenSeesAPI\n'), ((3931, 3997), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set ok [analyze %d %f ]' % (Steps, Dt))"], {}), "('set ok [analyze %d %f ]' % (Steps, Dt))\n", (3956, 3997), False, 'import OpenSeesAPI\n'), ((4016, 4046), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (4041, 4046), False, 'import OpenSeesAPI\n'), ((4069, 4113), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (4094, 4113), False, 'import OpenSeesAPI\n'), ((4135, 4210), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying NewtonLineSearch RegulaFalsi... \\""""'], {}), '(\'puts "Trying NewtonLineSearch RegulaFalsi... "\')\n', (4160, 4210), False, 'import OpenSeesAPI\n'), ((4232, 4282), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (4268, 4282), False, 'import OpenSeesAPI\n'), ((4302, 4364), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""RegulaFalsi"""'], {}), "('RegulaFalsi')\n", (4349, 4364), False, 'import OpenSeesAPI\n'), ((4386, 4452), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set ok [analyze %d %f ]' % (Steps, Dt))"], {}), "('set ok [analyze %d %f ]' % (Steps, Dt))\n", (4411, 4452), False, 'import OpenSeesAPI\n'), ((4471, 4501), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (4496, 4501), False, 'import OpenSeesAPI\n'), ((4687, 4731), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (4712, 4731), False, 'import OpenSeesAPI\n'), ((4753, 4842), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['(\'puts "Trying Lower Dt: %e and Tol: %e ... "\' % (Dt, Tol))'], {}), '(\'puts "Trying Lower Dt: %e and Tol: %e ... "\' % (\n    Dt, Tol))\n', (4778, 4842), False, 'import OpenSeesAPI\n'), ((4856, 4909), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Krylov... \\""""'], {}), '(\'puts "Trying Krylov... "\')\n', (4881, 4909), False, 'import OpenSeesAPI\n'), ((4931, 4983), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', '(1000)', '(2)'], {}), '(Tol, 1000, 2)\n', (4969, 4983), False, 'import OpenSeesAPI\n'), ((5077, 5135), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ([], {'MaxDim': 'MaxDim'}), '(MaxDim=MaxDim)\n', (5120, 5135), False, 'import OpenSeesAPI\n'), ((5159, 5225), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set ok [analyze %d %e ]' % (Steps, Dt))"], {}), "('set ok [analyze %d %e ]' % (Steps, Dt))\n", (5184, 5225), False, 'import OpenSeesAPI\n'), ((5244, 5274), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (5269, 5274), False, 'import OpenSeesAPI\n'), ((5433, 5483), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set conv_tol %e' % Tol)"], {}), "('set conv_tol %e' % Tol)\n", (5458, 5483), False, 'import OpenSeesAPI\n'), ((5503, 5565), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set max_iter %d;' % NoOfIterations)"], {}), "('set max_iter %d;' % NoOfIterations)\n", (5528, 5565), False, 'import OpenSeesAPI\n'), ((5585, 5637), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', '(3000)', '(0)'], {}), '(Tol, 3000, 0)\n', (5623, 5637), False, 'import OpenSeesAPI\n'), ((5971, 6015), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set dt %e;' % Dt)"], {}), "('set dt %e;' % Dt)\n", (5996, 6015), False, 'import OpenSeesAPI\n'), ((6035, 6086), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set min_dt %e;' % MinDt)"], {}), "('set min_dt %e;' % MinDt)\n", (6060, 6086), False, 'import OpenSeesAPI\n'), ((6106, 6158), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('set n_steps %d;' % Steps)"], {}), "('set n_steps %d;' % Steps)\n", (6131, 6158), False, 'import OpenSeesAPI\n'), ((6178, 6222), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set cur_step 1;"""'], {}), "('set cur_step 1;')\n", (6203, 6222), False, 'import OpenSeesAPI\n'), ((6244, 6286), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set div 10.0;"""'], {}), "('set div 10.0;')\n", (6269, 6286), False, 'import OpenSeesAPI\n'), ((6308, 6353), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set tol 1.0e-12;"""'], {}), "('set tol 1.0e-12;')\n", (6333, 6353), False, 'import OpenSeesAPI\n'), ((6524, 6583), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""while {$cur_step < $n_steps} {"""'], {}), "('while {$cur_step < $n_steps} {')\n", (6549, 6583), False, 'import OpenSeesAPI\n'), ((6605, 6667), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', 'NoOfIterations', '(0)'], {}), '(Tol, NoOfIterations, 0)\n', (6643, 6667), False, 'import OpenSeesAPI\n'), ((6779, 6827), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\talgorithm Newton;"""'], {}), "('\\talgorithm Newton;')\n", (6804, 6827), False, 'import OpenSeesAPI\n'), ((6848, 6902), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\tset ok [analyze 1 $dt];"""'], {}), "('\\tset ok [analyze 1 $dt];')\n", (6873, 6902), False, 'import OpenSeesAPI\n'), ((6923, 6969), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\tif {$ok != 0} {"""'], {}), "('\\tif {$ok != 0} {')\n", (6948, 6969), False, 'import OpenSeesAPI\n'), ((6990, 7046), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\tset dt_temp [expr $dt];"""'], {}), "('\\t\\tset dt_temp [expr $dt];')\n", (7015, 7046), False, 'import OpenSeesAPI\n'), ((7066, 7159), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\tputs "> analysis failed to converge at step $cur_step";"""'], {}), '(\n    \'\\t\\tputs "> analysis failed to converge at step $cur_step";\')\n', (7091, 7159), False, 'import OpenSeesAPI\n'), ((7174, 7236), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\tputs "> trying KrylovNewton";"""'], {}), '(\'\\t\\tputs "> trying KrylovNewton";\')\n', (7199, 7236), False, 'import OpenSeesAPI\n'), ((7256, 7342), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (["('\\t\\talgorithm KrylovNewton -maxDim %d;' % KrylovMaxDim)"], {}), "('\\t\\talgorithm KrylovNewton -maxDim %d;' %\n    KrylovMaxDim)\n", (7281, 7342), False, 'import OpenSeesAPI\n'), ((7356, 7412), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\tset ok [analyze 1 $dt];"""'], {}), "('\\t\\tset ok [analyze 1 $dt];')\n", (7381, 7412), False, 'import OpenSeesAPI\n'), ((7432, 7480), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\tif {$ok != 0} {"""'], {}), "('\\t\\tif {$ok != 0} {')\n", (7457, 7480), False, 'import OpenSeesAPI\n'), ((7500, 7545), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\tset t 0.0;"""'], {}), "('\\t\\t\\tset t 0.0;')\n", (7525, 7545), False, 'import OpenSeesAPI\n'), ((7564, 7614), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\tset mini_t 0.0;"""'], {}), "('\\t\\t\\tset mini_t 0.0;')\n", (7589, 7614), False, 'import OpenSeesAPI\n'), ((7633, 7718), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\tset dt_temp [expr round($dt/$div/$tol)*$tol];"""'], {}), "('\\t\\t\\tset dt_temp [expr round($dt/$div/$tol)*$tol];'\n    )\n", (7658, 7718), False, 'import OpenSeesAPI\n'), ((7732, 7788), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\tset mini_dt_temp 0.0;"""'], {}), "('\\t\\t\\tset mini_dt_temp 0.0;')\n", (7757, 7788), False, 'import OpenSeesAPI\n'), ((7807, 7860), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\twhile {$t < $dt} {"""'], {}), "('\\t\\t\\twhile {$t < $dt} {')\n", (7832, 7860), False, 'import OpenSeesAPI\n'), ((7879, 7941), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\tif {$dt_temp < $min_dt} {"""'], {}), "('\\t\\t\\t\\tif {$dt_temp < $min_dt} {')\n", (7904, 7941), False, 'import OpenSeesAPI\n'), ((7959, 8079), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\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    )\n', (7984, 8079), False, 'import OpenSeesAPI\n'), ((8086, 8150), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\t\tputs "<< exiting safely";"""'], {}), '(\'\\t\\t\\t\\t\\tputs "<< exiting safely";\')\n', (8111, 8150), False, 'import OpenSeesAPI\n'), ((8167, 8211), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\t\twipe;"""'], {}), "('\\t\\t\\t\\t\\twipe;')\n", (8192, 8211), False, 'import OpenSeesAPI\n'), ((8228, 8272), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\t\texit;"""'], {}), "('\\t\\t\\t\\t\\texit;')\n", (8253, 8272), False, 'import OpenSeesAPI\n'), ((8289, 8328), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\t};"""'], {}), "('\\t\\t\\t\\t};')\n", (8314, 8328), False, 'import OpenSeesAPI\n'), ((8346, 8424), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\tif {$dt_temp < [expr $dt/pow($div, 2)]} {"""'], {}), "('\\t\\t\\t\\tif {$dt_temp < [expr $dt/pow($div, 2)]} {')\n", (8371, 8424), False, 'import OpenSeesAPI\n'), ((8442, 8509), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['(Tol * 10)', 'NoOfIterations', '(0)'], {}), '(Tol * 10, NoOfIterations, 0)\n', (8480, 8509), False, 'import OpenSeesAPI\n'), ((8635, 8674), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\t};"""'], {}), "('\\t\\t\\t\\t};')\n", (8660, 8674), False, 'import OpenSeesAPI\n'), ((8692, 8757), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\tset ok [analyze 1 $dt_temp];"""'], {}), "('\\t\\t\\t\\tset ok [analyze 1 $dt_temp];')\n", (8717, 8757), False, 'import OpenSeesAPI\n'), ((8775, 8827), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\tif {$ok == 0} {"""'], {}), "('\\t\\t\\t\\tif {$ok == 0} {')\n", (8800, 8827), False, 'import OpenSeesAPI\n'), ((8845, 8935), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\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];')\n", (8870, 8935), False, 'import OpenSeesAPI\n'), ((8947, 9047), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\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];')\n", (8972, 9047), False, 'import OpenSeesAPI\n'), ((9059, 9190), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\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    )\n", (9084, 9190), False, 'import OpenSeesAPI\n'), ((9197, 9242), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\t} else {"""'], {}), "('\\t\\t\\t\\t} else {')\n", (9222, 9242), False, 'import OpenSeesAPI\n'), ((9260, 9314), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\t\tset mini_t 0.0;"""'], {}), "('\\t\\t\\t\\t\\tset mini_t 0.0;')\n", (9285, 9314), False, 'import OpenSeesAPI\n'), ((9331, 9425), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\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];')\n", (9356, 9425), False, 'import OpenSeesAPI\n'), ((9437, 9531), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\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];')\n", (9462, 9531), False, 'import OpenSeesAPI\n'), ((9543, 9582), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t\t};"""'], {}), "('\\t\\t\\t\\t};')\n", (9568, 9582), False, 'import OpenSeesAPI\n'), ((9600, 9637), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t\t};"""'], {}), "('\\t\\t\\t};')\n", (9625, 9637), False, 'import OpenSeesAPI\n'), ((9656, 9691), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t\t};"""'], {}), "('\\t\\t};')\n", (9681, 9691), False, 'import OpenSeesAPI\n'), ((9711, 9744), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t};"""'], {}), "('\\t};')\n", (9736, 9744), False, 'import OpenSeesAPI\n'), ((9765, 9821), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\tif {$cur_step % 1 == 0} {"""'], {}), "('\\tif {$cur_step % 1 == 0} {')\n", (9790, 9821), False, 'import OpenSeesAPI\n'), ((9842, 9957), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['(\'\\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)\n', (9867, 9957), False, 'import OpenSeesAPI\n'), ((9966, 9999), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\t};"""'], {}), "('\\t};')\n", (9991, 9999), False, 'import OpenSeesAPI\n'), ((10020, 10065), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""\tincr cur_step;"""'], {}), "('\\tincr cur_step;')\n", (10045, 10065), False, 'import OpenSeesAPI\n'), ((10086, 10117), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""};"""'], {}), "('};')\n", (10111, 10117), False, 'import OpenSeesAPI\n'), ((10302, 10346), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (10327, 10346), False, 'import OpenSeesAPI\n'), ((10368, 10466), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' % (StepSize, Tol))'], {}), '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' %\n    (StepSize, Tol))\n', (10393, 10466), False, 'import OpenSeesAPI\n'), ((10482, 10570), 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', (['ControlNode', '(1)', 'StepSize'], {}), '(ControlNode, 1,\n    StepSize)\n', (10540, 10570), False, 'import OpenSeesAPI\n'), ((10589, 10619), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (10614, 10619), False, 'import OpenSeesAPI\n'), ((10642, 10686), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (10667, 10686), False, 'import OpenSeesAPI\n'), ((10708, 10768), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying KrylovNewton ... \\""""'], {}), '(\'puts "Trying KrylovNewton ... "\')\n', (10733, 10768), False, 'import OpenSeesAPI\n'), ((10790, 10840), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (10826, 10840), False, 'import OpenSeesAPI\n'), ((10860, 10905), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ([], {}), '()\n', (10903, 10905), False, 'import OpenSeesAPI\n'), ((10927, 10974), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (10952, 10974), False, 'import OpenSeesAPI\n'), ((10996, 11026), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (11021, 11026), False, 'import OpenSeesAPI\n'), ((11049, 11093), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (11074, 11093), False, 'import OpenSeesAPI\n'), ((11115, 11181), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search ... \\""""'], {}), '(\'puts "Trying Newton Line Search ... "\')\n', (11140, 11181), False, 'import OpenSeesAPI\n'), ((11203, 11253), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (11239, 11253), False, 'import OpenSeesAPI\n'), ((11273, 11335), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ([], {'Tolerance': '(0.8)'}), '(Tolerance=0.8)\n', (11320, 11335), False, 'import OpenSeesAPI\n'), ((11357, 11404), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (11382, 11404), False, 'import OpenSeesAPI\n'), ((11426, 11456), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (11451, 11456), False, 'import OpenSeesAPI\n'), ((12336, 12380), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (12361, 12380), False, 'import OpenSeesAPI\n'), ((12402, 12478), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search BiSection ... \\""""'], {}), '(\'puts "Trying Newton Line Search BiSection ... "\')\n', (12427, 12478), False, 'import OpenSeesAPI\n'), ((12500, 12550), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (12536, 12550), False, 'import OpenSeesAPI\n'), ((12570, 12630), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""Bisection"""'], {}), "('Bisection')\n", (12617, 12630), False, 'import OpenSeesAPI\n'), ((12652, 12699), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (12677, 12699), False, 'import OpenSeesAPI\n'), ((12721, 12751), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (12746, 12751), False, 'import OpenSeesAPI\n'), ((12774, 12818), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (12799, 12818), False, 'import OpenSeesAPI\n'), ((12840, 12912), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search Secant... \\""""'], {}), '(\'puts "Trying Newton Line Search Secant... "\')\n', (12865, 12912), False, 'import OpenSeesAPI\n'), ((12934, 12984), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (12970, 12984), False, 'import OpenSeesAPI\n'), ((13004, 13061), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""Secant"""'], {}), "('Secant')\n", (13051, 13061), False, 'import OpenSeesAPI\n'), ((13083, 13130), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (13108, 13130), False, 'import OpenSeesAPI\n'), ((13152, 13182), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (13177, 13182), False, 'import OpenSeesAPI\n'), ((13205, 13249), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (13230, 13249), False, 'import OpenSeesAPI\n'), ((13271, 13349), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search RegulaFalsi ... \\""""'], {}), '(\'puts "Trying Newton Line Search RegulaFalsi ... "\')\n', (13296, 13349), False, 'import OpenSeesAPI\n'), ((13371, 13421), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (13407, 13421), False, 'import OpenSeesAPI\n'), ((13441, 13503), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""RegulaFalsi"""'], {}), "('RegulaFalsi')\n", (13488, 13503), False, 'import OpenSeesAPI\n'), ((13525, 13572), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (13550, 13572), False, 'import OpenSeesAPI\n'), ((13594, 13624), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (13619, 13624), False, 'import OpenSeesAPI\n'), ((13816, 13860), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (13841, 13860), False, 'import OpenSeesAPI\n'), ((13882, 13980), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' % (StepSize, Tol))'], {}), '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' %\n    (StepSize, Tol))\n', (13907, 13980), False, 'import OpenSeesAPI\n'), ((13996, 14084), 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', (['ControlNode', '(1)', 'StepSize'], {}), '(ControlNode, 1,\n    StepSize)\n', (14054, 14084), False, 'import OpenSeesAPI\n'), ((14103, 14133), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (14128, 14133), False, 'import OpenSeesAPI\n'), ((14156, 14200), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (14181, 14200), False, 'import OpenSeesAPI\n'), ((14222, 14282), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying KrylovNewton ... \\""""'], {}), '(\'puts "Trying KrylovNewton ... "\')\n', (14247, 14282), False, 'import OpenSeesAPI\n'), ((14304, 14356), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (14342, 14356), False, 'import OpenSeesAPI\n'), ((14376, 14421), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ([], {}), '()\n', (14419, 14421), False, 'import OpenSeesAPI\n'), ((14443, 14490), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (14468, 14490), False, 'import OpenSeesAPI\n'), ((14512, 14542), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (14537, 14542), False, 'import OpenSeesAPI\n'), ((14565, 14609), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (14590, 14609), False, 'import OpenSeesAPI\n'), ((14631, 14697), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search ... \\""""'], {}), '(\'puts "Trying Newton Line Search ... "\')\n', (14656, 14697), False, 'import OpenSeesAPI\n'), ((14719, 14771), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (14757, 14771), False, 'import OpenSeesAPI\n'), ((14791, 14853), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ([], {'Tolerance': '(0.8)'}), '(Tolerance=0.8)\n', (14838, 14853), False, 'import OpenSeesAPI\n'), ((14875, 14922), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (14900, 14922), False, 'import OpenSeesAPI\n'), ((14944, 14974), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (14969, 14974), False, 'import OpenSeesAPI\n'), ((14997, 15041), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (15022, 15041), False, 'import OpenSeesAPI\n'), ((15063, 15139), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search BiSection ... \\""""'], {}), '(\'puts "Trying Newton Line Search BiSection ... "\')\n', (15088, 15139), False, 'import OpenSeesAPI\n'), ((15161, 15213), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (15199, 15213), False, 'import OpenSeesAPI\n'), ((15233, 15293), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""Bisection"""'], {}), "('Bisection')\n", (15280, 15293), False, 'import OpenSeesAPI\n'), ((15315, 15362), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (15340, 15362), False, 'import OpenSeesAPI\n'), ((15384, 15414), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (15409, 15414), False, 'import OpenSeesAPI\n'), ((15437, 15481), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (15462, 15481), False, 'import OpenSeesAPI\n'), ((15503, 15575), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search Secant... \\""""'], {}), '(\'puts "Trying Newton Line Search Secant... "\')\n', (15528, 15575), False, 'import OpenSeesAPI\n'), ((15597, 15649), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (15635, 15649), False, 'import OpenSeesAPI\n'), ((15669, 15726), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""Secant"""'], {}), "('Secant')\n", (15716, 15726), False, 'import OpenSeesAPI\n'), ((15748, 15795), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (15773, 15795), False, 'import OpenSeesAPI\n'), ((15817, 15847), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (15842, 15847), False, 'import OpenSeesAPI\n'), ((15870, 15914), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (15895, 15914), False, 'import OpenSeesAPI\n'), ((15936, 16014), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search RegulaFalsi ... \\""""'], {}), '(\'puts "Trying Newton Line Search RegulaFalsi ... "\')\n', (15961, 16014), False, 'import OpenSeesAPI\n'), ((16036, 16088), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (16074, 16088), False, 'import OpenSeesAPI\n'), ((16108, 16170), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""RegulaFalsi"""'], {}), "('RegulaFalsi')\n", (16155, 16170), False, 'import OpenSeesAPI\n'), ((16192, 16239), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (16217, 16239), False, 'import OpenSeesAPI\n'), ((16261, 16291), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (16286, 16291), False, 'import OpenSeesAPI\n'), ((16432, 16476), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (16457, 16476), False, 'import OpenSeesAPI\n'), ((16498, 16596), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' % (StepSize, Tol))'], {}), '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' %\n    (StepSize, Tol))\n', (16523, 16596), False, 'import OpenSeesAPI\n'), ((16611, 16641), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (16636, 16641), False, 'import OpenSeesAPI\n'), ((16664, 16752), 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', (['ControlNode', '(1)', 'StepSize'], {}), '(ControlNode, 1,\n    StepSize)\n', (16722, 16752), False, 'import OpenSeesAPI\n'), ((16771, 16815), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (16796, 16815), False, 'import OpenSeesAPI\n'), ((16837, 16897), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying KrylovNewton ... \\""""'], {}), '(\'puts "Trying KrylovNewton ... "\')\n', (16862, 16897), False, 'import OpenSeesAPI\n'), ((16919, 16969), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', '(1000)', '(0)'], {}), '(Tol, 1000, 0)\n', (16955, 16969), False, 'import OpenSeesAPI\n'), ((16989, 17034), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ([], {}), '()\n', (17032, 17034), False, 'import OpenSeesAPI\n'), ((17056, 17103), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (17081, 17103), False, 'import OpenSeesAPI\n'), ((17125, 17155), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (17150, 17155), False, 'import OpenSeesAPI\n'), ((17314, 17358), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (17339, 17358), False, 'import OpenSeesAPI\n'), ((17380, 17478), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' % (StepSize, Tol))'], {}), '(\'puts "Trying Smaller Step: %f and Tol: %f ... "\' %\n    (StepSize, Tol))\n', (17405, 17478), False, 'import OpenSeesAPI\n'), ((17493, 17523), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (17518, 17523), False, 'import OpenSeesAPI\n'), ((17546, 17634), 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', 'OpenSeesAPI.Analysis.Integrator.Static.DisplacementControl', (['ControlNode', '(1)', 'StepSize'], {}), '(ControlNode, 1,\n    StepSize)\n', (17604, 17634), False, 'import OpenSeesAPI\n'), ((17653, 17697), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (17678, 17697), False, 'import OpenSeesAPI\n'), ((17719, 17779), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying KrylovNewton ... \\""""'], {}), '(\'puts "Trying KrylovNewton ... "\')\n', (17744, 17779), False, 'import OpenSeesAPI\n'), ((17801, 17863), 'OpenSeesAPI.Analysis.Test.NormDispIncr', 'OpenSeesAPI.Analysis.Test.NormDispIncr', (['Tol', 'NoOfIterations', '(2)'], {}), '(Tol, NoOfIterations, 2)\n', (17839, 17863), False, 'import OpenSeesAPI\n'), ((17883, 17928), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ([], {}), '()\n', (17926, 17928), False, 'import OpenSeesAPI\n'), ((17950, 17997), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (17975, 17997), False, 'import OpenSeesAPI\n'), ((18019, 18049), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (18044, 18049), False, 'import OpenSeesAPI\n'), ((18161, 18205), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (18186, 18205), False, 'import OpenSeesAPI\n'), ((18227, 18287), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying KrylovNewton ... \\""""'], {}), '(\'puts "Trying KrylovNewton ... "\')\n', (18252, 18287), False, 'import OpenSeesAPI\n'), ((18309, 18359), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', 'Iter', '(0)'], {}), '(Tol, Iter, 0)\n', (18345, 18359), False, 'import OpenSeesAPI\n'), ((18379, 18424), 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', 'OpenSeesAPI.Analysis.Algorithm.KrylovNewton', ([], {}), '()\n', (18422, 18424), False, 'import OpenSeesAPI\n'), ((18446, 18493), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (18471, 18493), False, 'import OpenSeesAPI\n'), ((18515, 18545), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (18540, 18545), False, 'import OpenSeesAPI\n'), ((18568, 18612), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (18593, 18612), False, 'import OpenSeesAPI\n'), ((18634, 18700), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search ... \\""""'], {}), '(\'puts "Trying Newton Line Search ... "\')\n', (18659, 18700), False, 'import OpenSeesAPI\n'), ((18722, 18772), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', 'Iter', '(0)'], {}), '(Tol, Iter, 0)\n', (18758, 18772), False, 'import OpenSeesAPI\n'), ((18792, 18854), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', ([], {'Tolerance': '(0.8)'}), '(Tolerance=0.8)\n', (18839, 18854), False, 'import OpenSeesAPI\n'), ((18876, 18923), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (18901, 18923), False, 'import OpenSeesAPI\n'), ((18945, 18975), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (18970, 18975), False, 'import OpenSeesAPI\n'), ((18998, 19042), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (19023, 19042), False, 'import OpenSeesAPI\n'), ((19064, 19140), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search BiSection ... \\""""'], {}), '(\'puts "Trying Newton Line Search BiSection ... "\')\n', (19089, 19140), False, 'import OpenSeesAPI\n'), ((19162, 19212), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', 'Iter', '(0)'], {}), '(Tol, Iter, 0)\n', (19198, 19212), False, 'import OpenSeesAPI\n'), ((19232, 19292), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""Bisection"""'], {}), "('Bisection')\n", (19279, 19292), False, 'import OpenSeesAPI\n'), ((19314, 19361), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (19339, 19361), False, 'import OpenSeesAPI\n'), ((19383, 19413), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (19408, 19413), False, 'import OpenSeesAPI\n'), ((19436, 19480), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (19461, 19480), False, 'import OpenSeesAPI\n'), ((19502, 19574), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search Secant... \\""""'], {}), '(\'puts "Trying Newton Line Search Secant... "\')\n', (19527, 19574), False, 'import OpenSeesAPI\n'), ((19596, 19646), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', 'Iter', '(0)'], {}), '(Tol, Iter, 0)\n', (19632, 19646), False, 'import OpenSeesAPI\n'), ((19666, 19723), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""Secant"""'], {}), "('Secant')\n", (19713, 19723), False, 'import OpenSeesAPI\n'), ((19745, 19792), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (19770, 19792), False, 'import OpenSeesAPI\n'), ((19814, 19844), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (19839, 19844), False, 'import OpenSeesAPI\n'), ((19867, 19911), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""if {$ok != 0} {"""'], {}), "('if {$ok != 0} {')\n", (19892, 19911), False, 'import OpenSeesAPI\n'), ((19933, 20011), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""puts "Trying Newton Line Search RegulaFalsi ... \\""""'], {}), '(\'puts "Trying Newton Line Search RegulaFalsi ... "\')\n', (19958, 20011), False, 'import OpenSeesAPI\n'), ((20033, 20083), 'OpenSeesAPI.Analysis.Test.EnergyIncr', 'OpenSeesAPI.Analysis.Test.EnergyIncr', (['Tol', 'Iter', '(0)'], {}), '(Tol, Iter, 0)\n', (20069, 20083), False, 'import OpenSeesAPI\n'), ((20103, 20165), 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', 'OpenSeesAPI.Analysis.Algorithm.NewtonLineSearch', (['"""RegulaFalsi"""'], {}), "('RegulaFalsi')\n", (20150, 20165), False, 'import OpenSeesAPI\n'), ((20187, 20234), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""set ok [analyze 1]"""'], {}), "('set ok [analyze 1]')\n", (20212, 20234), False, 'import OpenSeesAPI\n'), ((20256, 20286), 'OpenSeesAPI.TCL.TCLScript', 'OpenSeesAPI.TCL.TCLScript', (['"""}"""'], {}), "('}')\n", (20281, 20286), False, 'import OpenSeesAPI\n')]