Skip to content
Snippets Groups Projects
Commit d10e929c authored by Elias Pipping's avatar Elias Pipping
Browse files

[Extern] fassign is gone; use initialiser lists

parent bcb67c06
No related branches found
No related tags found
No related merge requests found
......@@ -11,24 +11,6 @@ namespace {
using LocalMatrix2D = Dune::FieldMatrix<double, 2, 2>;
using LocalVector = Dune::FieldVector<double, MY_DIM>;
// kludge because fieldvectors have no initialiser_list constructor, see
// https://dune-project.org/flyspray/index.php?do=details&task_id=1166
LocalVector2D createVector(double x, double y) {
LocalVector2D ret(0);
ret[0] = x;
ret[1] = y;
return ret;
}
LocalMatrix2D createMatrix(double a11, double a12, double a21, double a22) {
LocalMatrix2D ret(0);
ret[0][0] = a11;
ret[0][1] = a12;
ret[1][0] = a21;
ret[1][1] = a22;
return ret;
}
}
namespace reference {
......@@ -42,33 +24,31 @@ namespace reference {
double const zDistance = 0.35;
LocalVector2D const A = createVector(0, 0);
LocalVector2D const B = createVector(leftLeg, -rightLeg);
LocalVector2D const C = createVector(leftLeg, 0);
LocalVector2D const A = {0, 0};
LocalVector2D const B = {leftLeg, -rightLeg};
LocalVector2D const C = {leftLeg, 0};
LocalVector2D const Z = createVector(zDistance * s, 0);
LocalVector2D const Y =
createVector(zDistance * s, -zDistance *s / leftLeg * rightLeg);
LocalVector2D const X = createVector(Y[0] - weakLen * std::cos(leftAngle),
Y[1] + weakLen * std::sin(leftAngle));
LocalVector2D const Z = {zDistance * s, 0};
LocalVector2D const Y = {zDistance * s, -zDistance *s / leftLeg *rightLeg};
LocalVector2D const X = {Y[0] - weakLen * std::cos(leftAngle),
Y[1] + weakLen *std::sin(leftAngle)};
LocalVector2D const U = createVector(X[0], 0);
LocalVector2D const U = {X[0], 0};
LocalVector2D const K =
createVector(B[0] - leftLeg * viscoHeight / rightLeg, B[1] + viscoHeight);
LocalVector2D const M = createVector(B[0], B[1] + viscoHeight);
LocalVector2D const K = {B[0] - leftLeg * viscoHeight / rightLeg,
B[1] + viscoHeight};
LocalVector2D const M = {B[0], B[1] + viscoHeight};
LocalVector2D const G = midPoint(A, X);
LocalVector2D const H = midPoint(X, Y);
LocalVector2D const J = midPoint(Y, B);
LocalVector2D const I = createVector(Y[0] + G[0], Y[1] + G[1]);
LocalVector2D const I = {Y[0] + G[0], Y[1] + G[1]};
LocalVector2D const zenith = createVector(0, 1);
LocalVector2D const zenith = {0, 1};
LocalMatrix2D const rotation =
createMatrix(std::cos(leftAngle), -std::sin(leftAngle),
std::sin(leftAngle), std::cos(leftAngle));
LocalMatrix2D const rotation = {{std::cos(leftAngle), -std::sin(leftAngle)},
{std::sin(leftAngle), std::cos(leftAngle)}};
}
namespace {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment