o3seespy.test¶
- class o3seespy.command.test.EnergyIncr(osi, tol, max_iter, p_flag=0, n_type=2)[source]¶
Bases:
TestBaseThe EnergyIncr Test Class
Create a EnergyIncr test, which uses the dot product of the solution vector and norm of the right hand side of the matrix equation to determine if convergence has been reached.
Initial method for EnergyIncr
- Parameters
osi (o3seespy.OpenSeesInstance) –
tol (float) – Tolerance criteria used to check for convergence.
max_iter (int) – Max number of iterations to check
p_flag (int, optional) – Print flag : * 0 print nothing. * 1 print information on norms each time
test()is invoked. * 2 print information on norms and number of iterations at end of successful test. * 4 at each step it will print the norms and also the
and
vectors. * 5 if it fails to converge at end of numiterit will print an error message but return a successfull test.n_type (int, optional) – Type of norm, (0 = max-norm, 1 = 1-norm, 2 = 2-norm).
Examples
>>> import o3seespy as o3 >>> osi = o3.OpenSeesInstance(ndm=2) >>> o3.test.EnergyIncr(osi, tol=1.0, max_iter=1, p_flag=0, n_type=2)
- op_type = 'EnergyIncr'¶
- class o3seespy.command.test.FixedNumIter(osi, max_iter, p_flag=0, n_type=2)[source]¶
Bases:
TestBaseThe FixedNumIter Test Class
Create a FixedNumIter test, that performs a fixed number of iterations without testing for convergence.
Initial method for FixedNumIter
- Parameters
osi (o3seespy.OpenSeesInstance) –
max_iter (int) – Max number of iterations to check
p_flag (int, optional) – Print flag : * 0 print nothing. * 1 print information on norms each time
test()is invoked. * 2 print information on norms and number of iterations at end of successful test. * 4 at each step it will print the norms and also the
and
vectors. * 5 if it fails to converge at end of numiterit will print an error message but return a successfull test.n_type (int, optional) – Type of norm, (0 = max-norm, 1 = 1-norm, 2 = 2-norm).
Examples
>>> import o3seespy as o3 >>> osi = o3.OpenSeesInstance(ndm=2) >>> o3.test.FixedNumIter(osi, max_iter=1, p_flag=0, n_type=2)
- op_type = 'FixedNumIter'¶
- class o3seespy.command.test.NormDispAndUnbalance(osi, tol_incr, tol_r, max_iter, p_flag=0, n_type=2, max_incr=None)[source]¶
Bases:
TestBaseThe NormDispAndUnbalance Test Class
Create a NormDispAndUnbalance test, which check if both
Initial method for NormDispAndUnbalance
- Parameters
osi (o3seespy.OpenSeesInstance) –
tol_incr (float) – Tolerance for right hand residual
tol_r (float) –
max_iter (int) – Max number of iterations to check
p_flag (int, optional) – Print flag : * 0 print nothing. * 1 print information on norms each time
test()is invoked. * 2 print information on norms and number of iterations at end of successful test. * 4 at each step it will print the norms and also the
and
vectors. * 5 if it fails to converge at end of numiterit will print an error message but return a successfull test.n_type (int, optional) – Type of norm, (0 = max-norm, 1 = 1-norm, 2 = 2-norm).
max_incr (int, optional) – Maximum times of error increasing.
Examples
>>> import o3seespy as o3 >>> osi = o3.OpenSeesInstance(ndm=2) >>> o3.test.NormDispAndUnbalance(osi, tol_incr=1.0, tol_r=1, max_iter=1, p_flag=0, n_type=2)
- op_type = 'NormDispAndUnbalance'¶
- class o3seespy.command.test.NormDispIncr(osi, tol, max_iter, p_flag=0, n_type=2)[source]¶
Bases:
TestBaseThe NormDispIncr Test Class
Create a NormUnbalance test, which uses the norm of the left hand side solution vector of the matrix equation to determine if convergence has been reached.
Initial method for NormDispIncr
- Parameters
osi (o3seespy.OpenSeesInstance) –
tol (float) – Tolerance criteria used to check for convergence.
max_iter (int) – Max number of iterations to check
p_flag (int, optional) – Print flag : * 0 print nothing. * 1 print information on norms each time
test()is invoked. * 2 print information on norms and number of iterations at end of successful test. * 4 at each step it will print the norms and also the
and
vectors. * 5 if it fails to converge at end of numiterit will print an error message but return a successfull test.n_type (int, optional) – Type of norm, (0 = max-norm, 1 = 1-norm, 2 = 2-norm).
Examples
>>> import o3seespy as o3 >>> osi = o3.OpenSeesInstance(ndm=2) >>> o3.test.NormDispIncr(osi, tol=1.0, max_iter=1, p_flag=0, n_type=2)
- op_type = 'NormDispIncr'¶
- class o3seespy.command.test.NormDispOrUnbalance(osi, tol_incr, tol_r, max_iter, p_flag=0, n_type=2, maxincr=-1)[source]¶
Bases:
TestBaseThe NormDispOrUnbalance Test Class
Create a NormDispOrUnbalance test, which check if both
Initial method for NormDispOrUnbalance
- Parameters
osi (o3seespy.OpenSeesInstance) –
tol_incr (float) – Tolerance for right hand residual
tol_r (None) –
max_iter (int) – Max number of iterations to check
p_flag (int, optional) – Print flag : * 0 print nothing. * 1 print information on norms each time
test()is invoked. * 2 print information on norms and number of iterations at end of successful test. * 4 at each step it will print the norms and also the
and
vectors. * 5 if it fails to converge at end of numiterit will print an error message but return a successfull test.n_type (int, optional) – Type of norm, (0 = max-norm, 1 = 1-norm, 2 = 2-norm).
maxincr (int, optional) – Maximum times of error increasing.
Examples
>>> import o3seespy as o3 >>> osi = o3.OpenSeesInstance(ndm=2) >>> o3.test.NormDispOrUnbalance(osi, tol_incr=1.0, tol_r=1, max_iter=1, p_flag=0, n_type=2, maxincr=-1)
- op_type = 'NormDispOrUnbalance'¶
- class o3seespy.command.test.NormUnbalance(osi, tol, max_iter, p_flag=0, n_type=2, max_incr: Optional[float] = None)[source]¶
Bases:
TestBaseThe NormUnbalance Test Class
Create a NormUnbalance test, which uses the norm of the right hand side of the matrix equation to determine if convergence has been reached.
Initial method for NormUnbalance
- Parameters
osi (o3seespy.OpenSeesInstance) –
tol (float) – Tolerance criteria used to check for convergence.
max_iter (int) – Max number of iterations to check
p_flag (int, optional) – Print flag : * 0 print nothing. * 1 print information on norms each time
test()is invoked. * 2 print information on norms and number of iterations at end of successful test. * 4 at each step it will print the norms and also the
and
vectors. * 5 if it fails to converge at end of numiterit will print an error message but return a successfull test.n_type (int, optional) – Type of norm, (0 = max-norm, 1 = 1-norm, 2 = 2-norm).
max_incr (int (default=True), optional) – Maximum times of error increasing.
Examples
>>> import o3seespy as o3 >>> osi = o3.OpenSeesInstance(ndm=2) >>> o3.test.NormUnbalance(osi, tol=1.0, max_iter=1, p_flag=0, n_type=2, max_incr=None)
- op_type = 'NormUnbalance'¶
- class o3seespy.command.test.RelativeEnergyIncr(osi, tol, max_iter, p_flag=0, n_type=2)[source]¶
Bases:
TestBaseThe RelativeEnergyIncr Test Class
Create a RelativeEnergyIncr test, which uses the relative dot product of the solution vector and norm of the right hand side of the matrix equation to determine if convergence has been reached.
Initial method for RelativeEnergyIncr
- Parameters
osi (o3seespy.OpenSeesInstance) –
tol (float) – Tolerance criteria used to check for convergence.
max_iter (int) – Max number of iterations to check
p_flag (int, optional) – Print flag : * 0 print nothing. * 1 print information on norms each time
test()is invoked. * 2 print information on norms and number of iterations at end of successful test. * 4 at each step it will print the norms and also the
and
vectors. * 5 if it fails to converge at end of numiterit will print an error message but return a successfull test.n_type (int, optional) – Type of norm, (0 = max-norm, 1 = 1-norm, 2 = 2-norm).
Examples
>>> import o3seespy as o3 >>> osi = o3.OpenSeesInstance(ndm=2) >>> o3.test.RelativeEnergyIncr(osi, tol=1.0, max_iter=1, p_flag=0, n_type=2)
- op_type = 'RelativeEnergyIncr'¶
- class o3seespy.command.test.RelativeNormDispIncr(osi, tol, max_iter, p_flag=0, n_type=2)[source]¶
Bases:
TestBaseThe RelativeNormDispIncr Test Class
Create a RelativeNormDispIncr test, which uses the relative of the solution vector of the matrix equation to determine if convergence has been reached.
Initial method for RelativeNormDispIncr
- Parameters
osi (o3seespy.OpenSeesInstance) –
tol (float) – Tolerance criteria used to check for convergence.
max_iter (int) –
Max number of iterations to check p_flag: int
Print flag (optional): * 0 print nothing. * 1 print information on norms each time
test()is invoked. * 2 print information on norms and number of iterations at end of successful test. * 4 at each step it will print the norms and also the
and
vectors.
* 5 if it fails to converge at end of numiterit will print an error message but return a successfull test.
n_type (int, optional) – Type of norm, (0 = max-norm, 1 = 1-norm, 2 = 2-norm).
Examples
>>> import o3seespy as o3 >>> osi = o3.OpenSeesInstance(ndm=2) >>> o3.test.RelativeNormDispIncr(osi, tol=1.0, max_iter=1, p_flag=0, n_type=2)
- op_type = 'RelativeNormDispIncr'¶
- class o3seespy.command.test.RelativeNormUnbalance(osi, tol, max_iter, p_flag=0, n_type=2)[source]¶
Bases:
TestBaseThe RelativeNormUnbalance Test Class
Create a RelativeNormUnbalance test, which uses the relative norm of the right hand side of the matrix equation to determine if convergence has been reached.
Initial method for RelativeNormUnbalance
- Parameters
osi (o3seespy.OpenSeesInstance) –
tol (float) – Tolerance criteria used to check for convergence.
max_iter (int) – Max number of iterations to check
p_flag (int, optional) – Print flag : * 0 print nothing. * 1 print information on norms each time
test()is invoked. * 2 print information on norms and number of iterations at end of successful test. * 4 at each step it will print the norms and also the
and
vectors. * 5 if it fails to converge at end of numiterit will print an error message but return a successfull test.n_type (int, optional) – Type of norm, (0 = max-norm, 1 = 1-norm, 2 = 2-norm).
Examples
>>> import o3seespy as o3 >>> osi = o3.OpenSeesInstance(ndm=2) >>> o3.test.RelativeNormUnbalance(osi, tol=1.0, max_iter=1, p_flag=0, n_type=2)
- op_type = 'RelativeNormUnbalance'¶
- class o3seespy.command.test.RelativeTotalNormDispIncr(osi, tol, max_iter, p_flag=0, n_type=2)[source]¶
Bases:
TestBaseThe RelativeTotalNormDispIncr Test Class
Create a RelativeTotalNormDispIncr test, which uses the ratio of the current norm to the total norm (the sum of all the norms since last convergence) of the solution vector.
Initial method for RelativeTotalNormDispIncr
- Parameters
osi (o3seespy.OpenSeesInstance) –
tol (float) – Tolerance criteria used to check for convergence.
max_iter (int) – Max number of iterations to check
p_flag (int, optional) – Print flag : * 0 print nothing. * 1 print information on norms each time
test()is invoked. * 2 print information on norms and number of iterations at end of successful test. * 4 at each step it will print the norms and also the
and
vectors. * 5 if it fails to converge at end of numiterit will print an error message but return a successfull test.n_type (int, optional) – Type of norm, (0 = max-norm, 1 = 1-norm, 2 = 2-norm).
Examples
>>> import o3seespy as o3 >>> osi = o3.OpenSeesInstance(ndm=2) >>> o3.test.RelativeTotalNormDispIncr(osi, tol=1.0, max_iter=1, p_flag=0, n_type=2)
- op_type = 'RelativeTotalNormDispIncr'¶