diff --git a/dune/microstructure/matrix_operations.hh b/dune/microstructure/matrix_operations.hh index 83fd5a72b2942f836bc0b1a903397584d7dea20a..1796b1b2ffcf1686ba58b552c376b7d38331f20f 100644 --- a/dune/microstructure/matrix_operations.hh +++ b/dune/microstructure/matrix_operations.hh @@ -9,13 +9,6 @@ namespace MatrixOperations { using std::sin; using std::cos; - static MatrixRT Id (){ - MatrixRT Id(0); - for (int i=0;i<3;i++) - Id[i][i]=1.0; - return Id; - } - // static MatrixRT sym (MatrixRT M) { // 1/2 (M^T + M) // MatrixRT ret(0); // for (int i = 0; i< 3; i++) @@ -168,7 +161,7 @@ namespace MatrixOperations { // // static double linearizedStVenantKirchhoffDensity(double mu, double lambda, MatrixRT E1, MatrixRT E2) // CHANGED { - auto t1 = 2.0 * mu * sym(E1) + lambda * trace(sym(E1)) * Id(); + auto t1 = 2.0 * mu * sym(E1) + MatrixRT(Dune::ScaledIdentityMatrix<double,3>(lambda * trace(sym(E1)))); auto tmp1 = scalarProduct(t1,sym(E2)); // auto tmp1 = scalarProduct(t1,E2); // auto t2 = 2.0 * mu * sym(E2) + lambda * trace(sym(E2)) * Id();