diff --git a/applications/GeoMechanicsApplication/custom_elements/U_Pw_small_strain_element.cpp b/applications/GeoMechanicsApplication/custom_elements/U_Pw_small_strain_element.cpp index 0d72b7506b56..f3163d9b3d3d 100644 --- a/applications/GeoMechanicsApplication/custom_elements/U_Pw_small_strain_element.cpp +++ b/applications/GeoMechanicsApplication/custom_elements/U_Pw_small_strain_element.cpp @@ -1877,12 +1877,10 @@ void UPwSmallStrainElement::CalculateAnyOfMaterialResponse( GeoMechanicsMathUtilities::CalculateDeterminants(rDeformationGradients); for (unsigned int GPoint = 0; GPoint < rDeformationGradients.size(); ++GPoint) { - rConstitutiveParameters.SetConstitutiveMatrix(rConstitutiveMatrices[GPoint]); - rConstitutiveParameters.SetStrainVector(rStrainVectors[GPoint]); - rConstitutiveParameters.SetShapeFunctionsDerivatives(rDNu_DXContainer[GPoint]); - rConstitutiveParameters.SetShapeFunctionsValues(row(rNuContainer, GPoint)); - rConstitutiveParameters.SetDeformationGradientF(rDeformationGradients[GPoint]); - rConstitutiveParameters.SetDeterminantF(determinants_of_deformation_gradients[GPoint]); + ConstitutiveLawUtilities::SetConstitutiveParameters( + rConstitutiveParameters, rStrainVectors[GPoint], rConstitutiveMatrices[GPoint], + row(rNuContainer, GPoint), rDNu_DXContainer[GPoint], rDeformationGradients[GPoint], + determinants_of_deformation_gradients[GPoint]); rConstitutiveParameters.SetStressVector(rStressVectors[GPoint]); mConstitutiveLawVector[GPoint]->CalculateMaterialResponseCauchy(rConstitutiveParameters); diff --git a/applications/GeoMechanicsApplication/custom_elements/small_strain_U_Pw_diff_order_element.cpp b/applications/GeoMechanicsApplication/custom_elements/small_strain_U_Pw_diff_order_element.cpp index b68001f700d4..6a7b94b38c80 100644 --- a/applications/GeoMechanicsApplication/custom_elements/small_strain_U_Pw_diff_order_element.cpp +++ b/applications/GeoMechanicsApplication/custom_elements/small_strain_U_Pw_diff_order_element.cpp @@ -2149,12 +2149,10 @@ void SmallStrainUPwDiffOrderElement::CalculateAnyOfMaterialResponse( GeoMechanicsMathUtilities::CalculateDeterminants(rDeformationGradients); for (unsigned int GPoint = 0; GPoint < rDeformationGradients.size(); ++GPoint) { - rConstitutiveParameters.SetConstitutiveMatrix(rConstitutiveMatrices[GPoint]); - rConstitutiveParameters.SetStrainVector(rStrainVectors[GPoint]); - rConstitutiveParameters.SetShapeFunctionsDerivatives(rDNu_DXContainer[GPoint]); - rConstitutiveParameters.SetShapeFunctionsValues(row(rNuContainer, GPoint)); - rConstitutiveParameters.SetDeformationGradientF(rDeformationGradients[GPoint]); - rConstitutiveParameters.SetDeterminantF(determinants_of_deformation_gradients[GPoint]); + ConstitutiveLawUtilities::SetConstitutiveParameters( + rConstitutiveParameters, rStrainVectors[GPoint], rConstitutiveMatrices[GPoint], + row(rNuContainer, GPoint), rDNu_DXContainer[GPoint], rDeformationGradients[GPoint], + determinants_of_deformation_gradients[GPoint]); rConstitutiveParameters.SetStressVector(rStressVectors[GPoint]); mConstitutiveLawVector[GPoint]->CalculateMaterialResponseCauchy(rConstitutiveParameters);