38 #ifndef WALLTENSION_H_ 39 #define WALLTENSION_H_ 1
42 #pragma GCC diagnostic ignored "-Wunused-variable" 43 #pragma GCC diagnostic ignored "-Wunused-parameter" 52 #include <boost/scoped_ptr.hpp> 53 #include <boost/multi_array.hpp> 56 #include <Epetra_SerialDenseMatrix.h> 59 #pragma GCC diagnostic warning "-Wunused-variable" 60 #pragma GCC diagnostic warning "-Wunused-parameter" 63 #include <lifev/core/array/MatrixElemental.hpp> 64 #include <lifev/core/array/VectorElemental.hpp> 65 #include <lifev/core/array/MatrixEpetra.hpp> 66 #include <lifev/core/array/VectorEpetra.hpp> 68 #include <lifev/core/fem/Assembly.hpp> 69 #include <lifev/core/fem/AssemblyElemental.hpp> 70 #include <lifev/core/fem/FESpace.hpp> 71 #include <lifev/core/LifeV.hpp> 72 #include <lifev/core/util/Displayer.hpp> 73 #include <lifev/core/array/MapEpetra.hpp> 75 #include <lifev/core/filter/ExporterEnsight.hpp> 77 #include <lifev/core/filter/ExporterHDF5.hpp> 79 #include <lifev/core/filter/ExporterEmpty.hpp> 81 #include <lifev/eta/fem/ETFESpace.hpp> 84 #include <lifev/structure/fem/AssemblyElementalStructure.hpp> 85 #include <lifev/structure/solver/StructuralConstitutiveLawData.hpp> 86 #include <lifev/structure/solver/WallTensionEstimatorData.hpp> 87 #include <lifev/structure/solver/StructuralConstitutiveLaw.hpp> 90 #include <lifev/structure/solver/isotropic/VenantKirchhoffMaterialLinear.hpp> 91 #include <lifev/structure/solver/isotropic/VenantKirchhoffMaterialNonLinear.hpp> 92 #include <lifev/structure/solver/isotropic/ExponentialMaterialNonLinear.hpp> 93 #include <lifev/structure/solver/isotropic/NeoHookeanMaterialNonLinear.hpp> 95 #include <lifev/eta/fem/ETFESpace.hpp> 97 #include <lifev/structure/solver/isotropic/VenantKirchhoffMaterialNonLinearPenalized.hpp> 98 #include <lifev/structure/solver/isotropic/SecondOrderExponentialMaterialNonLinear.hpp> 110 template <
typename Mesh>
119 typedef Displayer::comm_Type comm_Type;
120 typedef Displayer::commPtr_Type commPtr_Type;
177 void setup (
const dataPtr_Type& dataMaterial,
178 const analysisDataPtr_Type& tensionData,
181 const commPtr_Type& comm,
191 void setup (
const dataPtr_Type& dataMaterial,
194 const commPtr_Type& comm,
221 *M_displacement = displacement;
233 return *M_FESpace->mapPtr();
265 return *M_FESpaceScalar;
277 return *M_displacement;
317 stressXX.subset ( *M_sigmaX,
static_cast<UInt> ( 0 ) );
326 stressXY.subset ( *M_sigmaX,
static_cast<UInt> ( 1 * M_FESpace->dof().numTotalDof() ) );
335 stressXZ.subset ( *M_sigmaX,
static_cast<UInt> ( 2 * M_FESpace->dof().numTotalDof() ) );
344 stressYX.subset ( *M_sigmaY,
static_cast<UInt> ( 0 ) );
353 stressYY.subset ( *M_sigmaY,
static_cast<UInt> ( 1 * M_FESpace->dof().numTotalDof() ) );
362 stressYZ.subset ( *M_sigmaY,
static_cast<UInt> ( 2 * M_FESpace->dof().numTotalDof() ) );
371 stressZX.subset ( *M_sigmaZ,
static_cast<UInt> ( 0 ) );
380 stressZY.subset ( *M_sigmaZ,
static_cast<UInt> ( 1 * M_FESpace->dof().numTotalDof() ) );
389 stressZZ.subset ( *M_sigmaZ,
static_cast<UInt> ( 2 * M_FESpace->dof().numTotalDof() ) );
398 stressVonMises = *M_sigmaVonMises;
404 return *M_globalEigenvalues;
523 template <
typename Mesh>
557 template <
typename Mesh>
560 const analysisDataPtr_Type& tensionData,
563 const commPtr_Type& comm,
566 M_analysisData = tensionData;
567 setup ( dataMaterial, feSpace, feSpaceET, comm, marker );
570 template <
typename Mesh>
575 const commPtr_Type& comm,
579 M_dataMaterial = dataMaterial;
586 M_FESpaceScalar.reset (
new feSpace_Type ( M_FESpace->mesh(),
594 M_displayer.reset (
new Displayer ( comm ) );
597 M_sigma.reset (
new matrix_Type ( M_FESpace->fieldDim(), M_FESpace->fieldDim() ) );
599 M_deformationF.reset (
new matrix_Type ( M_FESpace->fieldDim(), M_FESpace->fieldDim() ) );
600 M_cofactorF.reset (
new matrix_Type ( M_FESpace->fieldDim(), M_FESpace->fieldDim() ) );
601 M_firstPiola.reset (
new matrix_Type ( M_FESpace->fieldDim(), M_FESpace->fieldDim() ) );
603 M_displacement.reset (
new solutionVect_Type (*M_FESpace->mapPtr() ) );
605 M_gradientX.reset (
new solutionVect_Type (*M_FESpace->mapPtr() ) );
606 M_gradientY.reset (
new solutionVect_Type (*M_FESpace->mapPtr() ) );
607 M_gradientZ.reset (
new solutionVect_Type (*M_FESpace->mapPtr() ) );
609 M_sigmaX.reset (
new solutionVect_Type (*M_FESpace->mapPtr() ) );
610 M_sigmaY.reset (
new solutionVect_Type (*M_FESpace->mapPtr() ) );
611 M_sigmaZ.reset (
new solutionVect_Type (*M_FESpace->mapPtr() ) );
613 M_sigmaVonMises.reset (
new solutionVect_Type (*M_FESpaceScalar->mapPtr() ) );
615 M_globalEigenvalues.reset (
new solutionVect_Type (*M_FESpace->mapPtr() ) );
617 M_invariants.resize ( M_FESpace->fieldDim() + 1 );
618 M_eigenvaluesR.resize ( M_FESpace->fieldDim() );
619 M_eigenvaluesI.resize ( M_FESpace->fieldDim() );
622 M_material.reset(
new material_Type() );
623 M_material->setup ( feSpace, feSpaceET, M_FESpace->mapPtr(), M_offset, M_dataMaterial, M_displayer );
627 template <
typename Mesh>
632 *M_globalEigenvalues *= 0.0;
633 if ( !M_analysisData->recoveryVariable().compare (
"displacement") )
637 else if ( !M_analysisData->recoveryVariable().compare (
"eigenvalues") )
647 template <
typename Mesh>
673 UInt dim = M_FESpace->dim();
677 this->M_displayer->leaderPrint (
" \n*********************************\n ");
678 this->M_displayer->leaderPrint (
" Performing the analysis recovering the displacement..., ");
679 this->M_displayer->leaderPrint (
" \n*********************************\n ");
683 for ( UInt iDOF = 0; iDOF < ( UInt ) M_FESpace->dof().numTotalDof(); ++iDOF )
686 if ( M_displacement->blockMap().LID (
static_cast<EpetraInt_Type> (iDOF) ) != -1 )
688 std::vector<Real> dX (3, 0.0);
689 std::vector<Real> dY (3, 0.0);
690 std::vector<Real> dZ (3, 0.0);
693 (*M_deformationF).Scale (0.0);
694 (*M_cofactorF).Scale (0.0);
695 (*M_firstPiola).Scale (0.0);
696 (*M_sigma).Scale (0.0);
699 for ( UInt iComp = 0; iComp < M_FESpace->fieldDim(); ++iComp )
701 Int LIDid = M_displacement->blockMap().LID (
static_cast<EpetraInt_Type> ( ( iDOF + iComp * dim + M_offset ) ) );
702 Int GIDid = M_displacement->blockMap().GID (
static_cast<EpetraInt_Type> (LIDid) );
703 dX[iComp] = (*grDisplX) (GIDid);
704 dY[iComp] = (*grDisplY) (GIDid);
705 dZ[iComp] = (*grDisplZ) (GIDid);
709 for ( UInt icoor (0); icoor < M_FESpace->fieldDim(); ++icoor )
711 (*M_deformationF) (icoor, 0) = dX[icoor];
712 (*M_deformationF) (icoor, 1) = dY[icoor];
713 (*M_deformationF) (icoor, 2) = dZ[icoor];
715 (*M_deformationF) (icoor, icoor) += 1.0;
719 AssemblyElementalStructure::computeInvariantsRightCauchyGreenTensor (M_invariants, *M_deformationF, *M_cofactorF);
726 M_material->computeLocalFirstPiolaKirchhoffTensor (*M_firstPiola, *M_deformationF, *M_cofactorF, M_invariants, M_marker);
729 AssemblyElementalStructure::computeCauchyStressTensor (*M_sigma, *M_firstPiola, M_invariants[3], *M_deformationF);
732 AssemblyElementalStructure::computeEigenvalues (*M_sigma, M_eigenvaluesR, M_eigenvaluesI);
737 for ( UInt i (0); i < M_eigenvaluesI.size(); ++i )
739 sum += std::abs (M_eigenvaluesI[i]);
741 ASSERT_PRE ( sum < 1e-6 ,
"The eigenvalues of the Cauchy stress tensors have to be real!" );
743 std::sort ( M_eigenvaluesR.begin(), M_eigenvaluesR.end() );
746 for ( UInt icoor (0); icoor < M_FESpace->fieldDim(); ++icoor )
748 Int LIDid = M_displacement->blockMap().LID (
static_cast<EpetraInt_Type> (iDOF + icoor * dim + M_offset) );
749 Int GIDid = M_displacement->blockMap().GID (
static_cast<EpetraInt_Type> (LIDid) );
750 (*M_globalEigenvalues) (GIDid) = M_eigenvaluesR[icoor];
757 M_displayer->leaderPrint (
"Analysis done in: ", chrono.diff() );
760 template <
typename Mesh>
776 Real refElemArea (0);
778 for ( UInt iq (0); iq < M_FESpace->qr().nbQuadPt(); ++iq )
780 refElemArea += M_FESpace->qr().weight (iq);
783 Real wQuad (refElemArea / M_FESpace->refFE().nbDof() );
786 std::vector<GeoVector> coords = M_FESpace->refFE().refCoor();
787 std::vector<Real> weights (M_FESpace->fe().nbFEDof(), wQuad);
788 fakeQuadratureRule.setDimensionShape ( shapeDimension (M_FESpace->refFE().shape() ), M_FESpace->refFE().shape() );
789 fakeQuadratureRule.setPoints (coords, weights);
792 M_FESpace->setQuadRule (fakeQuadratureRule);
794 this->M_displayer->leaderPrint (
" \n*********************************\n ");
795 this->M_displayer->leaderPrint (
" Performing the analysis recovering the tensions..., " );
796 this->M_displayer->leaderPrint (
" \n*********************************\n ");
798 UInt totalDof = M_FESpace->dof().numTotalDof();
799 VectorElemental dk_loc (M_FESpace->fe().nbFEDof(), M_FESpace->fieldDim() );
802 std::vector<matrix_Type> vectorDeformationF (M_FESpace->fe().nbFEDof(), *M_deformationF);
806 VectorElemental elVecTens (M_FESpace->fe().nbFEDof(), M_FESpace->fieldDim() );
811 for ( UInt i (0); i < M_FESpace->mesh()->numVolumes(); ++i )
813 M_FESpace->fe().updateFirstDerivQuadPt ( M_FESpace->mesh()->volumeList ( i ) );
816 M_marker = M_FESpace->mesh()->volumeList ( i ).markerID();
818 UInt eleID = M_FESpace->fe().currentLocalId();
821 for ( UInt iNode (0); iNode < ( UInt ) M_FESpace->fe().nbFEDof(); ++iNode )
823 UInt iloc = M_FESpace->fe().patternFirst ( iNode );
825 for ( UInt iComp = 0; iComp < M_FESpace->fieldDim(); ++iComp )
827 UInt ig = M_FESpace->dof().localToGlobalMap ( eleID, iloc ) + iComp * M_FESpace->dim() + M_offset;
828 dk_loc[iloc + iComp * M_FESpace->fe().nbFEDof() ] = dRep[ig];
833 AssemblyElementalStructure::computeLocalDeformationGradient ( dk_loc, vectorDeformationF, M_FESpace->fe() );
836 for ( UInt nDOF (0); nDOF < ( UInt ) M_FESpace->fe().nbFEDof(); ++nDOF )
838 UInt iloc = M_FESpace->fe().patternFirst ( nDOF );
840 M_sigma->Scale (0.0);
841 M_firstPiola->Scale (0.0);
842 M_cofactorF->Scale (0.0);
845 AssemblyElementalStructure::computeInvariantsRightCauchyGreenTensor (M_invariants, vectorDeformationF[nDOF], *M_cofactorF);
848 M_material->computeLocalFirstPiolaKirchhoffTensor (*M_firstPiola, vectorDeformationF[nDOF], *M_cofactorF, M_invariants, M_marker);
851 AssemblyElementalStructure::computeCauchyStressTensor (*M_sigma, *M_firstPiola, M_invariants[3], vectorDeformationF[nDOF]);
854 AssemblyElementalStructure::computeEigenvalues (*M_sigma, M_eigenvaluesR, M_eigenvaluesI);
859 for ( UInt i (0); i < M_eigenvaluesI.size(); ++i )
861 sum += std::abs (M_eigenvaluesI[i]);
863 ASSERT_PRE ( sum < 1e-6 ,
"The eigenvalues of the Cauchy stress tensors have to be real!" );
865 std::sort ( M_eigenvaluesR.begin(), M_eigenvaluesR.end() );
868 for ( UInt coor (0); coor < M_eigenvaluesR.size(); ++coor )
870 elVecTens[iloc + coor * M_FESpace->fe().nbFEDof() ] = M_eigenvaluesR[coor];
874 reconstructElementaryVector ( elVecTens, patchAreaR, *M_FESpace );
877 for ( UInt ic (0); ic < M_FESpace->fieldDim(); ++ic )
879 assembleVector (*M_globalEigenvalues, elVecTens, M_FESpace->fe(), M_FESpace->dof(), ic, M_offset + ic * totalDof );
883 M_globalEigenvalues->globalAssemble();
886 M_displayer->leaderPrint (
"Analysis done in: ", chrono.diff() );
889 template <
typename Mesh>
900 for ( UInt iDOF (0); iDOF < ( UInt ) M_FESpace->dof().numTotalDof(); ++iDOF )
903 if ( M_displacement->blockMap().LID (
static_cast<EpetraInt_Type> (iDOF) ) != -1 )
906 (*M_sigma).Scale (0.0);
909 for ( UInt iComp = 0; iComp < M_FESpace->fieldDim(); ++iComp )
911 Int LIDid = M_displacement->blockMap().LID (
static_cast<EpetraInt_Type> (iDOF + iComp * M_FESpace->dim() + M_offset) );
912 Int GIDid = M_displacement->blockMap().GID (
static_cast<EpetraInt_Type> (LIDid) );
913 (*M_sigma) (iComp, 0) = (*M_sigmaX) (GIDid);
914 (*M_sigma) (iComp, 1) = (*M_sigmaY) (GIDid);
915 (*M_sigma) (iComp, 2) = (*M_sigmaZ) (GIDid);
919 AssemblyElementalStructure::computeEigenvalues (*M_sigma, M_eigenvaluesR, M_eigenvaluesI);
924 for ( UInt i (0); i < M_eigenvaluesI.size(); ++i )
926 sum += std::abs (M_eigenvaluesI[i]);
928 ASSERT_PRE ( sum < 1e-6 ,
"The eigenvalues of the Cauchy stress tensors have to be real!" );
930 std::sort ( M_eigenvaluesR.begin(), M_eigenvaluesR.end() );
933 for ( UInt icoor = 0; icoor < M_FESpace->fieldDim(); ++icoor )
935 Int LIDid = M_displacement->blockMap().LID (
static_cast<EpetraInt_Type> (iDOF + icoor * M_FESpace->dim() + M_offset ) );
936 Int GIDid = M_displacement->blockMap().GID (
static_cast<EpetraInt_Type> (LIDid) );
937 (*M_globalEigenvalues) (GIDid) = M_eigenvaluesR[icoor];
943 M_displayer->leaderPrint (
"Analysis done in: ", chrono.diff() );
947 template <
typename Mesh>
959 *M_sigmaVonMises *= 0.;
970 *M_sigmaVonMises += stressComponent1 * stressComponent1
971 + stressComponent2 * stressComponent2
972 + stressComponent3 * stressComponent3;
973 *M_sigmaVonMises *= 6.;
979 *M_sigmaVonMises += ( stressComponent1 - stressComponent2 ) * ( stressComponent1 - stressComponent2 )
980 + ( stressComponent1 - stressComponent3 ) * ( stressComponent1 - stressComponent3 )
981 + ( stressComponent2 - stressComponent3 ) * ( stressComponent2 - stressComponent3 );
984 *M_sigmaVonMises *= 0.5;
985 M_sigmaVonMises->sqrt();
989 M_displayer->leaderPrint (
" S- Von Mises stress computed in: ", chrono.globalDiff ( *M_displayer->comm() ),
" s\n" );
992 template <
typename Mesh>
1002 *grDisplX = M_FESpace->gradientRecovery (*M_displacement, 0);
1005 *grDisplY = M_FESpace->gradientRecovery (*M_displacement, 1);
1008 *grDisplZ = M_FESpace->gradientRecovery (*M_displacement, 2);
1011 template <
typename Mesh>
1034 Real refElemArea (0);
1035 for (UInt iq (0); iq < M_FESpace->qr().nbQuadPt(); ++iq)
1037 refElemArea += M_FESpace->qr().weight (iq);
1041 Real wQuad (refElemArea / M_FESpace->refFE().nbDof() );
1042 std::vector<Real> weights (M_FESpace->fe().nbFEDof(), wQuad);
1043 std::vector<GeoVector> coords = M_FESpace->refFE().refCoor();
1046 fakeQuadratureRule.setDimensionShape ( shapeDimension (M_FESpace->refFE().shape() ), M_FESpace->refFE().shape() );
1047 fakeQuadratureRule.setPoints (coords, weights);
1050 feSpace_Type fakeFESpace ( M_FESpace->mesh(), M_FESpace->refFE(), M_FESpace->qr(), M_FESpace->bdQr(), 3, M_FESpace->map().commPtr() );
1052 this->M_displayer->leaderPrint (
" \n*********************************\n ");
1053 this->M_displayer->leaderPrint (
" Performing the analysis recovering the Cauchy stresses..., ");
1054 this->M_displayer->leaderPrint (
" \n*********************************\n ");
1057 fakeFESpace.setQuadRule (fakeQuadratureRule);
1060 UInt totalDof = fakeFESpace.dof().numTotalDof();
1061 VectorElemental dk_loc (fakeFESpace.fe().nbFEDof(), fakeFESpace.fieldDim() );
1064 (*M_deformationF).Scale (0.0);
1065 std::vector<matrix_Type> vectorDeformationF (fakeFESpace.fe().nbFEDof(), *M_deformationF);
1071 VectorElemental elVecSigmaX (fakeFESpace.fe().nbFEDof(), fakeFESpace.fieldDim() );
1072 VectorElemental elVecSigmaY (fakeFESpace.fe().nbFEDof(), fakeFESpace.fieldDim() );
1073 VectorElemental elVecSigmaZ (fakeFESpace.fe().nbFEDof(), fakeFESpace.fieldDim() );
1076 for (
UInt i (0); i < fakeFESpace.mesh()->numVolumes(); ++i )
1079 fakeFESpace.fe().updateFirstDerivQuadPt ( fakeFESpace.mesh()->volumeList ( i ) );
1085 M_marker = fakeFESpace.mesh()->volumeList ( i ).markerID();
1087 UInt eleID = fakeFESpace.fe().currentLocalId();
1090 for (
UInt iNode (0); iNode < (
UInt ) fakeFESpace.fe().nbFEDof(); ++iNode )
1092 UInt iloc = fakeFESpace.fe().patternFirst ( iNode );
1094 for (
UInt iComp = 0; iComp < fakeFESpace.fieldDim(); ++iComp )
1096 UInt ig = fakeFESpace.dof().localToGlobalMap ( eleID, iloc ) + iComp * fakeFESpace.dim() +
M_offset;
1097 dk_loc[iloc + iComp * fakeFESpace.fe().nbFEDof() ] = dRep[ig];
1102 AssemblyElementalStructure::computeLocalDeformationGradient ( dk_loc, vectorDeformationF, fakeFESpace.fe() );
1105 for (
UInt nDOF (0); nDOF < (
UInt ) fakeFESpace.fe().nbFEDof(); ++nDOF )
1107 UInt iloc = fakeFESpace.fe().patternFirst ( nDOF );
1109 M_sigma->Scale (0.0);
1110 M_firstPiola->Scale (0.0);
1111 M_cofactorF->Scale (0.0);
1114 AssemblyElementalStructure::computeInvariantsRightCauchyGreenTensor (M_invariants, vectorDeformationF[nDOF], *M_cofactorF);
1117 M_material->computeLocalFirstPiolaKirchhoffTensor (*M_firstPiola, vectorDeformationF[nDOF], *M_cofactorF, M_invariants, M_marker);
1120 AssemblyElementalStructure::computeCauchyStressTensor (*M_sigma, *M_firstPiola, M_invariants[3], vectorDeformationF[nDOF]);
1123 for (
UInt coor (0); coor < fakeFESpace.fieldDim(); ++coor )
1125 (elVecSigmaX) [iloc + coor * fakeFESpace.fe().nbFEDof() ] = (*M_sigma) (coor, 0);
1126 (elVecSigmaY) [iloc + coor * fakeFESpace.fe().nbFEDof() ] = (*M_sigma) (coor, 1);
1127 (elVecSigmaZ) [iloc + coor * fakeFESpace.fe().nbFEDof() ] = (*M_sigma) (coor, 2);
1136 for (
UInt ic = 0; ic < fakeFESpace.fieldDim(); ++ic )
1138 assembleVector (*M_sigmaX, elVecSigmaX, fakeFESpace.fe(), fakeFESpace.dof(), ic, M_offset + ic * totalDof );
1139 assembleVector (*M_sigmaY, elVecSigmaY, fakeFESpace.fe(), fakeFESpace.dof(), ic, M_offset + ic * totalDof );
1140 assembleVector (*M_sigmaZ, elVecSigmaZ, fakeFESpace.fe(), fakeFESpace.dof(), ic, M_offset + ic * totalDof );
1144 M_sigmaX->globalAssemble();
1145 M_sigmaY->globalAssemble();
1146 M_sigmaZ->globalAssemble();
1150 M_displayer->leaderPrint (
" S- Cauchy stresses recovered in: ", chrono.globalDiff ( *M_displayer->comm() ),
" s\n" );
1153 template <
typename Mesh>
1160 Real refElemArea (0);
1161 UInt totalDof = M_FESpace->dof().numTotalDof();
1163 for (UInt iq (0); iq < M_FESpace->qr().nbQuadPt(); ++iq)
1165 refElemArea += M_FESpace->qr().weight (iq);
1170 interpQuad.setDimensionShape (shapeDimension (M_FESpace->refFE().shape() ), M_FESpace->refFE().shape() );
1171 Real wQuad (refElemArea / M_FESpace->refFE().nbDof() );
1173 for (UInt i (0); i < M_FESpace->refFE().nbDof(); ++i )
1175 interpQuad.addPoint (QuadraturePoint (M_FESpace->refFE().xi (i), M_FESpace->refFE().eta (i), M_FESpace->refFE().zeta (i), wQuad) );
1178 UInt totalNumberVolumes (M_FESpace->mesh()->numVolumes() );
1179 UInt numberLocalDof (M_FESpace->dof().numLocalDof() );
1181 CurrentFE interpCFE (M_FESpace->refFE(), getGeometricMap (* (M_FESpace->mesh() ) ), interpQuad);
1184 for (
UInt iterElement (0); iterElement < totalNumberVolumes; ++iterElement)
1186 interpCFE.update (M_FESpace->mesh()->volumeList ( iterElement ), UPDATE_WDET );
1188 for (
UInt iterDof (0); iterDof < numberLocalDof; ++iterDof)
1190 for (UInt iDim (0); iDim < M_FESpace->fieldDim(); ++iDim)
1192 ID globalDofID (M_FESpace->dof().localToGlobalMap (iterElement, iterDof) + iDim * totalDof);
1193 patchAreaR[globalDofID] += interpCFE.measure();
1200 patchArea.add (final);
1203 template <
typename Mesh>
1209 Real measure = feSpace.fe().measure();
1210 UInt eleID = feSpace.fe().currentLocalId();
1212 for (
UInt iDof = 0; iDof < feSpace.fe().nbFEDof(); ++iDof)
1214 UInt iloc = feSpace.fe().patternFirst ( iDof );
1216 for (
UInt icoor = 0; icoor < feSpace.fieldDim(); ++icoor )
1218 ID globalDofID (feSpace.dof().localToGlobalMap (eleID, iDof) + icoor * feSpace.dof().numTotalDof() );
1220 elVecSigma[iloc + icoor * feSpace.fe().nbFEDof() ] *= ( measure / patchArea[globalDofID] );
virtual ~WallTensionEstimator()
void reconstructElementaryVector(VectorElemental &elVecSigma, const solutionVect_Type &patchArea, const feSpace_Type &feSpace)
reconstructElementaryVector: This method applies a reconstruction procedure on the elvec that is pass...
solutionVect_Type sigmaZ() const
void assignFunction(bcBase_Type &base)
Assign the function to the base of the BCHandler.
materialPtr_Type M_material
Material class.
void exportStressYY(solutionVect_Type &stressYY)
Export the YY component of the stress by copying it to an external vector.
solutionVectPtr_Type M_sigmaY
Vector for the Y component of the stress tensor.
StructuralConstitutiveLawData data_Type
std::shared_ptr< vector_Type > vectorPtr_Type
FESpace - Short description here please!
std::vector< Real > vector_Type
void exportStressYZ(solutionVect_Type &stressYZ)
Export the YZ component of the stress by copying it to an external vector.
solutionVect_Type principalStresses() const
Get the global vector for the eigenvalues.
solutionVectPtr_Type M_gradientY
Vector for the gradient along Y of the displacement field.
void setDisplacement(const solutionVect_Type &displacement)
Set the displacement vector.
UInt M_marker
The volume marker.
solutionVectPtr_Type M_sigmaX
Vector for the X component of the stress tensor.
solutionVect_Type gradientX() const
Get the displacement solution.
virtual void analyzeTensions()
This method computes the Cauchy stress tensor and its principal values. It uses the displacement vect...
matrixPtr_Type M_firstPiola
Elementary matrix for the tensor P.
std::shared_ptr< matrix_Type > matrixPtr_Type
analysisDataPtr_Type M_analysisData
solutionVect_Type sigmaX() const
feSpacePtr_Type M_FESpace
Vectorial FE space.
void exportStressXY(solutionVect_Type &stressXY)
Export the XY component of the stress by copying it to an external vector.
Epetra_Import const & importer()
Getter for the Epetra_Import.
feSpacePtr_Type M_FESpaceScalar
Scalar FE space.
vector_Type M_eigenvaluesI
std::shared_ptr< feSpaceET_Type > feSpaceETPtr_Type
void exportStressZX(solutionVect_Type &stressZX)
Export the ZX component of the stress by copying it to an external vector.
void constructPatchAreaVector(solutionVect_Type &patchArea)
constructPatchAreaVector: This method build the patch area vector used in the reconstruction process ...
WallTensionEstimatorData analysisData_Type
void exportStressYX(solutionVect_Type &stressYX)
Export the YX component of the stress by copying it to an external vector.
solutionVectPtr_Type M_gradientZ
Vector for the gradient along Z of the displacement field.
solutionVectPtr_Type M_globalEigenvalues
Vector for the eigenvalues of the Cauchy stress tensor.
void exportStressZY(solutionVect_Type &stressZY)
Export the ZY component of the stress by copying it to an external vector.
void exportStressXZ(solutionVect_Type &stressXZ)
Export the XZ component of the stress by copying it to an external vector.
const feSpacePtr_Type & feSpacePtr() const
Get the pointer to the FESpace object.
solutionVectPtr_Type M_sigmaVonMises
Vector for the Von Mises stress.
solutionVect_Type gradientZ() const
void analyzeTensionsRecoveryDisplacement()
This method computes the Cauchy stress tensor and its principal values. It uses the displacement vect...
std::shared_ptr< feSpace_Type > feSpacePtr_Type
void setup(const dataPtr_Type &dataMaterial, const analysisDataPtr_Type &tensionData, const feSpacePtr_Type &feSpace, const feSpaceETPtr_Type &feSpaceET, const commPtr_Type &comm, UInt marker)
Setup the created object of the class WallTensionEstimator.
std::string M_analysisType
Type of Analysis.
solutionVectPtr_Type M_sigmaZ
Vector for the Z component of the stress tensor.
Epetra_SerialDenseMatrix matrix_Type
double Real
Generic real data.
const feSpace_Type & feSpace() const
Get the FESpace object.
CurrentFE - A primordial class for the assembly of the local matrices/vectors retaining the values on...
std::shared_ptr< Exporter< Mesh > > exporterPtr_Type
void analyzeTensionsRecoveryEigenvalues()
This method computes the Cauchy stress tensor and its principal values. It uses the displacement vect...
void exportStressVonMises(solutionVect_Type &stressVonMises)
Export the ZZ component of the stress by copying it to an external vector.
solutionVect_Type gradientY() const
std::shared_ptr< VectorEpetra > solutionVectPtr_Type
dataPtr_Type M_dataMaterial
solutionVectPtr_Type M_gradientX
Vector for the gradient along X of the displacement field.
matrixPtr_Type M_sigma
Elementary matrix for the tensor (Cauchy tensor on the current config)
void computeDisplacementGradient(solutionVectPtr_Type grDisplX, solutionVectPtr_Type grDisplY, solutionVectPtr_Type grDisplZ)
computeDeformation: This method computes the tensor F given the displacement on the element...
displayerPtr_Type M_displayer
#define LIFEV_DEPRECATED(func)
void exportStressZZ(solutionVect_Type &stressZZ)
Export the ZZ component of the stress by copying it to an external vector.
std::shared_ptr< material_Type > materialPtr_Type
MapEpetra const & map() const
Get the Epetramap.
solutionVectPtr_Type M_displacement
Vector for the displacement field.
matrixPtr_Type M_cofactorF
Elementary matrix for the tensor F.
UInt M_offset
The Offset parameter.
vector_Type M_invariants
Vector of the invariants of C and detF (length = 4)
matrixPtr_Type M_deformationF
Elementary matrix for the tensor F.
QuadratureRule - The basis class for storing and accessing quadrature rules.
void analyzeTensionsRecoveryVonMisesStress()
This method computes the Von Mises stress. It uses the displacement vector that has to be set...
FESpace< Mesh, MapEpetra > feSpace_Type
solutionVect_Type displacement() const
Get the displacement solution.
void setup(const dataPtr_Type &dataMaterial, const feSpacePtr_Type &feSpace, const feSpaceETPtr_Type &feSpaceET, const commPtr_Type &comm, UInt marker)
Setup the created object of the class WallTensionEstimator.
void constructGlobalStressVector()
constructGlobalStressVector: This method construct the vectors {.,i} for i=x,y,z to have for each DOF...
const feSpacePtr_Type & feSpaceScalarPtr() const
Get the pointer to the scalar FESpace object.
void analyzeTensionsRecoveryCauchyStresses()
This method computes the Cauchy stress tensor and its principal values. It uses the displacement vect...
VectorEpetra solutionVect_Type
DataElasticStructure - Data container for solid problems with elastic structure.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
void exportStressXX(solutionVect_Type &stressXX)
Export the XX component of the stress by copying it to an external vector.
ETFESpace< RegionMesh< LinearTetra >, MapEpetra, 3, 3 > feSpaceET_Type
solutionVect_Type sigmaY() const
const feSpace_Type & feSpaceScalar() const
Get the scalar FESpace object.
vector_Type M_eigenvaluesR
Vector of the eigenvalues of on the DOF (length = 3)
StructuralConstitutiveLaw< Mesh > material_Type