Skip to content

Commit

Permalink
Delete doubled function reorderRSF2
Browse files Browse the repository at this point in the history
  • Loading branch information
tobolar committed May 15, 2024
1 parent 5362fbe commit 6216caf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 42 deletions.
9 changes: 8 additions & 1 deletion LinearSystems2TestConversion3.mo
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ package LinearSystems2TestConversion3
"Rectangular matrix with orthonormal columns such that Q*R=A[:,p]";
output Real R[size(A, 2),size(A, 2)] "Square upper triangular matrix";
output Integer p[size(A, 2)] "Column permutation vector";
output Real To[size(S, 1),size(S, 2)] "Reordered Schur form";
output Real Qo[size(S, 1),size(S, 2)] "Reordered Schur vectors";
output Real wr[size(S, 2)] "Reordered eigenvalues, real part";
output Real wi[size(S, 2)] "Reordered eigenvalues, imaginary part";

protected
Real A[3,3] = [1, 0, 0; 6, 5, 0; 1, -2, 2] "Square matrix";
Expand All @@ -323,7 +327,8 @@ package LinearSystems2TestConversion3

Real QZ[size(A, 1),size(A, 2)];
Real alphaReal[size(A, 1)] "Real part of eigenvalue=alphaReal+i*alphaImag";
Real alphaImag[size(A, 1)] "Imaginary part of eigenvalue=(alphaReal+i*alphaImag";
Real alphaImag[size(A, 1)] "Imaginary part of eigenvalue=alphaReal+i*alphaImag";
Real alpha=-1e10 "Maximum admissible value for real parts of the eigenvalues of A which will not be modified by the eigenvalue assignment algorithm";

Real Als[:,:] = [-1.0, 0.0, 0.0; 0.0, -2.0, 0.0; 0.0, 0.0, -3.0];
Real Bls[:,:] = [1.0; 1.0; 0.0];
Expand Down Expand Up @@ -351,6 +356,8 @@ package LinearSystems2TestConversion3
n := Modelica_LinearSystems2.Math.Matrices.norm(A);
Z := Modelica_LinearSystems2.Math.Matrices.nullspace(A);
(S, QZ, alphaReal, alphaImag) := Modelica_LinearSystems2.Math.Matrices.rsf2(A);
(S, QZ, alphaReal, alphaImag) := Modelica_LinearSystems2.Math.Matrices.Internal.reorderRSF2(
S, identity(size(S, 1)), alphaReal, alphaImag, alpha);
rcond := Modelica_LinearSystems2.Math.Matrices.rcond(A);
x := Modelica_LinearSystems2.Math.Matrices.solve(A, b1);
X := Modelica_LinearSystems2.Math.Matrices.solve2(A, B);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ symMatMul
symMatMul_C
solveSymRight
solveSymRight_C
reorderRSF2
solve2rSym
solve2rSym_C
38 changes: 0 additions & 38 deletions Modelica_LinearSystems2/Math/Matrices/Internal/reorderRSF2.mo

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,14 @@ convertClass({"Modelica_LinearSystems2.Math.Matrices.Internal.dgeqp3_workdim",
"Modelica_LinearSystems2.Math.Matrices.Internal.dgeqrf_workdim",
"Modelica_LinearSystems2.Math.Matrices.Internal.dhseqr_workdim",
"Modelica_LinearSystems2.Math.Matrices.Internal.QR",
"Modelica_LinearSystems2.Math.Matrices.Internal.QR2"},
"Modelica_LinearSystems2.Math.Matrices.Internal.QR2",
"Modelica_LinearSystems2.Math.Matrices.Internal.reorderRSF2"},
{"ObsoleteLinearSystems2.Math.Matrices.Internal.dgeqp3_workdim",
"ObsoleteLinearSystems2.Math.Matrices.Internal.dgeqrf_workdim",
"ObsoleteLinearSystems2.Math.Matrices.Internal.dhseqr_workdim",
"Modelica.Math.Matrices.QR",
"ObsoleteLinearSystems2.Math.Matrices.Internal.QR2"});
"ObsoleteLinearSystems2.Math.Matrices.Internal.QR2",
"Modelica_LinearSystems2.Math.Matrices.Internal.reorderRSFc"});

// Polynomial
//
Expand Down

0 comments on commit 6216caf

Please sign in to comment.