Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete class MatrixUtil #1136

Merged
merged 10 commits into from
Dec 6, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.powsybl.math.matrix.DenseMatrix;
import com.powsybl.openloadflow.util.Fortescue;
import com.powsybl.openloadflow.util.Fortescue.SequenceType;
import com.powsybl.openloadflow.util.MatrixUtil;

/**
* This class is made to build and access the admittance terms that will be used to fill up the Jacobian :
Expand Down Expand Up @@ -212,15 +211,15 @@ private static DenseMatrix buildTwoBlocsMatrix(DenseMatrix m66) {
}

private static void cancelComponentMatrix(DenseMatrix m, int component) {
MatrixUtil.resetRow(m, 2 * component - 2);
MatrixUtil.resetRow(m, 2 * component - 1);
MatrixUtil.resetRow(m, 2 * component + 4);
MatrixUtil.resetRow(m, 2 * component + 5);

MatrixUtil.resetColumn(m, 2 * component - 2);
MatrixUtil.resetColumn(m, 2 * component - 1);
MatrixUtil.resetColumn(m, 2 * component + 4);
MatrixUtil.resetColumn(m, 2 * component + 5);
m.resetRow(2 * component - 2);
m.resetRow(2 * component - 1);
m.resetRow(2 * component + 4);
m.resetRow(2 * component + 5);

m.resetColumn(2 * component - 2);
m.resetColumn(2 * component - 1);
m.resetColumn(2 * component + 4);
m.resetColumn(2 * component + 5);
}

private static void add22Bloc(double mx, double my, int i, int j, DenseMatrix m) {
Expand All @@ -235,7 +234,7 @@ private static DenseMatrix productMatrixM1M2M3(DenseMatrix m1, DenseMatrix m2, D
DenseMatrix mResult = m1.times(m2M3);

// clean matrix (reset to zero very low values) in case after fortescue and inverse multiplication
MatrixUtil.clean(mResult, EPS_VALUE);
mResult.removeSmallValues(EPS_VALUE);

return mResult;
}
Expand Down
45 changes: 0 additions & 45 deletions src/main/java/com/powsybl/openloadflow/util/MatrixUtil.java

This file was deleted.

Loading