109 SInv =
new double[ir];
112 T =
new double[vr*vr];
113 TInv =
new double[vr*vr];
114 Te =
new double[tr*tr];
115 TeInv =
new double[tr*tr];
140 if (
Te)
delete []
Te;
168 if (nlc==0)
_errorr(
"zero nlc");
200 double axes = this->
a[0] + incl->
a[0];
205 if (dist > axes * axes + epsilon)
return false;
222 double aa = (1 - 1
e-4) *
a[0];
224 ;
if ( (
origin[0] - aa) < bb1[0] || bb2[0] < (
origin[0] + aa) )
return false;
225 ;
if ( (
origin[1] - aa) < bb1[1] || bb2[1] < (
origin[1] + aa) )
return false;
226 if (
P->
twodim ==
false)
if ( (
origin[2] - aa) < bb1[2] || bb2[2] < (
origin[2] + aa) )
return false;
251 double a1,
double a2,
double a3,
double e1,
double e2,
double e3 )
273 if (
a[i] == -1.0)
a[i] =
INFTY;
274 else _errorr(
"negative axis is not equal to -1.0");
337 switch (this->
shape) {
351 _errorr(
"InclusionRecord :: point_is_inside: unknown inclusion shape\n");
354 return l <=
SQR(1 + epsilon);
380 glob[i] += this->
origin[i];
434 this->
Epsilon_Tau[strainID][j] /= this->n_approx_points;
452 double x, y, x2, y2, x3, y3, x4, y4;
468 y = this->
approx_points[j][1] - this->origin[1];y2 = y*y;y3 = y*y*y;y4 = y*y*y*y;
524 for (
int j = 0; j < 5; j++)
526 this->Epsilon_Tau[strainID][i] = R.
v[0];
531 _errorr(
"Not implemented yet.");
552 _errorr(
"3D not implemented yet.");
555 double m[5], n[5], Cs[5], B[5], e_z[3], e_z_t[3];
580 #define _ACT_RAD_MULT_2d 6. //must be type double 581 #define _ACT_RAD_MULT_3d 6. //must be type double 585 #define Power( a, b ) ( ( b == 2 )? SQR( a ) : pow( a, b ) )//because of MATHEMATICA CForm[] syntax 588 #define L1111 C[__1111_] 589 #define L1122 C[__1122_] 590 #define L1133 C[__1133_] 592 #define L2211 C[__2211_] 593 #define L2222 C[__2222_] 594 #define L2233 C[__2233_] 596 #define L3311 C[__3311_] 597 #define L3322 C[__3322_] 598 #define L3333 C[__3333_] 600 #define L1212 C[__1212_] 602 #define L2323 C[__2323_] 604 #define L1313 C[__1313_] 607 #define Ll1111 C1[__1111_] 608 #define Ll1122 C1[__1122_] 609 #define Ll1133 C1[__1133_] 611 #define Ll2211 C1[__2211_] 612 #define Ll2222 C1[__2222_] 613 #define Ll2233 C1[__2233_] 615 #define Ll3311 C1[__3311_] 616 #define Ll3322 C1[__3322_] 617 #define Ll3333 C1[__3333_] 619 #define Ll1212 C1[__1212_] 621 #define Ll2323 C1[__2323_] 623 #define Ll1313 C1[__1313_] 626 #define S1111 S[__1111_] 627 #define S1122 S[__1122_] 628 #define S1133 S[__1133_] 630 #define S2211 S[__2211_] 631 #define S2222 S[__2222_] 632 #define S2233 S[__2233_] 634 #define S3311 S[__3311_] 635 #define S3322 S[__3322_] 636 #define S3333 S[__3333_] 638 #define S1212 S[__1212_] 640 #define S2323 S[__2323_] 642 #define S1313 S[__1313_] 753 std::cout <<
"Matice C" << std::endl;
754 for (
int i = 0; i < 12; i++)
755 std::cout <<
"C[" << i <<
"] = " << C[i] << std::endl;
756 std::cout << std::endl;
758 std::cout <<
"Matice C* = C1 - C" << std::endl;
759 for (
int i = 0; i < 12; i++)
760 std::cout <<
"C*[" << i <<
"] = " << C1[i] << std::endl;
761 std::cout << std::endl;
763 std::cout <<
"Matice S" << std::endl;
764 for (
int i = 0; i < 12; i++)
765 std::cout <<
"S[" << i <<
"] = " << S[i] << std::endl;
766 std::cout << std::endl;
768 std::cout <<
"Matice B" << std::endl;
769 for (
int i = 0; i < 12; i++)
770 std::cout <<
"B[" << i <<
"] = " << oper[i] << std::endl;
771 std::cout << std::endl;
781 if (answer == NULL)
_errorr(
"Field for Eshelby tensor must be allocated" );
792 if (answer == NULL)
_errorr(
"Field for Eshelby tensor must be allocated" );
802 if (answer == NULL)
_errorr(
"Field for Eshelby tensor must be allocated" );
813 if (answer == NULL)
_errorr(
"Field for Eshelby tensor must be allocated" );
823 if (answer == NULL)
_errorr(
"Field for Eshelby tensor must be allocated" );
832 if (answer == NULL)
_errorr(
"Field for Eshelby tensor must be allocated" );
868 for (
int i = lc; i<lc + nlc; i++)
897 for (
int i=lc; i<lc+nlc; i++)
942 for (
int i = 0; i < nlc; i++) {
950 delete [] globPert_strain_SIFCM;
957 for (
int i = 0; i < nlc; i++) {
961 for (
int j = 0; j < 3; j++) eps.
v[j] = -e_t_SIFCM[i][j];
965 for (
int j = 0; j < 3; j++) eps.
v[j] += e_s_ext_add[i][j];
993 ((
InclusionRecord3D*)
this)->esuf->giveEshelbyFieldsOfOnePoint(point, lc, nlc, disp, strn);
1153 if (nlc==0)
_errorr(
"zero nlc");
1158 for (
int i=0; i<nlc; i++)
1164 for (
int i=0; i<nlc; i++)
1181 double a1 =
a[0], a2 =
a[1], a3 =
a[2];
1183 if (a1 < a2 || a2 < a3)
_errorr(
"semiaxes not sorted");
1184 if (a1 < 0.0)
_errorr(
"negative semiaxis");
1189 if (!( a2 <
INFTY))
_errorr3(
"inclusion %ld with prescribed %s shape: 2. axis is infinite", this->
id+1,
IST_e2s (shp_o));
1190 if (!( a3 <
INFTY))
_errorr3(
"inclusion %ld with prescribed %s shape: 3. axis is infinite", this->
id+1,
IST_e2s (shp_o));
1191 if (!( a1 > 0.0))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. axis is 0.0", this->
id+1,
IST_e2s (shp_o));
1192 if (!( a2 > 0.0))
_errorr3(
"inclusion %ld with prescribed %s shape: 2. axis is 0.0", this->
id+1,
IST_e2s (shp_o));
1193 if (!( a3 > 0.0))
_errorr3(
"inclusion %ld with prescribed %s shape: 3. axis is 0.0", this->
id+1,
IST_e2s (shp_o));
1194 if (!( a1 > a2))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. axis is not bigger then 2. one", this->
id+1,
IST_e2s (shp_o));
1195 if (!( a2 > a3))
_errorr3(
"inclusion %ld with prescribed %s shape: 2. axis is not bigger then 3. one", this->
id+1,
IST_e2s (shp_o));
1198 if (!( a1 > 0.0))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. axis is 0.0", this->
id+1,
IST_e2s (shp_o));
1199 if (!( a1 == a2))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. and 2. axes are not equal", this->
id+1,
IST_e2s (shp_o));
1200 if (!( a2 == a3))
_errorr3(
"inclusion %ld with prescribed %s shape: 2. and 3. axes are not equal", this->
id+1,
IST_e2s (shp_o));
1203 if (!( a3 <
INFTY))
_errorr3(
"inclusion %ld with prescribed %s shape: 3. axis is infinite", this->
id+1,
IST_e2s (shp_o));
1204 if (!( a1 > 0.0))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. axis is 0.0", this->
id+1,
IST_e2s (shp_o));
1205 if (!( a3 > 0.0))
_errorr3(
"inclusion %ld with prescribed %s shape: 3. axis is 0.0", this->
id+1,
IST_e2s (shp_o));
1206 if (!( a1 == a2))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. and 2. axes are not equal", this->
id+1,
IST_e2s (shp_o));
1207 if (!( a1 > a3))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. axis is not bigger then 3. one", this->
id+1,
IST_e2s (shp_o));
1210 if (!( a2 <
INFTY))
_errorr3(
"inclusion %ld with prescribed %s shape: 2. axis is infinite", this->
id+1,
IST_e2s (shp_o));
1211 if (!( a1 > 0.0))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. axis is 0.0", this->
id+1,
IST_e2s (shp_o));
1212 if (!( a2 > 0.0))
_errorr3(
"inclusion %ld with prescribed %s shape: 2. axis is 0.0", this->
id+1,
IST_e2s (shp_o));
1213 if (!( a1 > a2))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. axis is not bigger then 2. one", this->
id+1,
IST_e2s (shp_o));
1214 if (!( a2 == a3))
_errorr3(
"inclusion %ld with prescribed %s shape: 2. and 3. axes are not equal", this->
id+1,
IST_e2s (shp_o));
1240 default:
_errorr2(
"Not supported inclusion shape %s",
IST_e2s (shp_o));
1246 if (a1 == 0.0)
_errorr2(
"inclusion %ld: zero 1. axis - unsupported", this->
id+1);
1248 else if (a1 ==
INFTY) {
1250 if (a2 == 0.0)
_errorr2(
"inclusion %ld: infinity 1. axis and zero 2. axis - unsupported ", this->
id+1);
1252 else if (a2 ==
INFTY)
_errorr2(
"inclusion %ld: infinity 1. axis and infinity 2. axis - unsupported", this->
id+1);
1256 if (a3 < max*a2)
_errorr2(
"inclusion %ld: infinity 1. axis and zero 3. axis - unsupported ", this->
id+1);
1258 else if (a2 - a3 < min*a2)
errol;
1266 if (a2 < max*a1)
_errorr2(
"inclusion %ld: any 1. axis and zero 2. axis - unsupported ", this->
id+1);
1268 else if (a1 - a2 < min*a1) {
1270 if (a3 < max*a2)
errol;
1272 else if (a2 - a3 < min*a2) shp_n =
IS_SPHERE;
1290 if (shp_o != shp_n) {
1295 _warningg3(
"inclusion %ld with prescribed %s shape: shape is different - it was changed", this->
id+1,
IST_e2s (shp_o));
1298 else _errorr3(
"inclusion %ld with prescribed %s shape: unsupported shape conversion", this->
id+1,
IST_e2s (shp_o));
1300 else {
_warningg(
"shape is different");
return shp_o; }
1302 default:
_errorr2(
"Not supported inclusion shape %s",
IST_e2s (shp_o));
1311 _errorr(
"return have to be used above");
1328 switch (this->
shape) {
1338 _errorr(
"Unknown shape of inclusion " );
1342 switch (this->
shape) {
1352 _errorr(
"Unknown shape of inclusion " );
1363 if (!prevInclRec3D)
_errorr(
"");
1366 prevInclRec3D = NULL;
1391 if (prevInclRec3D && prevInclRec3D->
E == this->E && prevInclRec3D->
nu == this->nu)
1398 std::cout <<
"Matice B" << std::endl;
1399 std::cout << inclRec[0].transfTensOper[4] << std::endl;
1400 std::cout << inclRec[0].transfTensOper[5] << std::endl;
1401 std::cout << inclRec[0].transfTensOper[7] << std::endl;
1402 std::cout << inclRec[0].transfTensOper[8] << std::endl;
1403 std::cout << inclRec[0].transfTensOper[10] << std::endl;
1404 std::cout << std::endl;
1406 std::cout <<
"LocRemoteStrain" << std::endl;
1407 for (
int i = 0; i < 6; i++)
1408 std::cout <<
"[" << i <<
"]" << inclRec[0].locRemoteStrain[0][i] << std::endl;
1409 std::cout << std::endl;
1411 std::cout <<
"LocEigStrain" << std::endl;
1412 for (
int i = 0; i < 6; i++)
1413 std::cout <<
"[" << i <<
"]" << inclRec[0].
locEigStrain[0][i] << std::endl;
1414 std::cout << std::endl;
1415 std::cout << std::endl;
1428 double locRemoteStrain[6];
1463 double auxStrain[6] = { 0., 0., 0., 0., 0., 0. };
1492 double rx = this->
origin[0] - point[0];
1493 double ry = this->
origin[1] - point[1];
1494 double rz = this->
origin[2] - point[2];
1577 double a1 =
a[0], a2 =
a[1];
1579 if (a1 < a2)
_errorr(
"semiaxes not sorted");
1580 if (a1 < 0.0)
_errorr(
"negative semiaxis");
1585 if (!( a2 > 0.0))
_errorr3(
"inclusion %ld with prescribed %s shape: 2. axis is 0.0", this->
id+1,
IST_e2s (shp_o));
1586 if (!( a1 > a2))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. axis is not bigger then 2. one", this->
id+1,
IST_e2s (shp_o));
1589 if (!( a1 > 0.0))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. axis is 0.0", this->
id+1,
IST_e2s (shp_o));
1590 if (!( a1 == a2))
_errorr3(
"inclusion %ld with prescribed %s shape: 1. and 2. axes are not equal", this->
id+1,
IST_e2s (shp_o));
1600 default:
_errorr2(
"Not supported inclusion shape %s",
IST_e2s (shp_o));
1606 if (a1 == 0.0)
_errorr2(
"inclusion %ld: zero 1. axis - unsupported", this->
id+1);
1608 else if (a1 ==
INFTY) {
1610 if (a2 == 0.0)
_errorr2(
"inclusion %ld: infinity 1. axis and zero 2. axis - unsupported ", this->
id+1);
1612 else if (a2 ==
INFTY)
_errorr2(
"inclusion %ld: infinity 1. axis and infinity 2. axis - unsupported", this->
id+1);
1619 if (a2 < max*a1)
errol;
1621 else if (a1 - a2 < min*a1) shp_n =
IS_CIRCLE;
1629 if (shp_o != shp_n) {
1634 _warningg3(
"inclusion %ld with prescribed %s shape: shape is different - it was changed", this->
id+1,
IST_e2s (shp_o));
1637 else _errorr3(
"inclusion %ld with prescribed %s shape: unsupported shape conversion", this->
id+1,
IST_e2s (shp_o));
1639 else {
_warningg(
"shape is different");
return shp_o; }
1641 default:
_errorr2(
"Not supported inclusion shape %s",
IST_e2s (shp_o));
1677 if (!prevInclRec2D)
_errorr(
"");
1680 prevInclRec2D = NULL;
1686 if (prevInclRec2D != NULL && prevInclRec2D->
E == this->E && prevInclRec2D->
nu == this->nu){
1727 if(index==1111)
return Sext.
g(0,0);
1728 if(index==2222)
return Sext.
g(1,1);
1729 if(index==1122)
return Sext.
g(0,1);
1730 if(index==2211)
return Sext.
g(1,0);
1731 if(index==1212)
return Sext.
g(2,2);
1744 if(index==1)
return I1;
1745 if(index==2)
return I2;
1746 if(index==11)
return I11;
1747 if(index==22)
return I22;
1748 if(index==12 || index==21)
return I12;
1755 if(delitel==0)delitel=1000000;
1756 if(
a[0]<
a[1]){
return a[0]/delitel;}
else{
return a[1]/delitel;}
1781 for(i=0;i<8;i++)
P_b[i].spocitat();
1782 for(i=0;i<2;i++)
P_a[i].spocitat();
1804 if(smer1==1)
return (
P_a[1].
I(index)-
I(index))/(
h);
1805 if(smer1==2)
return (
P_a[0].
I(index)-
I(index))/(
h);
1809 if(smer1==1)
return (
P_b[4].
I(index) - 2.*
I(index) +
P_b[3].
I(index) )/(
H*
H);
1810 if(smer1==2)
return (
P_b[1].
I(index) - 2.*
I(index) +
P_b[6].
I(index) )/(H*H);
1829 Sext.
g(2, 2) = 1. / (1. -
P->
matrix->
nu())*((
a[0] *
a[0] +
a[1] *
a[1]) / (2.*(a[0] + a[1])*(a[0] + a[1])) + (0.5 -
P->
matrix->
nu()));
1843 I1 = 4.*
PI*
a[1] / (
a[0] +
a[1]);
1844 I2 = 4.*
PI*
a[0] / (
a[0] +
a[1]);
1845 I12 = 4.*
PI / (
a[0] *
a[0] + 2.*
a[0] *
a[1] +
a[1] *
a[1]);
1846 I11 = 1. / 3. * (4. *
PI / (
a[0] *
a[0]) -
I12);
1847 I22 = 1. / 3. * (4. *
PI / (
a[1] *
a[1]) -
I12);
1852 Sext.
g(2, 2) = 2. / (2. - 2.*
P->
matrix->
nu())*((
a[0] *
a[0] +
a[1] *
a[1]) / (2.*(a[0] + a[1])*(a[0] + a[1])) + (1. - 2.*
P->
matrix->
nu()) / 2.);
1855 double b =
a[0] *
a[0] +
a[1] *
a[1] -
x[0] *
x[0] -
x[1] *
x[1];
1856 double c =
a[0] *
a[0] *
a[1] *
a[1] - x[0] * x[0] *
a[1] *
a[1] - x[1] * x[1] *
a[0] *
a[0];
1857 double Di = b*b - 4. * c;
1858 lambda = 0.5*(-b + sqrt(Di));
1859 I1 = 4.*
PI*a[0] * a[1] / (a[1] * a[1] - a[0] * a[0])*(sqrt((a[1] * a[1] +
lambda) / (a[0] * a[0] +
lambda)) - 1.);
1860 I2 = 4.*
PI*a[0] * a[1] / (a[0] * a[0] - a[1] * a[1])*(sqrt((a[0] * a[0] +
lambda) / (a[1] * a[1] +
lambda)) - 1.);
1861 I12 = 1.*(
I2 -
I1) / (a[0] * a[0] - a[1] * a[1]);
1876 double _I1,_I2,_I11,_I22,_I12;
1879 _I11 = _I22 = _I12 =
PI / (
a[0] *
a[0]);
1882 S[4] = 1. / (1. -
P->
matrix->
nu())*((
a[0] *
a[0] +
a[1] *
a[1]) / (2.*(a[0] + a[1])*(a[0] + a[1])) + (0.5 -
P->
matrix->
nu()));
1885 _I1 = 4.*
PI*
a[1] / (
a[0] +
a[1]);
1886 _I2 = 4.*
PI*
a[0] / (
a[0] +
a[1]);
1887 _I12 = 4.*
PI / ((
a[0] +
a[1])*(
a[0] +
a[1]));
1888 _I11 = 1. / 3. * (4. *
PI / (
a[0] *
a[0]) - _I12);
1889 _I22 = 1. / 3. * (4. *
PI / (
a[1] *
a[1]) - _I12);
1894 S[4] = 1. / (1. -
P->
matrix->
nu())*((
a[0] *
a[0] +
a[1] *
a[1]) / (2.*(a[0] + a[1])*(a[0] + a[1])) + (0.5 -
P->
matrix->
nu()));
1909 +(1.0-
P->
matrix->
nu())*(
r(i,l)*
x[k-1]*
dI(k,j,0) +
r(j,l)*
x[k-1]*
dI(k,i,0) +
r(i,k)*
x[l-1]*
dI(l,j,0) +
r(j,k)*
x[l-1]*
dI(l,i,0) )
1910 -
r(i,j)*
x[k-1]*(
dI(k,l,0)-pow(
a[i-1],2)*
dI(10*k+i,l,0)) - (
r(i,k)*
x[j-1]+
r(j,k)*
x[i-1])*(
dI(j,l,0)-pow(
a[i-1],2)*
dI(10*i+j,l,0))
1911 -(
r(i,l)*
x[j-1]+
r(j,l)*
x[i-1])*(
dI(j,k,0)-pow(
a[i-1],2)*
dI(10*i+j,k,0))-
x[i-1]*
x[j-1]*(
dI(j,l,k)-pow(
a[i-1],2)*
dI(10*i+j,l,k))
1950 double m[5], n[5], Cs[5], B[5], e_z[3];
1978 double m[5], n[5], Cs[5], B[5], e_z[3];
2017 double m[5], n[5], Cs[5], B[5], e_z[3];
2039 double m[5], n[5], Cs[5], B[5], e_z[3],e_z_t[3];
2063 double m[5], n[5], Cs[5], B[5], e_z[3], e_z_t[3];
2073 else for (i = 0; i < 3; i++)e_z_t[i] = e_z_add[i];
2088 for (
int i = lc; i < lc + nlc; i++) {
2090 for (
int j = 0; j < 3; j++)
2091 epsTau.
v[j] = this->Epsilon_Tau[i][j];
2130 double _1min2nu = 1. - _2nu;
2131 double multTRN = 1. / (8. *
PI * (1. -
P->
matrix->
nu()));
2133 L.
g(0, 0) = multTRN * (
x[0] * (_1min2nu *
I(1) + 3. *
a[0] *
a[0] *
I(11)));
2135 L.
g(1, 1) = multTRN * (
x[1] * (_1min2nu *
I(2) + 3. *
a[1] *
a[1] *
I(22)));
2137 L.
g(0, 1) = multTRN * (
x[0] * (_2nu *
I(1) -
I(2) +
a[0] *
a[0] *
I(12)));
2139 L.
g(1, 0) = multTRN * (
x[1] * (_2nu *
I(2) -
I(1) +
a[1] *
a[1] *
I(21)));
2141 L.
g(0, 2) = 2.*multTRN * (
x[1] * (_1min2nu *
I(2) +
a[0] *
a[0] *
I(12)));
2142 if (!
pointInside)
L.
g(0, 2) += 2.*multTRN *
x[0] *
x[0] * (-
dI(1, 2, 0) +
a[0] *
a[0] *
dI(11, 2, 0));
2143 L.
g(1, 2) = 2.*multTRN * (
x[0] * (_1min2nu *
I(1) +
a[1] *
a[1] *
I(21)));
2144 if (!
pointInside)
L.
g(1, 2) += 2.*multTRN *
x[0] *
x[1] * (-
dI(1, 2, 0) +
a[1] *
a[1] *
dI(21, 2, 0));
2146 vektor vect(2), etset(3);
2147 for (
int i = lc; i < lc + nlc; i++) {
2148 for (
int j = 0; j < 3; j++)
2149 etset.v[j] = this->Epsilon_Tau[i][j];
#define VEC_SQR_NORM_3D(x, y, z)
Class eshelbySoluUniformField.
void set_Euller_angles_deg(double x)
void set_centroids(double x, double y)
Class eshelbySoluEllipticIntegralsPenny.
void update_approximations(int lc)
int give_VM_TENS_RANGE(void) const
Gives range of a second order tensor in Voigt-Mandel notation.
double * origin
coordinates of the inclusions' centorids
const char * IST_e2s(InclusionGeometry ig)
Inclusion shapes' type - enum to string.
bool point_is_inside(const double *coords, double epsilon=0.0) const
Function returns the position of a given point related to an inclusion.
void addtot()
Function add locEigTot to globEigTot.
void update_eps_tau(int strainID, const double *e_z_add)
InclusionGeometry giveInclusionGeometry(InclusionGeometry shp_o) const
Function detects the inclusion geometry according the mutual aspect ratio among the semiaxes...
void copy2DeshelbyTensor_reduced2full(const double *a, double **b)
Function copies and converts 2D eshelby/stiffness tensor saved in reduced row-wise vector 'a' to full...
int give_dimension(void) const
double r(int i, int j)
Kronecker delta.
Class eshelbySoluEllipticIntegralsEllipsoid.
double * T
GLOBAL->LOCAL displacement vector transfrmation matrix; 3x3 or 2x2 for 3d or 2d.
Class of the functions calculating the values of elliptic integrals and its derivatives of oblate sph...
virtual int give_nLC(void) const
Give number of load cases, e.i. number of load cases, i.e. number of Remote_strain fields...
InclusionGeometry giveInclusionGeometry(InclusionGeometry shp_o) const
Function detects the inclusion geometry according the mutual aspect ratio among the semiaxes...
void set_all_3d(double x, double y, double z, double e, double n, double a1, double a2, double a3, double e1, double e2, double e3)
Class of the functions returning the Ferers-Dysons elliptic integral values as well as its derivative...
bool point_is_affected(const double *point) const
Returns true, if the given point is inside of the action radius of the receiver.
double * C
isotropic stiffness matrix of the infinite medium (infinite matrix), saved in reduced form...
void init_EigStrain_LC(int lc)
Class InclusionRecord contains and handles all inclusion data.
const double ** give_EshelbyPertDisplc_internal(int lc, int nlc, const double *coords)
void rovna_se(vektor &co)
void rotate_vector(vektor &V, double angle)
void add_EshelbyPertStrain_internal_SIFCM(double **strain, int lc, int nlc, double **e_t_SIFCM)
int give_EA_RANGE(void) const
Gives vector range, same as dimension.
double & g(int radek, int sloupec)
void copy3DeshelbyTensor_reduced2full(const double *a, double **b)
Function copies and converts 3D eshelby/stiffness tensor saved in reduced row-wise vector 'a' to full...
int nstrain_one(void) const
const Problem * P
problem description
eshelbySoluUniformField * esuf
void Eps02EpsTau(double *e_tau, const double *e_0)
Namespace MatrixOperations.
void initialize(const Inclusion *prevInclRec)
Initialization of this inclusion. Computes characteristic matrices: Eshelby tensor, ...
bool twodim
2 dimension problem; 3d is default; twodim == true - 2d, twodim == false - 3d
double ** displacement
Calculated value - global displacement field.
virtual void computeVolume()
double x[3]
Global coordinates of a point.
void giveReducedIsoStiffMatrix(double *C, double E, double nu, bool twodim)
Function gives the reduced isotropic stiffness matrix of a homogeneous material.
void give_StiffnessMatrixFull(double *answer) const
Copy stiffness tensor into full matrix answer.
int give_VECT_RANGE(void) const
Gives vector range, same as dimension.
void inverze_3x3(matice &d)
#define _warningg3(_1, _2, _3)
double actionRadius
Action radius of the inclusion.
void CopyVector(const double *src, double *dest, long n)
Function copy given number of components from vector, 'a' to vector 'b'.
void give_EshelbyMatrixFull(double **answer) const
Copy Eshelby tensor into full matrix answer.
void add_EshelbyPertStress_internal_SIFCM(double **stress, int lc, int nlc, double **e_t_SIFCM, double **e_s_ext_add)
int approximation
Approximation of epsilon tau - 0 = constant, 1 = linear, ...
virtual bool is_converted_to_equivalent(void) const
Give type of ...
InclusionRecord3D(long i, const Problem *p)
Constructor.
void giveInverseMatrix3x3to5(double *answer, const double *m)
Function computes inverse of the eshelby-like 3x3 matrix 'm' saved in reduced 3x3to5 form...
void set_Semiaxes_dimensions(double x, double y)
#define DIST_POINTS_SQR_2D(P1, P2)
Class eshelbySoluEllipticIntegralsCylinder.
double * SInv
Inverse of Eshelby tensor.
void giveTVproduct_6is6x6to12and6(double *result, const double *T, const double *vect)
Function gives product of tensor and vector - 'result = T * vect'.
double * C
Isotropic elastic stiffness tensor of an inclusion stored in reduced form (from the total 9/36 matrix...
double dI(int index, int smer1, int smer2)
Gives the derivation of I.
const double ** give_EshelbyPertStress_internal(int lc, int nlc)
int MaticexVektor(vektor &res, matice &mat, vektor &vek)
void SBA_updateGlobAndLocStrains(Point *point)
Function modifies/updates the actuall local and global eigenstrains in inclusion centroids due to the...
virtual void computeVolume()=0
#define DIST_POINTS_SQR_3D(P1, P2)
double x_last_derivation[2]
void giveMatrixVectorProduct(const double *mtrx, const double *vect, double *resVect, long n)
Function gives the product of a regular matrix with a vector.
bool scan_globEigStrain_LC(Stream *stream, int lc)
void give_EshelbyPertFields_external(Point *point, int lc, int nlc, bool disp, bool strn)
Function gives the 'Eshelby' STRAIN and DISPLACEMENT field in an arbitrary EXTERNAL point for given l...
double derivative_step(double delitel)
Function sets the size of a derivative step according to the semiaxes size.
Class eshelbySoluEllipticIntegrals.
The header file of usefull macros.
double globEigStrainTotal[6]
total global eigenstrain field evaluated by 'self_balance' algorithm
void SubtractTwoVectors(const double *v1, const double *v2, double *answer, long n)
Function subtracts two vectors of entries. answer = v1 - v2.
double * eAngles
Euller angles.
void rotateStrain_L2G(const double *loc, double *glob) const
Function rotate local strain to global.
void CleanArray2d(double **a, long rows, long columns)
Function cleans an 2d 'double' array, initialize each value being 0-zero.
Inclusion(long i, const Problem *p)
Constructor.
void compute_from_eps_tau(const double *point, vektor &es, vektor &et)
Computes strain perturbation for the set epsilon_tau=et.
virtual void allocate_nlc_fields(void)
Class eshelbySoluEllipticIntegralsOblateSpheroid.
int give_ISO_C_RANGE(void) const
Gives range of ...
double * Te
GLOBAL->LOCAL strain/stress tensor transfrmation matrix; full matrix 6x6 or 3x3 for 3d or 2d...
double ** globPert_displc
u star - Global perturbation displacement. Toto muze byt alokovany v problemu a odtud jen ukazovatko...
double ** locEigStrain_LC
predchazejici arrays slouzi vsude v balancingu pro vypocet v danem lc, tyto pole schovavaji vysledky ...
void set_all_2d(double x, double y, double e, double n, double a1, double a2, double e1)
bool scan_eAngles_RAD(Stream *stream)
Single Point data structure - contribution from Single inclusion.
double give_semiaxes_min_difference(void) const
Give the variable min_axes_diff.
void compute_initial_eps_tau(int strainID)
void compute_strain_pert_from_eps_zero_ext(const double *point, double *es, double *ez)
double ** strain
Calculated value - global strain fields.
double ** approx_points_eps_tau
bool point_is_affected(const double *point) const
Returns true, if the given point is inside of the action radius of the receiver.
void SBA_computeInitialStrains(int lc)
Function computes basic/own eigen strains (not influenced by other inclusions) of lc-th load case...
double * TInv
LOCAL->GLOBAL displacement vector transfrmation matrix; TInv = T^-1 (inversion) = T^T (transposed) ...
eshelbySoluEllipticIntegrals * ellInt
double eInt[13]
elliptic potentials of an internal point (position independent)
void giveTTproduct_3x3to5is3x3to5and3x3to5(double *result, const double *T1, const double *T2)
Function gives product of tensor and tensor - 'result = T1 * T2'.
void SumTwoVectors(const double *v1, const double *v2, double *answer, long n)
Function sums two vectors of entries. resVec = vec1 - vec2.
Class eshelbySoluEllipticIntegralsFlatEllipsoid.
virtual ~InclusionRecord2D()
Destructor.
double compute_D(int i, int j, int k, int l)
double ndiff_1
derivative step for the first derivations
bool is_inside_of_BB(const double *bb1, const double *bb2) const
check the receiver is inside of the bounding box defined by lower left bb1 and upper right bb2 corner...
virtual ~InclusionRecord3D()
Destructor.
double ** globPert_stress
sigma star - Global perturbation stress.
Class inclusion contains and handles all inclusion data.
void compute_strain_pert_from_eps_zero_int(const double *point, double *es, double *ez)
double locEigStrain[6]
actual local eigenstrain used during 'self_balance' algorithm
void check_dim(int i) const
const double ** give_EshelbyPertStrain_internal(int lc, int nlc)
Class eshelbySoluEllipticIntegralsProlateSpheroid.
void rotateDisplc_L2G(const double *loc, double *glob) const
const double ** remote_strains(void) const
void give_TeMatrix_G2L(double *answer) const
Copy Te (G2L strain transformation matrix) tensor into full matrix answer.
bool any_derivative_preparation_computed
double nu
Poisson's ratio.
void define(int radku, int sloupcu)
double * a
Inclusion semiaxes' dimensions in global arrangement.
static bool ellipses_overlap(const Inclusion *inc1, const Inclusion *inc2)
void MultiplyVector(double *a, long n, double val)
Function multiplies 'n' components of field 'a' by value 'val'.
void EAdeg2rad(void)
Euller angles conversion from degrees to radians.
double ** Epsilon_Tau
field of epsilon tau, set by SBalgorithm for every load
void rotateStrain_G2L(const double *glob, double *loc) const
double locEigStrainTot[6]
actual local eigenstrain used during 'self_balance' algorithm
double S_give(int index)
Function checks if the tensor S is computed for the current point and then returns the asked componen...
void transformCoords_L2G(const double *loc, double *glob) const
Function transforms (shift according to origin and rotate) local coordinates to global.
void SBA_computeInitialStrains(int lc)
Function computes basic/own eigen strains (not influenced by other inclusions) of lc-th load case...
virtual InclusionGeometry giveInclusionGeometry(InclusionGeometry shp_o) const =0
Function detects the inclusion geometry according the mutual aspect ratio among the semiaxes...
InclusionGeometry
Inclusion shapes' type.
#define _errorr3(_1, _2, _3)
void giveTVproduct_3is3x3to5and3(double *result, const double *T, const double *vect)
Function gives product of tensor and vector - 'result = T * vect'.
double ** globPert_strain
epsilon star - Global perturbation strain.
void getDisplacement(const double *point, double **displacement, int lc, int nlc, int _pointInside)
Computes displacement perturbation.
void gaussovaEliminace(matice &m, vektor &right)
double compute_supplement_energy(int lc)
virtual void computeVolume()
void give_TeMatrix_L2G(double *answer) const
Copy TeInv (L2G strain transformation matrix) tensor into full matrix answer.
virtual void giveEllipticIntegrals(double integrArray[13], double lambda, bool intpoint)=0
Function gives the values of Ferers-Dyson's elliptic integrals of the inclusion this->I.
void DeleteArray2D(bool **array, long d1)
Function deletes a 2D 'bool' array of dimension d1 x ??, allocated by new.
#define VEC_SQR_NORM_2D(x, y)
InclusionGeometry shape
inclusion shape
DiffTypes diffType
the type of differentiation actually used. (just for testing purposes)
void compute_eps_tau(int strainID, double *e_tau, double *e_z_add, bool add)
Class eshelbySoluEllipticIntegralsEllipticCylinder.
int noActingIncls
Number of acting inclusions.
void ActingIncls_allocate(void)
void derivative_preparation()
Function computes the integrals and tensor S in auxiliary points around the current point...
double ** Remote_strain
Remote strain fields == homogeneous strain tensor, stored in TVRN_THEORETICAL_FEEP notation...
double E
Young's modulus.
void giveTransformationStrainOperator(double oper[12], const double C[12], const double C1[12], const double S[12])
Function gives the operator converting remote field to transformation eigenstrain of an inclusion...
int find_overlap(const Inclusion *incl) const
Check overlap of the receiver and 'incl' inclusion.
double ** AllocateArray2D(long d1, long d2)
Operations with 2d, 3d, 4d arrays of various sizes.
double * S
Eshelby tensor.
void set_Youngs_modulus(double val)
void initialize(const Inclusion *prevInclRec)
Initialization of this inclusion. Computes characteristic matrices: Eshelby tensor, ...
void give_EshelbyMatrixReduced(double *answer) const
Copy Eshelby tensor into reduced vector answer.
Class eshelbySoluUniformFieldSphere; return the Eshelby solution of a spherical inclusion loaded by t...
Class eshelbySoluEllipticIntegralsSphere.
double give_semiaxes_max_difference(void) const
Give the variable max_axes_diff.
virtual void input_data_initialize_and_check_consistency(void)
double * TeInv
LOCAL->GLOBAL strain/stress tensor transfrmation matrix; full matrix 6x6 or 3x3 for 3d or 2d...
Class of the functions calculating the values of elliptic integrals and its derivatives of general el...
bool ST_scan_array(Stream *src, int n, int *dest)
scan/copy array of numbers from src to dest, src pointer is shifted over the field ...
double ** globEigStrain_LC
bool scan_locEigStrain_LC(Stream *stream, int lc)
int * actingIncls
Set of inclusions which act to the "this" one.
double give_VectorVectorProduct(const double *v1, const double *v2, long n)
Operations with 1d arrays of various length.
bool scan_locEigStrain_LC(Stream *stream, int lc)
static int ellipsoids_overlap(const Inclusion *inc1, const Inclusion *inc2)
void set_Poissons_ratio(double val)
void input_data_initialize_and_check_consistency(void)
Initialize input data readed form vtk file.
double ndiff_2
derivative step for the second derivations
void giveExtStrainPert(const double *point, double **strain, int lc, int nlc)
Computes strain perturbation for the epsilon_tau, computed in the ballancing process.
void allocate_nlc_fields(void)
void AddVector(const double *a, double *b, long n)
Function add given number of components from vector 'a' to vector 'b', b += a.
void compute_eps_tau_back(vektor &e_s_, vektor &e_t_)
virtual ~Inclusion()
Destructor.
InclusionRecord2D(long i, const Problem *p)
Constructor.
void transformCoords_G2L(const double *glob, double *loc) const
Function transforms (shift according to origin and rotate) global coordinates to local.
double SQRactionRadius
Action radius of the inclusion ^2.
MatrixRecord * matrix
matrix record
void give_StiffnessMatrixReduced(double *answer) const
Copy stiffness tensor into reduced vector answer.
bool give_semiaxis_min_difference_change(void) const
Give the variable min_axes_diff_change.
void input_data_initialize_and_check_consistency(void)
Initialize input data readed form vtk file.
bool scan_eAngles_DEG(Stream *stream)
Class of the functions calculating the values of elliptic integrals and its derivatives of prolate sp...
void allocate_nlc_fields(void)