36 #include "PolynomialMaterialLaw3d.hpp"
44 for (
int p=1; p<=(int)
mN; p++)
46 for (
int q=0; q<=(int)
mN-p; q++)
48 ret +=
mAlpha[p][q] * p * pow(I1-3,p-1) * pow(I2-3,q);
61 for (
int p=0; p<=(int)
mN; p++)
63 for (
int q=1; q<=(int)
mN-p; q++)
65 ret +=
mAlpha[p][q] * q * pow(I1-3,p) * pow(I2-3,q-1);
78 for (
int p=2; p<=(int)
mN; p++)
80 for (
int q=0; q<=(int)
mN-p; q++)
82 ret +=
mAlpha[p][q] * p * (p-1) * pow(I1-3,(p-1)*(p-2)) * pow((
double)I2-3,(
double)q);
95 for (
int p=0; p<=(int)
mN; p++)
97 for (
int q=2; q<=(int)
mN-p; q++)
99 ret +=
mAlpha[p][q] * q * (q-1) * pow((
double)I1-3,(
double)p) * pow(I2-3,(q-1)*(q-2));
112 for (
int p=1; p<=(int)
mN; p++)
114 for (
int q=1; q<=(int)
mN-p; q++)
116 ret +=
mAlpha[p][q] * p * q * pow(I1-3,p-1) * pow(I2-3,q-1);
140 for (
unsigned p=0; p<=
mN; p++)
142 if (alpha[p].size() <
mN+1-p)
147 for (
unsigned q=0; q<alpha[p].size(); q++)
149 if ((p+q>
mN) && (fabs(alpha[p][q]) > 1e-12))
151 EXCEPTION(
"alpha[" << p <<
"][" << q <<
"] should be zero, as p+q > " << n);
161 std::vector<std::vector<double> > alpha(n+1);
163 for (
unsigned i=0; i<n+1; i++)
165 alpha[i].resize(n+1);
166 for (
unsigned j=0; j<n+1; j++)
double Get_d2W_dI1(double I1, double I2)
double GetAlpha(unsigned i, unsigned j)
#define EXCEPTION(message)
double Get_d2W_dI1I2(double I1, double I2)
static std::vector< std::vector< double > > GetZeroedAlpha(unsigned n)
double Get_d2W_dI2(double I1, double I2)
double Get_dW_dI2(double I1, double I2)
double Get_dW_dI1(double I1, double I2)
PolynomialMaterialLaw3d(unsigned n, std::vector< std::vector< double > > alpha)
std::vector< std::vector< double > > mAlpha