36#include "AbstractMaterialLaw.hpp"
40 : mpChangeOfBasisMatrix(nullptr)
47 c_matrix<double,DIM,DIM>& rSigma)
51 c_matrix<double,DIM,DIM> C = prod(trans(rF), rF);
52 c_matrix<double,DIM,DIM> invC =
Inverse(C);
54 c_matrix<double,DIM,DIM> T;
58 ComputeStressAndStressDerivative(C, invC, pressure, T, dTdE,
false);
65 for (
unsigned i=0; i<DIM; i++)
67 for (
unsigned j=0; j<DIM; j++)
70 for (
unsigned M=0; M<DIM; M++)
72 for (
unsigned N=0; N<DIM; N++)
74 rSigma(i,j) += rF(i,M)*T(M,N)*rF(j,N);
85 c_matrix<double,DIM,DIM>& rS)
87 c_matrix<double,DIM,DIM> C = prod(trans(rF), rF);
88 c_matrix<double,DIM,DIM> invC =
Inverse(C);
90 c_matrix<double,DIM,DIM> T;
94 ComputeStressAndStressDerivative(C, invC, pressure, T, dTdE,
false);
96 rS = prod(T, trans(rF));
102 c_matrix<double,DIM,DIM>& rT)
104 c_matrix<double,DIM,DIM> invC =
Inverse(rC);
108 ComputeStressAndStressDerivative(rC, invC, pressure, rT, dTdE,
false);
112template<
unsigned DIM>
115 EXCEPTION(
"[the material law you are using]::ScaleMaterialParameters() has not been implemented\n");
119template<
unsigned DIM>
122 mpChangeOfBasisMatrix = &rChangeOfBasisMatrix;
125template<
unsigned DIM>
128 mpChangeOfBasisMatrix =
nullptr;
131template<
unsigned DIM>
133 c_matrix<double,DIM,DIM>& rCTransformed, c_matrix<double,DIM,DIM>& rInvCTransformed)
139 if (mpChangeOfBasisMatrix)
142 rCTransformed = prod(trans(*mpChangeOfBasisMatrix),(c_matrix<double,DIM,DIM>)prod(rC,*mpChangeOfBasisMatrix));
143 rInvCTransformed = prod(trans(*mpChangeOfBasisMatrix),(c_matrix<double,DIM,DIM>)prod(rInvC,*mpChangeOfBasisMatrix));
148 rInvCTransformed = rInvC;
152template<
unsigned DIM>
158 if (mpChangeOfBasisMatrix)
160 static c_matrix<double,DIM,DIM> T_transformed_times_Ptrans;
161 T_transformed_times_Ptrans = prod(rT, trans(*mpChangeOfBasisMatrix));
163 rT = prod(*mpChangeOfBasisMatrix, T_transformed_times_Ptrans);
169 temp.template SetAsContractionOnFirstDimension<DIM>(*mpChangeOfBasisMatrix, rDTdE);
170 rDTdE.template SetAsContractionOnSecondDimension<DIM>(*mpChangeOfBasisMatrix, temp);
171 temp.template SetAsContractionOnThirdDimension<DIM>(*mpChangeOfBasisMatrix, rDTdE);
172 rDTdE.template SetAsContractionOnFourthDimension<DIM>(*mpChangeOfBasisMatrix, temp);
#define EXCEPTION(message)
T Determinant(const boost::numeric::ublas::c_matrix< T, 1, 1 > &rM)
boost::numeric::ublas::c_matrix< T, 1, 1 > Inverse(const boost::numeric::ublas::c_matrix< T, 1, 1 > &rM)
void ResetToNoChangeOfBasisMatrix()
void Compute1stPiolaKirchoffStress(c_matrix< double, DIM, DIM > &rF, double pressure, c_matrix< double, DIM, DIM > &rS)
void ComputeCauchyStress(c_matrix< double, DIM, DIM > &rF, double pressure, c_matrix< double, DIM, DIM > &rSigma)
void ComputeTransformedDeformationTensor(c_matrix< double, DIM, DIM > &rC, c_matrix< double, DIM, DIM > &rInvC, c_matrix< double, DIM, DIM > &rCTransformed, c_matrix< double, DIM, DIM > &rInvCTransformed)
void TransformStressAndStressDerivative(c_matrix< double, DIM, DIM > &rT, FourthOrderTensor< DIM, DIM, DIM, DIM > &rDTdE, bool transformDTdE)
void Compute2ndPiolaKirchoffStress(c_matrix< double, DIM, DIM > &rC, double pressure, c_matrix< double, DIM, DIM > &rT)
virtual void ScaleMaterialParameters(double scaleFactor)
void SetChangeOfBasisMatrix(c_matrix< double, DIM, DIM > &rChangeOfBasisMatrix)