Skip to content

Commit

Permalink
more generality to avoid breaking test in SMApp
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroCornejo committed Aug 22, 2023
1 parent a844ca8 commit a9e23d2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,14 @@ void ConstitutiveLawUtilities<TVoigtSize>::CalculateCauchyGreenStrain(

noalias(rStrainVector) = MathUtils<double>::StrainTensorToVector(E_tensor);
} else {
const SizeType space_dimension = rValues.GetElementGeometry().WorkingSpaceDimension();
//1.-Compute total deformation gradient
const ConstitutiveLaw::DeformationGradientMatrixType& F = rValues.GetDeformationGradientF();
KRATOS_DEBUG_ERROR_IF(F.size1()!= Dimension || F.size2() != Dimension)
<< "expected size of F " << Dimension << "x" << Dimension << ", got " << F.size1() << "x" << F.size2() << std::endl;
KRATOS_DEBUG_ERROR_IF(F.size1()!= space_dimension || F.size2() != space_dimension)
<< "expected size of F " << space_dimension << "x" << space_dimension << ", got " << F.size1() << "x" << F.size2() << std::endl;

ConstitutiveLaw::DeformationGradientMatrixType E_tensor = prod(trans(F),F);
for(unsigned int i = 0; i < Dimension; ++i)
for(unsigned int i = 0; i < space_dimension; ++i)
E_tensor(i,i) -= 1.0;
E_tensor *= 0.5;

Expand Down

0 comments on commit a9e23d2

Please sign in to comment.