Skip to content

Commit

Permalink
invalid initialization of non-const reference of type ‘Vector&’ from …
Browse files Browse the repository at this point in the history
…an rvalue of type ‘Vector’
  • Loading branch information
MassimoPetracca committed Oct 6, 2021
1 parent 5a8fc24 commit 2e2210a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions SRC/element/truss/InertiaTruss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,10 +916,12 @@ InertiaTruss::getResponse(int responseID, Information &eleInfo)
double strain;
const Vector& acc1 = theNodes[0]->getAccel();
const Vector& acc2 = theNodes[1]->getAccel();
Vector& toret = acc1 - acc2;
fVec2(0) = toret(0);
fVec2(1) = toret(1);
fVec2(2) = toret(2);
//Vector& toret = acc1 - acc2;
//fVec2(0) = toret(0);
//fVec2(1) = toret(1);
//fVec2(2) = toret(2);
fVec2.addVector(0.0, acc1, 1.0);
fVec2.addVector(1.0, acc2, -1.0);
switch (responseID) {
case 1:
return eleInfo.setVector(fVec2);
Expand Down

0 comments on commit 2e2210a

Please sign in to comment.