File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
applications/StructuralMechanicsApplication/custom_utilities Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -391,13 +391,14 @@ void ConstitutiveLawUtilities<TVoigtSize>::CalculateCauchyGreenStrain(
391391
392392 noalias (rStrainVector) = MathUtils<double >::StrainTensorToVector (E_tensor);
393393 } else {
394+ const SizeType space_dimension = rValues.GetElementGeometry ().WorkingSpaceDimension ();
394395 // 1.-Compute total deformation gradient
395396 const ConstitutiveLaw::DeformationGradientMatrixType& F = rValues.GetDeformationGradientF ();
396- KRATOS_DEBUG_ERROR_IF (F.size1 ()!= Dimension || F.size2 () != Dimension )
397- << " expected size of F " << Dimension << " x" << Dimension << " , got " << F.size1 () << " x" << F.size2 () << std::endl;
397+ KRATOS_DEBUG_ERROR_IF (F.size1 ()!= space_dimension || F.size2 () != space_dimension )
398+ << " expected size of F " << space_dimension << " x" << space_dimension << " , got " << F.size1 () << " x" << F.size2 () << std::endl;
398399
399400 ConstitutiveLaw::DeformationGradientMatrixType E_tensor = prod (trans (F),F);
400- for (unsigned int i = 0 ; i < Dimension ; ++i)
401+ for (unsigned int i = 0 ; i < space_dimension ; ++i)
401402 E_tensor (i,i) -= 1.0 ;
402403 E_tensor *= 0.5 ;
403404
You can’t perform that action at this time.
0 commit comments