Commit 2b52e62c authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

pass matrices via reference to silence compiler errors

How did this every worked?
parent 25c36d2e
......@@ -58,8 +58,8 @@ namespace DPsim {
double getTime() { return mTime; }
double getFinalTime() { return mFinalTime; }
Matrix getLeftSideVector() { return mSystemModel.getLeftSideVector(); }
Matrix getRightSideVector() { return mSystemModel.getRightSideVector(); }
Matrix & getLeftSideVector() { return mSystemModel.getLeftSideVector(); }
Matrix & getRightSideVector() { return mSystemModel.getRightSideVector(); }
Matrix getSystemMatrix() { return mSystemModel.getCurrentSystemMatrix(); }
int stepGeneratorTest(Logger& logger, Logger& leftSideVectorLog, Logger& rightSideVectorLog,
BaseComponent* generator, Logger& synGenLogFlux, Logger& synGenLogVolt, Logger& synGenLogCurr, Real fieldVoltage, Real mechPower,
......
......@@ -45,10 +45,10 @@ namespace DPsim {
void initialize(Int numNodes, Int numIdealVS);
void addSystemMatrix(Matrix systemMatrix);
Matrix getCurrentSystemMatrix() { return mSystemMatrix; }
Matrix getLUdecomp() { return mLuFactored.matrixLU(); }
Matrix getRightSideVector() { return mRightSideVector; }
Matrix getLeftSideVector() { return mLeftSideVector; }
Matrix & getCurrentSystemMatrix() { return mSystemMatrix; }
const Matrix & getLUdecomp() { return mLuFactored.matrixLU(); }
Matrix & getRightSideVector() { return mRightSideVector; }
Matrix & getLeftSideVector() { return mLeftSideVector; }
Real getTimeStep() { return mTimeStep; }
Real getOmega() { return mSystemOmega; }
Int getCompOffset() { return mCompOffset; }
......
  • I am wondering why I had to change this part here.

    • Eigen: 3.2.10 on Fedora 25.

    I think we should usually pass all matrices as a (const) reference.

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment