int M1Material :: giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) { M1MaterialStatus *status = static_cast< M1MaterialStatus * >( this->giveStatus(gp) ); if ( type == IST_PlasticStrainTensor ) { FloatArray plasticStrain(3); plasticStrain.zero(); FloatArray sigmaN = status->giveTempNormalMplaneStresses(); FloatArray strain = status->giveTempStrainVector(); double Exx, Eyy, Gamma; Exx = Eyy = Gamma = 0.; if ( sigmaN.giveSize() == nmp ) { for ( int imp = 1; imp <= nmp; imp++ ) { double epsN = 0.; for ( int i = 1; i <= 3; i++ ) { epsN += strain.at(i) * N.at(imp, i); } double epsNpl = epsN - sigmaN.at(imp) / EN; double aux = epsNpl * mw.at(imp); Exx += aux * N.at(imp, 1); Eyy += aux * N.at(imp, 2); Gamma += aux * N.at(imp, 3); } } plasticStrain.at(1) = 1.5 * Exx - 0.5 * Eyy; plasticStrain.at(2) = -0.5 * Exx + 1.5 * Eyy; plasticStrain.at(3) = 4. * Gamma; StructuralMaterial :: giveFullSymVectorForm( answer, plasticStrain, gp->giveMaterialMode() ); return 1; } else { return StructuralMaterial :: giveIPValue(answer, gp, type, tStep); } }