53Quasicontinuum :: Quasicontinuum()
57Quasicontinuum :: ~Quasicontinuum()
62Quasicontinuum :: setNoDimensions(
Domain *d)
66 if ( dim == 2 || dim == 3 ) {
69 OOFEM_ERROR(
"Invalid number of dimensions. Only 2d and 3d domains are supported in QC simulation. \n");
75Quasicontinuum :: setupInterpolationMesh(
Domain *d,
int generateInterpolationElements,
int interpolationElementsMaterialNumber, std :: vector< IntArray > &newMeshNodes)
79 if ( generateInterpolationElements == 0 ) {
84 }
else if ( ( generateInterpolationElements == 1 ) || ( generateInterpolationElements == 2 ) ) {
90 noNewEl = newMeshNodes.size();
92 for (
int i = 1; i <= noNewEl; i++ ) {
96 OOFEM_ERROR(
"Invalid input field \"GenInterpElem\". Value: %d is not supported", generateInterpolationElements);
107Quasicontinuum :: createInterpolationElements(
Domain *d)
136 const char *elemType;
139 elemType =
"TrPlaneStress2d";
142 elemType =
"LTRSpace";
148 for (
int i = 1; i <= ninterpelem; i++ ) {
149 int elemNumber = nelem + i;
151 auto elem =
classFactory.createElement(elemType, elemNumber, d);
155 elem->initializeFrom(irEl, 1);
156 elem->setGlobalNumber(elemNumber);
164Quasicontinuum :: addCrosssectionToInterpolationElements(
Domain *d)
169 auto crossSection =
classFactory.createCrossSection(
"SimpleCS", ncrosssect, d);
173 crossSection->initializeFrom(irCS);
184Quasicontinuum :: applyApproach1(
Domain *d)
190 auto mat =
classFactory.createMaterial(
"IsoLE", nmat, d);
196 mat->initializeFrom(irMat);
204 for (
int i = 1; i <= ninterpelem; i++ ) {
212Quasicontinuum :: applyApproach2(
Domain *d,
int homMtrxType,
double volumeOfInterpolationMesh)
232 if ( ( n1 == 1 ) && ( n2 == 1 ) ) {
238 }
else if ( ( n1 == 2 ) && ( n2 == 2 ) ) {
243 }
else if ( ( n1 == 1 ) && ( n2 == 2 ) ) {
250 if ( !nodesOfMasterElem.
contains(mn) ) {
259 }
else if ( ( n1 == 2 ) && ( n2 == 1 ) ) {
266 if ( !nodesOfMasterElem.
contains(mn) ) {
277 OOFEM_WARNING(
"Element %d with non-qcNode can not be homogenized", i);
307 OOFEM_ERROR(
"Quasicontinuum can be applied only in QClinearStatic engngm");
316 double homogenizedE, homogenizedNu;
323 std::unique_ptr<Material> mat;
326 if ( homMtrxType == 1 ) {
333 }
else if ( homMtrxType == 2 ) {
341 Diso.
at(1, 1), Diso.
at(1, 2), 0, 0, 0, Diso.
at(1, 6), \
342 Diso.
at(2, 2), 0, 0, 0, Diso.
at(2, 6), 33, 0, 0, 0, 44, \
343 0, 0, 55, 0, Diso.
at(6, 6)
347 Diso.
at(1, 1), Diso.
at(1, 2), Diso.
at(1, 3), Diso.
at(1, 4), Diso.
at(1, 5), Diso.
at(1, 6), \
348 Diso.
at(2, 2), Diso.
at(2, 3), Diso.
at(2, 4), Diso.
at(2, 5), Diso.
at(2, 6), \
349 Diso.
at(3, 3), Diso.
at(3, 4), Diso.
at(3, 5), Diso.
at(3, 6), \
350 Diso.
at(4, 4), Diso.
at(4, 5), Diso.
at(4, 6), \
351 Diso.
at(5, 5), Diso.
at(5, 6), Diso.
at(6, 6)
354 OOFEM_ERROR(
"Invalid number of dimensions. Only 2d and 3d domains are supported in QC simulation. \n");
362 mat->initializeFrom(irMat);
370 for (
int i = 1; i <= ninterpelem; i++ ) {
378Quasicontinuum :: applyApproach3(
Domain *d,
int homMtrxType)
389 bool stiffnesAssigned =
false;
394 std :: vector< FloatMatrix > individualStiffnessMatrices;
395 std :: vector< FloatMatrix > individualStiffnessTensors;
396 individualStiffnessMatrices.resize(noIntEl,
FloatMatrix(6, 6));
397 individualStiffnessTensors.resize(noIntEl,
FloatMatrix(9, 9));
400 individualS0.
resize(noIntEl);
415 if ( ( n1 == 1 ) && ( n2 == 1 ) ) {
421 }
else if ( ( n1 == 2 ) && ( n2 == 2 ) ) {
436 stiffnesAssigned =
false;
437 stiffnesAssigned =
stiffnessAssignment(individualStiffnessTensors, individualS0, d, e, qn1, qn2);
439 if ( !stiffnesAssigned ) {
448 }
else if ( ( n1 == 1 ) && ( n2 == 2 ) ) {
455 if ( !nodesOfMasterElem.
contains(mn) ) {
467 }
else if ( ( n1 == 2 ) && ( n2 == 1 ) ) {
474 if ( !nodesOfMasterElem.
contains(mn) ) {
488 OOFEM_WARNING(
"Element %d with non-qcNode can not be homogenized", i);
497 double volumeofEl, th;
498 for (
int i = 1; i <= noIntEl; i++ ) {
503 volumeofEl = volumeofEl / th;
505 individualStiffnessMatrices [ i - 1 ].times(1 / volumeofEl);
530 OOFEM_ERROR(
"Quasicontinuum can be applied only in QClinearStatic engngm");
537 int nmat = originalNumberOfMaterials;
541 if ( homMtrxType == 1 ) {
542 double homogenizedE, homogenizedNu;
543 for (
int i = 1; i <= noIntEl; i++ ) {
546 auto mat =
classFactory.createMaterial(
"IsoLE", nmat, d);
552 mat->initializeFrom(irMat);
557 }
else if ( homMtrxType == 2 ) {
558 for (
int i = 1; i <= noIntEl; i++ ) {
559 FloatMatrix &Da = individualStiffnessMatrices [ i - 1 ];
561 auto mat =
classFactory.createMaterial(
"AnisoLE", nmat, d);
566 Da.
at(1, 1), Da.
at(1, 2), 0, 0, 0, Da.
at(1, 6), \
567 Da.
at(2, 2), 0, 0, 0, Da.
at(2, 6), 33, 0, 0, 0, 44, \
568 0, 0, 55, 0, Da.
at(6, 6)
572 Da.
at(1, 1), Da.
at(1, 2), Da.
at(1, 3), Da.
at(1, 4), Da.
at(1, 5), Da.
at(1, 6), \
573 Da.
at(2, 2), Da.
at(2, 3), Da.
at(2, 4), Da.
at(2, 5), Da.
at(2, 6), \
574 Da.
at(3, 3), Da.
at(3, 4), Da.
at(3, 5), Da.
at(3, 6), \
575 Da.
at(4, 4), Da.
at(4, 5), Da.
at(4, 6), \
576 Da.
at(5, 5), Da.
at(5, 6), Da.
at(6, 6)
579 OOFEM_ERROR(
"Invalid number of dimensions. Only 2d and 3d domains are supported in QC simulation. \n");
585 mat->initializeFrom(irMat);
595 int matNum = originalNumberOfMaterials;
597 for (
int i = 1; i <= noIntEl; i++ ) {
606Quasicontinuum :: homogenizationOfStiffMatrix(
double &homogenizedE,
double &homogenizedNu,
const FloatMatrix &Diso)
611 double a = Diso.
at(1, 1);
612 double b = Diso.
at(1, 2);
613 double d = Diso.
at(2, 2);
614 double f = Diso.
at(6, 6);
616 if ( 33 * a + 2 * b + 33 * d + 4 * f == 0 ) {
617 homogenizedE = 1.0e-20;
620 homogenizedE = 4 * ( a + 2 * b + d ) * ( 4 * a - 8 * b + 4 * d + f ) / ( 33 * a + 2 * b + 33 * d + 4 * f );
621 homogenizedNu = ( a + 66 * b + d - 4 * f ) / ( 33 * a + 2 * b + 33 * d + 4 * f );
640 double a = Diso.
at(1, 1) + Diso.
at(2, 2) + Diso.
at(3, 3);
641 double b = Diso.
at(4, 4) + Diso.
at(5, 5) + Diso.
at(6, 6);
643 if ( 5 * a + 13 * b == 0 ) {
644 homogenizedE = 1.0e-20;
647 homogenizedE = ( a + 2 * b ) * ( a + 11 * b ) / ( 15 * a + 39 * b );
648 homogenizedNu = ( 2 * a + b ) / ( 5 * a + 13 * b );
651 OOFEM_ERROR(
"Invalid number of dimensions. Only 2d and 3d domains are supported in QC simulation. \n");
667 OOFEM_ERROR(
"Material doesn't implement the required QC interface!");
677 OOFEM_ERROR(
"Invalid CrossSection of link %d. simpleCS is only supported CS of links in QC simulation. \n", e->
giveGlobalNumber() );
686 double TrussLength = sqrt( ( x2 - x1 ) * ( x2 - x1 ) + ( y2 - y1 ) * ( y2 - y1 ) + ( z2 - z1 ) * ( z2 - z1 ) );
688 n [ 0 ] = ( x2 - x1 ) / TrussLength;
689 n [ 1 ] = ( y2 - y1 ) / TrussLength;
690 n [ 2 ] = ( z2 - z1 ) / TrussLength;
692 for (
int i = 1; i <= 3; i++ ) {
693 for (
int j = 1; j <= 3; j++ ) {
694 for (
int k = 1; k <= 3; k++ ) {
695 for (
int l = 1; l <= 3; l++ ) {
696 D1.
at(3 * ( i - 1 ) + k, 3 * ( j - 1 ) + l) = TrussLength * Etruss * n [ i - 1 ] * n [ j - 1 ] * n [ k - 1 ] * n [ l - 1 ];
703 if ( !std :: isinf(Ry) ) {
704 S0 += TrussLength * area * Ry / 3;
710Quasicontinuum :: createGlobalStiffnesMatrix(
FloatMatrix &D,
double &S0,
Domain *d,
int homMtrxType,
double volumeOfInterpolationMesh)
723 for (
int t = 1; t <= noe; t++ ) {
732 OOFEM_ERROR(
"Material doesn't implement the required QC interface!");
751 double TrussLength = sqrt( ( x2 - x1 ) * ( x2 - x1 ) + ( y2 - y1 ) * ( y2 - y1 ) + ( z2 - z1 ) * ( z2 - z1 ) );
752 n [ 0 ] = ( x2 - x1 ) / TrussLength;
753 n [ 1 ] = ( y2 - y1 ) / TrussLength;
754 n [ 2 ] = ( z2 - z1 ) / TrussLength;
756 for (
int i = 1; i <= 3; i++ ) {
757 for (
int j = 1; j <= 3; j++ ) {
758 for (
int k = 1; k <= 3; k++ ) {
759 for (
int l = 1; l <= 3; l++ ) {
760 D1.
at(3 * ( i - 1 ) + k, 3 * ( j - 1 ) + l) = TrussLength * Etruss * n [ i - 1 ] * n [ j - 1 ] * n [ k - 1 ] * n [ l - 1 ];
766 StiffnessTensor.
add(D1);
768 if ( !std :: isinf(Ry) ) {
769 S0 += TrussLength * area * Ry / 3;
774 StiffnessTensor.
times(1 / volumeOfInterpolationMesh);
775 S0 = S0 / volumeOfInterpolationMesh;
799 if ( end1 == end2 ) {
804 individualStiffnessTensors [ indx - 1 ].add(stfTensorOf1Link);
805 individualS0 [ indx - 1 ] += s0Of1Link;
810 std::vector<double> lengths_;
816 int noIntersected = lengths.
giveSize();
817 if ( noIntersected == 0 ) {
825 lengths.
times(1 / totalLength);
826 double sumLength = lengths.
sum();
827 if ( (sumLength < 0.9999) || (sumLength > 1.0001) ) {
834 for (
int i = 1; i <= noIntersected; i++ ) {
835 int nel = intersected [ i - 1 ];
837 individualStiffnessTensors [ indx - 1 ].add(lengths.
at(i), stfTensorOf1Link);
838 individualS0 [ indx - 1 ] += lengths.
at(i) * s0Of1Link;
853 }
else if ( dim == 3 ) {
872 std::swap(end1, end2);
880 double TotalLength =
distance(X2, X1);
882 int numberOfIntersected = 0;
885 std::vector<FloatArray> intersectCoords;
886 double iLen, sumLength = 0.0;
897 switch ( numberOfIntersected ) {
899 lengths.push_back(0);
903 iLen =
distance(X1, intersectCoords[0]);
904 if ( iLen / TotalLength >= 1.e-6 ) {
905 lengths.push_back(iLen);
908 lengths.push_back(0);
915 iLens.
resize(numberOfIntersected);
916 for (
int nn = 1; nn <= numberOfIntersected; nn++ ) {
917 iLens.
at(nn) =
distance(X1, intersectCoords[nn - 1]);
920 if ( iLen / TotalLength >= 1.e-6 ) {
921 lengths.push_back(iLen);
924 lengths.push_back(0);
932 IntArray neighboursList, alreadyTestedElemList;
933 alreadyTestedElemList.
clear();
938 int nextElement = end1;
940 for (
int ii = 1; ii <= nome; ii++ ) {
941 int nel = nextElement;
948 for (
int k = 1; k <= intersected.
giveSize(); k++ ) {
951 neighboursList.
erase(index);
956 for (
int k = 1; k <= alreadyTestedElemList.
giveSize(); k++ ) {
959 neighboursList.
erase(index);
964 if ( neighboursList.
giveSize() == 0 ) {
969 for (
int k = 1; k <= neighboursList.
giveSize(); k++ ) {
970 iel = neighboursList.
at(k);
977 bool breakFor =
false;
978 switch ( numberOfIntersected ) {
984 iLen =
distance(X2, intersectCoords[0]);
985 if ( iLen / TotalLength >= 1.e-6 ) {
986 lengths.push_back(iLen);
990 lengths.push_back(0);
994 lengths.push_back(0);
1001 iLens.
resize(numberOfIntersected);
1002 for (
int nn = 1; nn <= numberOfIntersected; nn++ ) {
1003 iLens.
at(nn) =
distance(X2, intersectCoords[nn - 1]);
1006 if ( iLen / TotalLength >= 1.e-6 ) {
1007 lengths.push_back(iLen);
1013 lengths.push_back(0);
1020 for (
int nn = 1; nn < numberOfIntersected; nn++ ) {
1021 for (
int ii = nn + 1; ii <= numberOfIntersected; ii++ ) {
1023 iLens.
at(m) =
distance(intersectCoords[ii - 1], intersectCoords[nn - 1]);
1027 if ( iLen / TotalLength >= 1.e-6 ) {
1028 lengths.push_back(iLen);
1034 lengths.push_back(0);
1047 sumLength = std::accumulate(lengths.begin(), lengths.end(), 0.);
1048 if ( ( fabs(sumLength / TotalLength - 1) ) <= ( 0.0001 ) ) {
1053 if ( nextElement == 0 ) {
1065 intersected.
clear();
1072 if ( end2 < end1 ) {
1073 std::swap(end1, end2);
1074 std::swap(qn1, qn2);
1081 double TotalLength =
distance(X2, X1);
1083 int numberOfIntersected = 0;
1085 std::vector<FloatArray> intersectCoords;
1086 double iLen, sumLength = 0.0;
1099 switch ( numberOfIntersected ) {
1101 lengths.push_back(0);
1105 iLen =
distance(X1, intersectCoords[0]);
1106 if ( iLen / TotalLength >= 1.e-6 ) {
1107 lengths.push_back(iLen);
1110 lengths.push_back(0);
1117 iLens.
resize(numberOfIntersected);
1118 for (
int nn = 1; nn <= numberOfIntersected; nn++ ) {
1119 iLens.
at(nn) =
distance(X1, intersectCoords[nn - 1]);
1122 if ( iLen / TotalLength >= 1.e-6 ) {
1123 lengths.push_back(iLen);
1126 lengths.push_back(0);
1134 bool breakFor =
false;
1135 IntArray neighboursList, alreadyTestedElemList;
1136 alreadyTestedElemList.
clear();
1141 int nextElement = end1;
1143 for (
int ii = 1; ii <= nome; ii++ ) {
1144 int nel = nextElement;
1151 for (
int k = 1; k <= intersected.
giveSize(); k++ ) {
1154 neighboursList.
erase(index);
1159 for (
int k = 1; k <= alreadyTestedElemList.
giveSize(); k++ ) {
1162 neighboursList.
erase(index);
1166 if ( neighboursList.
giveSize() == 0 ) {
1171 for (
int k = 1; k <= neighboursList.
giveSize(); k++ ) {
1172 int iel = neighboursList.
at(k);
1182 switch ( numberOfIntersected ) {
1187 if ( iel == end2 ) {
1188 iLen =
distance(X2, intersectCoords[0]);
1189 if ( iLen / TotalLength >= 1.e-6 ) {
1190 lengths.push_back(iLen);
1194 lengths.push_back(0);
1198 lengths.push_back(0);
1203 if ( iel == end2 ) {
1205 iLens.
resize(numberOfIntersected);
1206 for (
int nn = 1; nn <= numberOfIntersected; nn++ ) {
1207 iLens.
at(nn) =
distance(X2, intersectCoords[nn - 1]);
1210 if ( iLen / TotalLength >= 1.e-6 ) {
1211 lengths.push_back(iLen);
1217 lengths.push_back(0);
1224 for (
int nn = 1; nn <= numberOfIntersected; nn++ ) {
1225 for (
int ii = nn + 1; ii <= numberOfIntersected; ii++ ) {
1227 iLens.
at(m) =
distance(intersectCoords[ii - 1], intersectCoords[nn - 1]);
1231 if ( iLen / TotalLength >= 1.e-6 ) {
1232 lengths.push_back(iLen);
1238 lengths.push_back(0);
1251 sumLength = std::accumulate(lengths.begin(), lengths.end(), 0.);
1252 if ( ( fabs(sumLength / TotalLength - 1) ) <= ( 0.0001 ) ) {
1257 if ( nextElement == 0 ) {
1267Quasicontinuum :: initializeConnectivityTableForInterpolationElements(
Domain *d)
1271 int noVertices1, noVertices2;
1276 for (
int j = 1; j <= nome; j++ ) {
1282 vertices1.
resize(noVertices1);
1283 for (
int k = 1; k <= noVertices1; k++ ) {
1286 for (
int i = 1; i <= nome; i++ ) {
1294 for (
int l = 1; l <= noVertices2; l++ ) {
1309 intersectCoords.
clear();
1313 double Ur1 = ( X2.
at(1) - X1.
at(1) ) / L;
1314 double Ur2 = ( X2.
at(2) - X1.
at(2) ) / L;
1315 double Ur3 = ( X2.
at(3) - X1.
at(3) ) / L;
1317 double Vr1 = Ur2 * X1.
at(3) - Ur3 *X1.
at(2);
1318 double Vr2 = Ur3 * X1.
at(1) - Ur1 *X1.
at(3);
1319 double Vr3 = Ur1 * X1.
at(2) - Ur2 *X1.
at(1);
1325 for (
int i = 1; i <= 3; i++ ) {
1326 U1.at(i) = B.
at(i) - A.
at(i);
1327 U2.at(i) = C.
at(i) - B.
at(i);
1328 U3.
at(i) = A.
at(i) - C.
at(i);
1334 V1.at(1) = U1.at(2) * A.
at(3) - U1.at(3) * A.
at(2);
1335 V1.at(2) = U1.at(3) * A.
at(1) - U1.at(1) * A.
at(3);
1336 V1.at(3) = U1.at(1) * A.
at(2) - U1.at(2) * A.
at(1);
1338 V2.at(1) = U2.at(2) * B.
at(3) - U2.at(3) * B.
at(2);
1339 V2.at(2) = U2.at(3) * B.
at(1) - U2.at(1) * B.
at(3);
1340 V2.at(3) = U2.at(1) * B.
at(2) - U2.at(2) * B.
at(1);
1342 V3.
at(1) = U3.
at(2) * C.
at(3) - U3.
at(3) * C.
at(2);
1343 V3.
at(2) = U3.
at(3) * C.
at(1) - U3.
at(1) * C.
at(3);
1344 V3.
at(3) = U3.
at(1) * C.
at(2) - U3.
at(2) * C.
at(1);
1348 double S1 = Ur1 * V1.at(1) + Ur2 *V1.at(2) + Ur3 *V1.at(3) + U1.at(1) * Vr1 + U1.at(2) * Vr2 + U1.at(3) * Vr3;
1349 double S2 = Ur1 * V2.at(1) + Ur2 *V2.at(2) + Ur3 *V2.at(3) + U2.at(1) * Vr1 + U2.at(2) * Vr2 + U2.at(3) * Vr3;
1350 double S3 = Ur1 * V3.
at(1) + Ur2 *V3.
at(2) + Ur3 *V3.
at(3) + U3.
at(1) * Vr1 + U3.
at(2) * Vr2 + U3.
at(3) * Vr3;
1354 if ( fabs(S1) <=
TOL ) {
1357 if ( fabs(S2) <=
TOL ) {
1360 if ( fabs(S3) <=
TOL ) {
1365 if ( ( S1 == 0 ) && ( S2 == 0 ) && ( S3 == 0 ) ) {
1369 intersectCoords.
clear();
1375 if ( ( ( S1 >= 0 ) && ( S2 >= 0 ) && ( S3 >= 0 ) ) || ( ( S1 <= 0 ) && ( S2 <= 0 ) && ( S3 <= 0 ) ) ) {
1377 double S = S1 + S2 + S3;
1384 double x = u1 * C.
at(1) + u2 *A.
at(1) + u3 *B.
at(1);
1385 double y = u1 * C.
at(2) + u2 *A.
at(2) + u3 *B.
at(2);
1386 double z = u1 * C.
at(3) + u2 *A.
at(3) + u3 *B.
at(3);
1393 if ( ( X2.
at(1) - X1.
at(1) ) != 0 ) {
1394 t = ( x - X1.
at(1) ) / ( X2.
at(1) - X1.
at(1) );
1396 if ( ( X2.
at(2) - X1.
at(2) ) != 0 ) {
1397 t = ( y - X1.
at(2) ) / ( X2.
at(2) - X1.
at(2) );
1399 t = ( z - X1.
at(3) ) / ( X2.
at(3) - X1.
at(3) );
1404 double EPS = 1.0e-12;
1405 if ( ( 0 < t +
EPS ) && ( t -
EPS < 1 ) ) {
1406 intersectCoords.
resize(3);
1407 intersectCoords.
at(1) = x;
1408 intersectCoords.
at(2) = y;
1409 intersectCoords.
at(3) = z;
1412 intersectCoords.
clear();
1416 intersectCoords.
clear();
1423Quasicontinuum :: intersectionTestSegmentTetrahedra3D(std::vector<FloatArray> &intersectCoords,
1427 intersectCoords.clear();
1432 intersectCoords.push_back(intersectCoord);
1437 intersectCoords.push_back(intersectCoord);
1442 intersectCoords.push_back(intersectCoord);
1447 intersectCoords.push_back(intersectCoord);
1450 return (
int)intersectCoords.
size();
1455Quasicontinuum :: intersectionTestSegmentTriangle2D(std::vector<FloatArray> &intersectCoords,
1459 intersectCoords.clear();
1464 intersectCoords.push_back(intersectCoord);
1469 intersectCoords.push_back(intersectCoord);
1474 intersectCoords.push_back(intersectCoord);
1477 return (
int)intersectCoords.
size();
1486 double a1x = A1.
at(1);
1487 double a1y = A1.
at(2);
1488 double a2x = A2.
at(1);
1489 double a2y = A2.
at(2);
1490 double b1x = B1.
at(1);
1491 double b1y = B1.
at(2);
1492 double b2x = B2.
at(1);
1493 double b2y = B2.
at(2);
1496 double f1 = std :: numeric_limits< float > :: infinity();
1497 double f2 = std :: numeric_limits< float > :: infinity();
1499 f1 = -( a2y - a1y ) / ( a1x - a2x );
1502 f2 = -( b2y - b1y ) / ( b1x - b2x );
1505 double g1 = a1y - f1 * a1x;
1506 double g2 = b1y - f2 * b1x;
1510 intersectCoords.
clear();
1519 }
else if ( b1x == b2x ) {
1523 x = ( g2 - g1 ) / ( f1 - f2 );
1528 double x1, x2, x3, x4;
1543 double y1, y2, y3, y4;
1561 if ( ( x1 <= x +
EPS ) && ( x <= x2 +
EPS ) && ( x3 <= x +
EPS ) && ( x <= x4 +
EPS ) && ( y1 <= y +
EPS ) && ( y <= y2 +
EPS ) && ( y3 <= y +
EPS ) && ( y <= y4 +
EPS ) ) {
1562 intersectCoords =
Vec2(x, y);
1565 intersectCoords.
clear();
1575 IntArray indicesI = {1, 2, 3, 2, 1, 1};
1576 IntArray indicesJ = {1, 2, 3, 3, 3, 2};
1577 IntArray indicesK = {1, 2, 3, 2, 1, 1};
1578 IntArray indicesL = {1, 2, 3, 3, 3, 2};
1580 for (
int ii = 1; ii <= 6; ii++ ) {
1581 for (
int jj = 1; jj <= 6; jj++ ) {
1582 int i = indicesI.
at(ii);
1583 int j = indicesJ.
at(ii);
1585 int k = indicesK.
at(jj);
1586 int l = indicesL.
at(jj);
1588 matrix.
at(ii, jj) = tensor.
at(3 * ( i - 1 ) + k, 3 * ( j - 1 ) + l);
#define _IFT_AnisotropicLinearElasticMaterial_stiff
Stiffness coefficients arranged by rows from the diagonal to the right (21 values).
virtual double give(CrossSectionProperty a, GaussPoint *gp) const
double giveCoordinate(int i) const
const FloatArray & giveCoordinates() const
void resizeElements(int _newSize)
Resizes the internal data structure to accommodate space for _newSize elements.
void setElement(int i, std::unique_ptr< Element > obj)
Sets i-th component. The component will be further managed and maintained by domain object.
int giveNumberOfMaterialModels() const
Returns number of material models in domain.
void resizeMaterials(int _newSize)
Resizes the internal data structure to accommodate space for _newSize materials.
const IntArray & giveElementsWithMaterialNum(int iMaterialNum) const
int giveNumberOfElements() const
Returns number of elements in domain.
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
Element * giveElement(int n)
int giveNumberOfSpatialDimensions()
Returns number of spatial dimensions.
EngngModel * giveEngngModel()
void resizeCrossSectionModels(int _newSize)
Resizes the internal data structure to accommodate space for _newSize cross section models.
void setMaterial(int i, std::unique_ptr< Material > obj)
Sets i-th component. The component will be further managed and maintained by domain object.
int giveNumberOfCrossSectionModels() const
Returns number of cross section models in domain.
void setCrossSection(int i, std::unique_ptr< CrossSection > obj)
Sets i-th component. The component will be further managed and maintained by domain object.
void setMaterial(int matIndx)
int giveGlobalNumber() const
Node * giveNode(int i) const
static ParamKey IPK_Element_nodes
virtual int giveNumberOfNodes() const
const IntArray & giveDofManArray() const
virtual void setCrossSection(int csIndx)
virtual double computeVolumeAreaOrLength()
Computes the volume, area or length of the element depending on its spatial dimension.
virtual Material * giveMaterial()
virtual int giveNumberOfDofManagers() const
DofManager * giveDofManager(int i) const
CrossSection * giveCrossSection()
Index giveSize() const
Returns the size of receiver.
static FloatArray fromVector(const std::vector< double > &v)
void zero()
Zeroes all coefficients of receiver.
int giveIndexMaxElem(void)
void add(const FloatMatrix &a)
void resize(Index rows, Index cols)
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
void followedBy(const IntArray &b, int allocChunk=0)
bool contains(int value) const
int findFirstIndexOf(int value) const
virtual int giveQcNodeType()
virtual double giveQcElasticParamneter()=0
virtual double giveQcPlasticParamneter()=0
void setActivatedElementList(IntArray elemList)
void setActivatedNodeList(IntArray nodeList, Domain *d)
void createGlobalStiffnesMatrix(FloatMatrix &Diso, double &S0, Domain *d, int homMtrxType, double volumeOfInterpolationMesh)
IntArray interpolationElementNumbers
bool intersectionTestSegmentTrianglePlucker3D(FloatArray &intersectCoords, const FloatArray &A, const FloatArray &B, const FloatArray &C, const FloatArray &X1, const FloatArray &X2)
bool stiffnessAssignment(std::vector< FloatMatrix > &individualStiffnessTensors, FloatArray &individialS0, Domain *d, Element *e, qcNode *qn1, qcNode *qn2)
bool intersectionTestSegmentSegment2D(FloatArray &intersectCoords, const FloatArray &A1, const FloatArray &A2, const FloatArray &B1, const FloatArray &B2)
bool computeIntersectionsOfLinkWith3DTetrahedraElements(IntArray &intersected, std::vector< double > &lengths, Domain *d, Element *e, qcNode *qn1, qcNode *qn2)
bool computeIntersectionsOfLinkWith2DTringleElements(IntArray &intersected, std::vector< double > &lengths, Domain *d, Element *e, qcNode *qn1, qcNode *qn2)
std::vector< IntArray > connectivityTable
void homogenizationOfStiffMatrix(double &homogenizedE, double &homogenizedNu, const FloatMatrix &Diso)
void computeStiffnessTensorOf1Link(FloatMatrix &D1, double &S0, Element *e, Domain *d)
IntArray interpolationElementIndices
void transformStiffnessTensorToMatrix(FloatMatrix &matrix, const FloatMatrix &tensor)
int intersectionTestSegmentTetrahedra3D(std::vector< FloatArray > &intersectCoords, const FloatArray &A, const FloatArray &B, const FloatArray &C, const FloatArray &D, const FloatArray &X1, const FloatArray &X2)
void initializeConnectivityTableForInterpolationElements(Domain *d)
void computeIntersectionsOfLinkWithInterpElements(IntArray &intersected, std::vector< double > &lengths, Domain *d, Element *e, qcNode *qn1, qcNode *qn2)
std::vector< IntArray > interpolationMeshNodes
int intersectionTestSegmentTriangle2D(std::vector< FloatArray > &intersectCoords, const FloatArray &A, const FloatArray &B, const FloatArray &C, const FloatArray &U1, const FloatArray &U2)
double give(int aProperty, GaussPoint *gp) const override
virtual int giveMasterElementNumber()
#define OOFEM_WARNING(...)
#define _IFT_IsotropicLinearElasticMaterial_talpha
#define _IFT_IsotropicLinearElasticMaterial_n
#define _IFT_IsotropicLinearElasticMaterial_e
#define _IFT_Material_density
static FloatArray Vec2(const double &a, const double &b)
static FloatArray VecX(std::initializer_list< double > ini)
ClassFactory & classFactory
@ QCMaterialExtensionInterfaceType
double distance(const FloatArray &x, const FloatArray &y)
#define _IFT_SimpleCrossSection_thick
#define _IFT_SimpleCrossSection_width