void GradDpElement :: computeStressVectorAndLocalCumulatedStrain(FloatArray &answer, double localCumulatedStrain, GaussPoint *gp, TimeStep *tStep) { NLStructuralElement *elem = this->giveNLStructuralElement(); double nlCumulatedStrain; int nlGeo = elem->giveGeometryMode(); StructuralCrossSection *cs = elem->giveStructuralCrossSection(); GradDpMaterialExtensionInterface *dpmat = static_cast< GradDpMaterialExtensionInterface * >( cs->giveMaterialInterface(GradDpMaterialExtensionInterfaceType, gp) ); if ( !dpmat ) { OOFEM_ERROR("Material doesn't implement the required DpGrad interface!"); } this->computeNonlocalCumulatedStrain(nlCumulatedStrain, gp, tStep); if ( nlGeo == 0 ) { FloatArray Epsilon; this->computeLocalStrainVector(Epsilon, gp, tStep); dpmat->giveRealStressVectorGrad(answer, localCumulatedStrain, gp, Epsilon, nlCumulatedStrain, tStep); } else if ( nlGeo == 1 ) { if ( elem->giveDomain()->giveEngngModel()->giveFormulation() == TL ) { FloatArray vF; this->computeDeformationGradientVector(vF, gp, tStep); dpmat->giveFirstPKStressVectorGrad(answer, localCumulatedStrain, gp, vF, nlCumulatedStrain, tStep); } else { FloatArray vF; this->computeDeformationGradientVector(vF, gp, tStep); dpmat->giveCauchyStressVectorGrad(answer, localCumulatedStrain, gp, vF, nlCumulatedStrain, tStep); } } }