diff --git a/dune/microstructure/CorrectorComputer.hh b/dune/microstructure/CorrectorComputer.hh index e2864169e49bb6362de64613e8fc49a71a572d15..762125683373d21057d427b7c73397f7168da99e 100644 --- a/dune/microstructure/CorrectorComputer.hh +++ b/dune/microstructure/CorrectorComputer.hh @@ -1300,6 +1300,9 @@ public: auto localfun_3 = localFunction(GVFunc_3); const std::array<decltype(localfun_1)*,3> phiDerContainer = {&localfun_1 , &localfun_2 , &localfun_3 }; + auto localIndicatorFunction = material_.getLocalIndicatorFunction(); + + auto muGridF = makeGridViewFunction(mu_, basis_.gridView()); auto mu = localFunction(muGridF); @@ -1338,6 +1341,7 @@ public: DerPhi2.bind(e); mu.bind(e); lambda.bind(e); + localIndicatorFunction.bind(e); double elementEnergy = 0.0; //double elementEnergy_HP = 0.0; @@ -1372,7 +1376,8 @@ public: auto tmp = G + *mContainer[a] + strain1; - double energyDensity = linearizedStVenantKirchhoffDensity(mu(quadPos), lambda(quadPos), tmp, Chi); + double energyDensity= scalarProduct(material_.ElasticityTensor(tmp,localIndicatorFunction(quadPos)),sym(Chi)); + // double energyDensity = linearizedStVenantKirchhoffDensity(mu(quadPos), lambda(quadPos), tmp, Chi); elementEnergy += energyDensity * quadPoint.weight() * integrationElement; // elementEnergy += strain1 * quadPoint.weight() * integrationElement;