85 for (
int i = 1; i <= numEI; i++ ) {
116 for (
int i = 1; i <= neighbors.
giveSize(); i++ ) {
124 for (
int j = 1; j <= damageArray.giveSize(); j++ ) {
125 if (damageArrayNeigh.at(j) > damageArray.at(j) ) {
126 damageArray.at(j) = damageArrayNeigh.at(j);
135 for (
int j = 1; j <= damageArray.giveSize(); j++ ) {
136 damageArray.at(j) = 1.0;
139 status->layerDamageValues = damageArray;
178 OOFEM_ERROR(
"'czmaterial' this keyword is not in use anymore! Instead define cz material for each interface in the cross secton, ex: interfacematerials 3 x x x ");
238 std :: vector< double > ef;
282 lCoords.
at(3) += 1.0e-9;
284 lCoords.
at(3) -= 2.0e-9;
316 answer.
times(DISC_DOF_SCALE_FAC);
331 IntArray ordering_temp, activeDofsArrayTemp;
336 int activeDofPos = 0, activeDofIndex = 0, orderingDofIndex = 0;
338 IntArray dofManDofIdMask, dofManDofIdMaskAll;
351 for (
int j = 1; j <= dofManDofIdMask.
giveSize(); j++ ) {
354 ordering_temp .
at(activeDofPos) = orderingDofIndex + pos;
355 activeDofsArrayTemp.
at(activeDofPos) = activeDofIndex + j;
358 orderingDofIndex += dofManDofIdMaskAll.
giveSize();
359 activeDofIndex += fieldDofId.
giveSize();
361 dofManDofIdMask.
clear();
365 int numActiveDofs = activeDofPos;
366 orderingArray.
resize(numActiveDofs), activeDofsArray.
resize(numActiveDofs);
368 for (
int i = 1; i <= numActiveDofs; i++ ) {
369 orderingArray.
at(i) = ordering_temp.
at(i);
370 activeDofsArray.
at(i) = activeDofsArrayTemp.
at(i);
434 FloatArray f(ndofs), genEps, ftemp, lCoords, Nd;
438 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
442 lCoords = gp->giveNaturalCoordinates();
476 PG1.beColumnOf(PG, 1);
477 PG2.beColumnOf(PG, 2);
482 sectionalForces.
clear();
498 double levelSet = 0.0;
499 if ( dynamic_cast< Delamination * >( ei ) ) {
500 levelSet = lCoords.
at(3) -
dynamic_cast< Delamination *
>( ei )->giveDelamXiCoord();
501 }
else if ( dynamic_cast< Crack * >( ei ) ) {
519 double levelSet = 0.0;
520 if ( dynamic_cast< Delamination * >( ei ) ) {
522 levelSet = xiLoad -
dynamic_cast< Delamination *
>( ei )->giveDelamXiCoord();
523 }
else if ( dynamic_cast< Crack * >( ei ) ) {
533 for (
int i = 1; i <= edgeNodes.
giveSize(); i++ ) {
554 double xiTop = ei->
xiTop;
578 if ( ( xiBottom <= xi ) && ( xi <= xiTop ) ) {
594 for (
int i = 0; i < numZones; i++ ) {
600 mat->
giveIPValue(ipValues, gp, IST_DamageScalar, tStep);
602 double val = ipValues.
at(1);
641 lCoords.
at(1) = gp->giveNaturalCoordinate(1);
642 lCoords.
at(2) = gp->giveNaturalCoordinate(2);
656 Q.beLocalCoordSys(nCov);
669 lambdaN.beProductOf(lambdaD, Ncoh);
672 answerTemp.
add(dA, Fcoh);
678 answer.
assemble(answerTemp, ordering);
716 answer.
resize(ndofs, ndofs);
764 FloatMatrix answerTemp, Ncoh_j, Ncoh_k, lambda, D, temp, tangent;
766 answerTemp.
resize(nDofs, nDofs);
779 lCoords = { gp->giveNaturalCoordinate(1), gp->giveNaturalCoordinate(2), xi};
801 answerTemp.
add(dA,tangent);
804 answer.
resize(nDofs, nDofs);
807 answer.
assemble(answerTemp, ordering, ordering);
821 perturbedCoords.
at(3) = lCoords.
at(3) + 1.0e-9;
824 perturbedCoords.
at(3) = lCoords.
at(3) - 1.0e-9;
839 answer.
resize(ndofs, ndofs);
855 KOrdered.
resize(ndofs,ndofs);
860 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
864 const FloatArray &lCoords = gp->giveNaturalCoordinates();
877 KOrdered.
assemble(KCC, ordering, ordering);
879 answer.
assemble(tempRed, orderingC, orderingC);
883 for (
int m = 1; m <= numEI; m++ ) {
892 KOrdered.
assemble(KDC, ordering, ordering);
901 for (
int k = 1; k <= numEI; k++ ) {
912 KOrdered.
assemble(KDD, ordering, ordering);
942 for (
int k = 1; k <= nLoads; k++ ) {
946 std :: vector< double > efM, efK;
954 KCD.times(DISC_DOF_SCALE_FAC);
955 KDD.
times(DISC_DOF_SCALE_FAC*DISC_DOF_SCALE_FAC);
958 answer.
assemble(KCC, orderingC, orderingC);
962 for (
int m = 1; m <= numEI; m++ ) {
973 if ( efM[0] > 0.1 ) {
975 answer.
assemble(tempRed, orderingC, orderingJ);
977 answer.
assemble(tempRedT, orderingJ, orderingC);
981 for (
int k = 1; k <= numEI; k++ ) {
986 if ( efM[0] > 0.1 && efK[0] > 0.1 ) {
990 answer.
assemble(tempRed, orderingJ, orderingK);
1034 for (
int i = 0; i < 3; i++) {
1035 A_lambdaC.zero(); A_lambdaD.
zero();
1036 for (
int j = 0; j < 3; j++) {
1037 A_lambdaC.addProductOf(A[i][j], lambdaC[j]);
1058 answer.
resize(ndofs, ndofs);
1072 answer.
assemble(KCC, orderingC, orderingC);
1074 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
1078 const FloatArray &lCoords = gp->giveNaturalCoordinates();
1089 for (
int m = 1; m <= numEI; m++ ) {
1101 for (
int k = 1; k <= numEI; k++ ) {
1136 for (
int k = 1; k <= nLoads; k++ ) {
1140 std :: vector< double > efM, efK;
1148 KCD.
times(DISC_DOF_SCALE_FAC);
1149 KDD.
times(DISC_DOF_SCALE_FAC*DISC_DOF_SCALE_FAC);
1152 answer.
assemble(KCC, orderingC, orderingC);
1156 for (
int m = 1; m <= numEI; m++ ) {
1167 if ( efM[0] > 0.1 ) {
1169 answer.
assemble(tempRed, orderingC, orderingJ);
1171 answer.
assemble(tempRedT, orderingJ, orderingC);
1175 for (
int k = 1; k <= numEI; k++ ) {
1180 if ( efM[0] > 0.1 && efK[0] > 0.1 ) {
1184 answer.
assemble(tempRed, orderingJ, orderingK);
1215 int eiNum1 = 0, eiNum2 = 0;
1243 L.
zero(); A_lambda.zero();
1245 if ( eiNum1 == eiNum2 ) {
1248 for (
int i = 0; i < 3; i++) {
1250 for (
int j = 0; j < 3; j++) {
1251 A_lambda.addProductOf(A[i][j], lambda1[j]);
1253 L.plusProductSymmUpper(lambda1[i], A_lambda, 1.0);
1261 for (
int j = 0; j < 3; j++ ) {
1262 for (
int k = 0; k < 3; k++ ) {
1270 KdIJ.
resize(ndofs,ndofs);
1274 KdIJ.
assemble(KDDtemp, ordering, ordering);
1295 aEye=eye; aEye.
times(a);
1296 lambda[ 0 ].
resize(3,18); lambda[ 0 ].
zero();
1297 lambda[ 1 ].
resize(3,18); lambda[ 1 ].
zero();
1302 lambda[ 2 ].
resize(3,18); lambda[ 2 ].
zero();
1303 lambda[ 2 ].
at(1,13) = lambda[ 2 ].
at(2,14) = lambda[ 2 ].
at(3,15) = c;
1316 lambda_xd.
at(1,1) = lambda_xd.
at(2,2) = lambda_xd.
at(3,3) = 1.0;
1317 lambda_xd.
at(1,4) = lambda_xd.
at(2,5) = lambda_xd.
at(3,6) = zeta;
1331 FloatMatrix lambdaGC [ 3 ], lambdaNC, lambdaGD [ 3 ], lambdaND;
1389 KCC.
assemble(KCCtemp, ordering, ordering);
1390 KCD.
assemble(KCDtemp, ordering, ordering);
1391 KDD.
assemble(KDDtemp, ordering, ordering);
1411 FloatMatrix M11(18, 18), M12(18, 18), M13(18, 6), M22(18, 18), M23(18, 6), M33(6, 6);
1419 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
1431 FloatArray localCoords = gp->giveNaturalCoordinates();
1450 double fac2 = 2.0 * zeta * ( 2.0 + gam * zeta );
1451 double fac3 = 2.0 * zeta * zeta;
1452 double fac4 = zeta * zeta * ( 2.0 + gam * zeta ) * ( 2.0 + gam * zeta );
1453 double fac5 = zeta * zeta * zeta * ( 2.0 + gam * zeta );
1454 double fac6 = zeta * zeta * zeta * zeta;
1455 FloatMatrix mass11(3, 3), mass12(3, 3), mass13(3, 1), mass21(3, 3), mass22(3, 3), mass23(3, 1), mass31(1, 3), mass32(1, 3), mass33(1, 1);
1457 mass11.at(1, 1) = mass11.at(2, 2) = mass11.at(3, 3) = fac1;
1458 mass12.at(1, 1) = mass12.at(2, 2) = mass12.at(3, 3) = fac2;
1459 mass13.at(1, 1) = fac3 * m.
at(1);
1460 mass13.at(2, 1) = fac3 * m.
at(2);
1461 mass13.at(3, 1) = fac3 * m.
at(3);
1462 mass22.at(1, 1) = mass22.at(2, 2) = mass22.at(3, 3) = fac4;
1463 mass23.at(1, 1) = fac5 * m.
at(1);
1464 mass23.at(2, 1) = fac5 * m.
at(2);
1465 mass23.at(3, 1) = fac5 * m.
at(3);
1467 mass21.beTranspositionOf(mass12);
1468 mass31.beTranspositionOf(mass13);
1469 mass32.beTranspositionOf(mass23);
1473 double rho = mat->
give(
'd', gp);
1475 FloatMatrix M11temp, M12temp, M13temp, M22temp, M23temp, M33temp;
1482 M11.add(0.25 * rho * dV, M11temp);
1483 M12.add(0.25 * rho * dV, M12temp);
1484 M13.add(0.25 * rho * dV, M13temp);
1485 M22.add(0.25 * rho * dV, M22temp);
1486 M23.add(0.25 * rho * dV, M23temp);
1487 M33.
add(0.25 * rho * dV, M33temp);
1491 answer.
resize(ndofs, ndofs);
1494 const IntArray &ordering_phibar = this->giveOrdering(Midplane);
1495 const IntArray &ordering_m = this->giveOrdering(Director);
1496 const IntArray &ordering_gam = this->giveOrdering(InhomStrain);
1497 answer.
assemble(M11, ordering_phibar, ordering_phibar);
1498 answer.
assemble(M12, ordering_phibar, ordering_m);
1499 answer.
assemble(M13, ordering_phibar, ordering_gam);
1500 answer.
assemble(M22, ordering_m, ordering_m);
1501 answer.
assemble(M23, ordering_m, ordering_gam);
1502 answer.
assemble(M33, ordering_gam, ordering_gam);
1508 answer.
assemble(M21, ordering_m, ordering_phibar);
1509 answer.
assemble(M31, ordering_gam, ordering_phibar);
1510 answer.
assemble(M32, ordering_gam, ordering_m);
1521 if ( type != ExternalForcesVector ) {
1539 coordsTemp.
at(1) = 0.0;
1540 edgeLoad->
computeValueAt(componentsTemp, tStep, coordsTemp, VM_Total);
1556 answer.
assemble(tempRed, ordering);
1598 FloatArray distrForces, distrMoments, t1, t2;
1599 distrForces = { components.
at(1), components.
at(2), components.
at(3) };
1600 distrMoments = { components.
at(4), components.
at(5), components.
at(6) };
1603 fT.addSubVector(t1,1);
1604 fT.addSubVector(t2,4);
1605 fT.at(7) = components.
at(7);
1609 for (
int i = 1; i <= 7; i++) {
1610 fT.at(i) = components.
at(i);
1613 OOFEM_ERROR(
"ModShell7Base :: computeTractionForce - does not support local coordinate system");
1618 Nftemp.beTProductOf(N, fT*dL);
1632 int numberOfGaussPoints = ( int ) ceil( ( approxOrder + 1. ) / 2. );
1637 FloatArray fT(7), components, lCoords, gCoords, Nf;
1653 lCoords.
at(3) = components.
at(8);
1664 FloatArray distrForces, distrMoments, t1, t2;
1665 distrForces = { components.
at(1), components.
at(2), components.
at(3) };
1666 distrMoments = { components.
at(4), components.
at(5), components.
at(6) };
1669 fT.addSubVector(t1,1);
1670 fT.addSubVector(t2,4);
1671 fT.at(7) = components.
at(7);
1675 for (
int i = 1; i <= 7; i++) {
1676 fT.at(i) = components.
at(i);
1679 OOFEM_ERROR(
"ModShell7Base :: computeTractionForce - does not support local coordinate system");
1695 double zeta = lcoords.
at(3);
1708 dxdxi = { genEpsEdge.
at(1), genEpsEdge.
at(2), genEpsEdge.
at(3) };
1709 dmdxi = { genEpsEdge.
at(4), genEpsEdge.
at(5), genEpsEdge.
at(6) };
1710 m = { genEpsEdge.
at(7), genEpsEdge.
at(8), genEpsEdge.
at(9) };
1711 double dgamdxi = genEpsEdge.
at(10);
1712 double gam = genEpsEdge.
at(11);
1714 double fac1 = ( zeta + 0.5 * gam * zeta * zeta );
1715 double fac2 = ( 0.5 * zeta * zeta );
1716 double fac3 = ( 1.0 + zeta * gam );
1719 g2 = dxdxi + fac1*dmdxi + fac2*dgamdxi*m;
1726 gcov = {g1, g2, g3};
1804 if ( ei && dynamic_cast< ShellCrack*>(ei) ) {
1808 answer.
resize(18, ndofs);
1837 for (
int i = 1, j = 0; i <= ndofman; i++, j += 3 ) {
1842 std :: vector< double > efGP;
1851 answer.
at(1, 1 + j) = dNdxi.
at(i, 1) * factor;
1852 answer.
at(2, 2 + j) = dNdxi.
at(i, 1) * factor;
1853 answer.
at(3, 3 + j) = dNdxi.
at(i, 1) * factor;
1854 answer.
at(4, 1 + j) = dNdxi.
at(i, 2) * factor;
1855 answer.
at(5, 2 + j) = dNdxi.
at(i, 2) * factor;
1856 answer.
at(6, 3 + j) = dNdxi.
at(i, 2) * factor;
1859 answer.
at(7, ndofs_xm + 1 + j) = dNdxi.
at(i, 1) * factor;
1860 answer.
at(8, ndofs_xm + 2 + j) = dNdxi.
at(i, 1) * factor;
1861 answer.
at(9, ndofs_xm + 3 + j) = dNdxi.
at(i, 1) * factor;
1862 answer.
at(10, ndofs_xm + 1 + j) = dNdxi.
at(i, 2) * factor;
1863 answer.
at(11, ndofs_xm + 2 + j) = dNdxi.
at(i, 2) * factor;
1864 answer.
at(12, ndofs_xm + 3 + j) = dNdxi.
at(i, 2) * factor;
1865 answer.
at(13, ndofs_xm + 1 + j) = N.
at(i) * factor;
1866 answer.
at(14, ndofs_xm + 2 + j) = N.
at(i) * factor;
1867 answer.
at(15, ndofs_xm + 3 + j) = N.
at(i) * factor;
1870 answer.
at(16, ndofs_xm * 2 + 1 + i-1) = dNdxi.
at(i, 1) * factor;
1871 answer.
at(17, ndofs_xm * 2 + 1 + i-1) = dNdxi.
at(i, 2) * factor;
1872 answer.
at(18, ndofs_xm * 2 + 1 + i-1) = N.
at(i) * factor;
1877 answer.
times(DISC_DOF_SCALE_FAC);
1879 }
else if ( ei && dynamic_cast< Delamination*>(ei) ){
1885 answer.
times( fac * DISC_DOF_SCALE_FAC );
1899 double levelSetNode = 0.0;
1901 std :: vector< double >efNode;
1913 return efNode [ 0 ];
1945 if ( ei && dynamic_cast< Crack*>(ei) ) {
1955 std :: vector< double > efGP;
1962 answer.
at(1, 1 + j) = factor;
1963 answer.
at(2, 2 + j) = factor;
1964 answer.
at(3, 3 + j) = factor;
1965 answer.
at(4, ndofs_xm + 1 + j) = factor;
1966 answer.
at(5, ndofs_xm + 2 + j) = factor;
1967 answer.
at(6, ndofs_xm + 3 + j) = factor;
1968 answer.
at(7, ndofs_xm * 2 + i) = factor;
1972 answer.
times(DISC_DOF_SCALE_FAC);
1974 }
else if ( ei && dynamic_cast< Delamination*>(ei) ) {
1980 answer.
times( fac * DISC_DOF_SCALE_FAC );
2008 if ( ei && dynamic_cast< Crack*>(ei) ) {
2028 std :: vector< double > efGP;
2033 answer.
at(1, 1 + j) = N.
at(i) * factor;
2034 answer.
at(2, 2 + j) = N.
at(i) * factor;
2035 answer.
at(3, 3 + j) = N.
at(i) * factor;
2036 answer.
at(4, ndofs_xm + 1 + j) = N.
at(i) * factor;
2037 answer.
at(5, ndofs_xm + 2 + j) = N.
at(i) * factor;
2038 answer.
at(6, ndofs_xm + 3 + j) = N.
at(i) * factor;
2039 answer.
at(7, ndofs_xm * 2 + i) = N.
at(i) * factor;
2042 answer.
times(DISC_DOF_SCALE_FAC);
2044 }
else if ( ei && dynamic_cast< Delamination*>(ei) ) {
2050 answer.
times( fac * DISC_DOF_SCALE_FAC );
2071 if ( ei && dynamic_cast< Crack*>(ei) ) {
2096 for (
int i = 1, j = 0; i <= ndofman; i++, j += 3 ) {
2098 std :: vector< double > efGP;
2104 answer.
at(1, 1 + j) = dNdxi.
at(i) * factor;
2105 answer.
at(2, 2 + j) = dNdxi.
at(i) * factor;
2106 answer.
at(3, 3 + j) = dNdxi.
at(i) * factor;
2118 answer.
at(4, ndofs_xm + 1 + j) = dNdxi.
at(i) * factor;
2119 answer.
at(5, ndofs_xm + 2 + j) = dNdxi.
at(i) * factor;
2120 answer.
at(6, ndofs_xm + 3 + j) = dNdxi.
at(i) * factor;
2121 answer.
at(7, ndofs_xm + 1 + j) = N.
at(i) * factor;
2122 answer.
at(8, ndofs_xm + 2 + j) = N.
at(i) * factor;
2123 answer.
at(9, ndofs_xm + 3 + j) = N.
at(i) * factor;
2135 answer.
at(10, ndofs_xm * 2 + 1 + i-1) = dNdxi.
at(i) * factor;
2136 answer.
at(11, ndofs_xm * 2 + 1 + i-1) = N.
at(i) * factor;
2140 answer.
times(DISC_DOF_SCALE_FAC);
2142 }
else if ( ei && dynamic_cast< Delamination*>(ei) ){
2148 answer.
times( fac * DISC_DOF_SCALE_FAC );
2173 double fac_cont = ( zeta + 0.5 * gamc * zeta * zeta );
2175 globalCoords.
add(fac_cont,mc);
2189 double fac_disc = ( zeta + 0.5 * gamd * zeta * zeta );
2191 xtemp.
add(fac_disc,md);
2192 globalCoords.
add(xtemp);
2208 x = {vec.
at(1), vec.
at(2), vec.
at(3)};
2209 m = {vec.
at(4), vec.
at(5), vec.
at(6)};
2219 vtkPieces.resize(1);
2220 this->
giveShellExportData(vtkPieces[0], primaryVarsToExport, internalVarsToExport, cellVarsToExport, tStep );
2231 this->
giveCZExportData(vtkPiece, primaryVarsToExport, internalVarsToExport, cellVarsToExport, tStep );
2239 int numSubCells = 1;
2246 for (
int i = 1; i <= numLayers; i++ ) {
2250 int numCellNodes = 15;
2252 int numTotalNodes = numCellNodes*numCells;
2257 std::vector <FloatArray> nodeCoords;
2260 int currentCell = 1;
2265 for (
int layer = 1; layer <= numLayers; layer++ ) {
2268 for (
int subCell = 1; subCell <= numSubCells; subCell++ ) {
2271 if ( numSubCells == 1 ) {
2283 for (
int i = 1; i <= numCellNodes; i++ ) {
2284 nodes.
at(i) = val++;
2289 offset += numCellNodes;
2290 vtkPiece.
setOffset(currentCell, offset);
2306 std::vector<FloatArray> updatedNodeCoords;
2308 std::vector<FloatArray> values;
2309 for (
int fieldNum = 1; fieldNum <= primaryVarsToExport.
giveSize(); fieldNum++ ) {
2320 for (
int layer = 1; layer <= numLayers; layer++ ) {
2323 for (
int subCell = 1; subCell <= numSubCells; subCell++ ) {
2325 if ( type == DisplacementVector ) {
2326 if ( numSubCells == 1 ) {
2333 for (
int j = 1; j <= numCellNodes; j++ ) {
2334 u = updatedNodeCoords[j-1];
2342 for (
int j = 1; j <= numCellNodes; j++ ) {
2358 for (
int fieldNum = 1; fieldNum <= internalVarsToExport.
giveSize(); fieldNum++ ) {
2363 for (
int layer = 1; layer <= numLayers; layer++ ) {
2366 for (
int subCell = 1; subCell <= numSubCells; subCell++ ) {
2369 for (
int j = 1; j <= numCellNodes; j++ ) {
2382 for (
int i = 1; i <= cellVarsToExport.
giveSize(); i++ ) {
2386 for (
int layer = 1; layer <= numLayers; layer++ ) {
2388 for (
int subCell = 1; subCell <= numSubCells; subCell++ ) {
2394 vtkPiece.
setCellVar(i, currentCell, average);
2414 wedgeToTriMap = { 1, 2, 3, 1, 2, 3, 4, 5, 6, 4, 5, 6, 1, 2, 3 };
2420 for (
int enrItIndex = 1; enrItIndex <= nEnrIt; enrItIndex++ ) {
2423 for (
int layer = 1; layer <= numLayers; layer++ ) {
2427 for (
int subCell = 1; subCell <= numSubCells; subCell++ ) {
2428 FloatArray nodeLocalXi1Coords, nodeLocalXi2Coords, nodeLocalXi3Coords, nodeLocalXi3CoordsMapped;
2429 if ( numSubCells == 1) {
2435 for (
int nodeIndx = 1; nodeIndx <= numCellNodes; nodeIndx++ ) {
2439 lCoords.
beColumnOf(localNodeCoords, nodeIndx);
2443 if ( xfemstype == XFEMST_LevelSetPhi ) {
2448 }
else if ( xfemstype == XFEMST_LevelSetGamma ) {
2449 valueArray.resize(1);
2452 }
else if ( xfemstype == XFEMST_NodeEnrMarker ) {
2453 valueArray.resize(1);
2478 FloatArray nodeLocalXi1Coords, nodeLocalXi2Coords, nodeLocalXi3Coords;
2488 localCoords.
at(1) = nodeLocalXi1Coords.
at(i);
2489 localCoords.
at(2) = nodeLocalXi2Coords.
at(i);
2490 localCoords.
at(3) = nodeLocalXi3Coords.
at(i);
2505 FloatArray nodeLocalXi1Coords, nodeLocalXi2Coords, nodeLocalXi3Coords;
2524 FloatArray nodeLocalXi1Coords, nodeLocalXi2Coords, nodeLocalXi3Coords;
2529 if ( subCell == 0) {
2542 double scaleFactor = 0.9999;
2547 localCoords.
at(3) = xiMid_i + deltaxi * scaleFactor;
2557 FloatArray nodeLocalXi1Coords, nodeLocalXi2Coords, nodeLocalXi3Coords;
2562 if ( subCell == 0) {
2573 localCoords.
at(3) = 1.0;
2575 double scaleFactor = 0.9999;
2580 localCoords.
at(3) = xiMid_i + deltaxi * scaleFactor;
2592 for (
int i = 1; i <= 15; i++ ){
2593 double scaleFactor = 0.9999;
2598 local.
at(i) = xiMid_i + deltaxi * scaleFactor;
2600 answer.
at(i) = local.
at(i);
2610 double scale = 0.9999;
2611 double z = 1.0*scale;
2623 gs1.zero(); gs2.zero(); gs3.
zero();
2625 double alpha1 = scale;
double alpha2 = (1.0-alpha1)*0.5;
double alpha3 = alpha2;
2628 gs1 = alpha1*g1 + alpha2*g2 + alpha3*g3;
2629 gs2 = alpha2*g1 + alpha1*g2 + alpha3*g3;
2630 gs3 = alpha2*g1 + alpha3*g2 + alpha1*g3;
2640 loc12 = 0.5 * (loc1 + loc2);
2641 loc23 = 0.5 * (loc2 + loc3);
2642 loc31 = 0.5 * (loc3 + loc1);
2643 double a = loc1.
at(1);
2644 double b = loc2.
at(1);
2645 double c = loc3.
at(1);
2646 double d = loc12.
at(1);
2647 double e = loc23.
at(1);
2648 double f = loc31.
at(1);
2649 nodeLocalXi1Coords = { a, b, c, a, b, c, d, e, f, d, e, f, a, b, c };
2657 nodeLocalXi2Coords = { a, b, c, a, b, c, d, e, f, d, e, f, a, b, c };
2659 nodeLocalXi3Coords = { -z, -z, -z, z, z, z, -z, -z, -z, z, z, z, 0., 0., 0. };
2662 localNodeCoordsT = {nodeLocalXi1Coords, nodeLocalXi2Coords, nodeLocalXi3Coords};
2672 double scale = 0.999;
2677 g1 = this->
allTri[subCell-1].giveVertex(1);
2678 g2 = this->
allTri[subCell-1].giveVertex(2);
2679 g3 = this->
allTri[subCell-1].giveVertex(3);
2683 double alpha1 = scale;
double alpha2 = (1.0-alpha1)*0.5;
double alpha3 = alpha2;
2684 gs1 = alpha1*g1 + alpha2*g2 + alpha3*g3;
2685 gs2 = alpha2*g1 + alpha1*g2 + alpha3*g3;
2686 gs3 = alpha2*g1 + alpha3*g2 + alpha1*g3;
2696 loc12 = 0.5 * (loc1 + loc2);
2697 loc23 = 0.5 * (loc2 + loc3);
2698 loc31 = 0.5 * (loc3 + loc1);
2699 double a = loc1.
at(1);
2700 double b = loc2.
at(1);
2701 double c = loc3.
at(1);
2702 double d = loc12.
at(1);
2703 double e = loc23.
at(1);
2704 double f = loc31.
at(1);
2705 nodeLocalXi1Coords = { a, b, c, d, e, f };
2713 nodeLocalXi2Coords = { a, b, c, d, e, f };
2715 nodeLocalXi3Coords = { 0., 0., 0., 0., 0., 0. };
2718 localNodeCoordsT = {nodeLocalXi1Coords, nodeLocalXi2Coords, nodeLocalXi3Coords};
2727 int numSubCells = 1;
2728 if ( this->
allTri.size() ) {
2729 numSubCells = (int)this->
allTri.size();
2733 int numCells = numInterfaces * numSubCells;
2735 int numCellNodes = 6;
2737 int numTotalNodes = numCellNodes*numCells;
2742 std::vector <FloatArray> nodeCoords;
2745 int currentCell = 1;
2750 for (
int layer = 1; layer <= numInterfaces; layer++ ) {
2752 for (
int subCell = 1; subCell <= numSubCells; subCell++ ) {
2755 if ( numSubCells == 1 ) {
2767 for (
int i = 1; i <= numCellNodes; i++ ) {
2768 nodes.
at(i) = val++;
2773 offset += numCellNodes;
2774 vtkPiece.
setOffset(currentCell, offset);
2789 std::vector<FloatArray> updatedNodeCoords;
2791 std::vector<FloatArray> values;
2792 for (
int fieldNum = 1; fieldNum <= primaryVarsToExport.
giveSize(); fieldNum++ ) {
2796 for (
int layer = 1; layer <= numInterfaces; layer++ ) {
2798 for (
int subCell = 1; subCell <= numSubCells; subCell++ ) {
2800 if ( type == DisplacementVector ) {
2801 if ( numSubCells == 1 ) {
2808 for (
int j = 1; j <= numCellNodes; j++ ) {
2816 for (
int j = 1; j <= numCellNodes; j++ ) {
2832 for (
int fieldNum = 1; fieldNum <= internalVarsToExport.
giveSize(); fieldNum++ ) {
2837 for (
int layer = 1; layer <= numInterfaces; layer++ ) {
2838 for (
int subCell = 1; subCell <= numSubCells; subCell++ ) {
2841 for (
int j = 1; j <= numCellNodes; j++ ) {
2854 for (
int i = 1; i <= cellVarsToExport.
giveSize(); i++ ) {
2858 for (
int layer = 1; layer <= numInterfaces; layer++ ) {
2859 for (
int subCell = 1; subCell <= numSubCells; subCell++ ) {
2860 if ( type == IST_CrossSectionNumber ) {
2869 vtkPiece.
setCellVar(i, currentCell, average);
2887 IntArray wedgeToTriMap({15, 1, 2, 3, 1, 2, 3, 4, 5, 6, 4, 5, 6, 1, 2, 3} );
2895 for (
int enrItIndex = 1; enrItIndex <= nEnrIt; enrItIndex++ ) {
2898 for (
int layer = 1; layer <= numInterfaces; layer++ ) {
2901 for (
int subCell = 1; subCell <= numSubCells; subCell++ ) {
2902 FloatArray nodeLocalXi1Coords, nodeLocalXi2Coords, nodeLocalXi3Coords, nodeLocalXi3CoordsMapped;
2903 if ( numSubCells == 1) {
2909 for (
int nodeIndx = 1; nodeIndx <= numCellNodes; nodeIndx++ ) {
2913 lCoords.
beColumnOf(localNodeCoords, nodeIndx);
2918 if ( xfemstype == XFEMST_LevelSetPhi ) {
2922 }
else if ( xfemstype == XFEMST_LevelSetGamma ) {
2926 }
else if ( xfemstype == XFEMST_NodeEnrMarker ) {
2956 recoveredValues.resize(numNodes);
2964 for (
int i = 1; i <= numNodes; i++ ) {
2966 double distOld = 3.0;
2967 for (
int j = 0; j < iRule->giveNumberOfIntegrationPoints(); j++ ) {
2970 if ( dist < distOld ) {
2971 closestIPArray.
at(i) = j;
2980 for (
int i = 1; i <= numNodes; i++ ) {
2988 if ( ipValues.
giveSize() == 0 && type == IST_AbaqusStateVector) {
2989 recoveredValues[i-1].resize(23);
2990 recoveredValues[i-1].zero();
2991 }
else if ( ipValues.
giveSize() == 0 ) {
2993 recoveredValues[i-1].zero();
2999 recoveredValues[i-1] = ipValues;
3027 IntArray delaminationInterface; delaminationInterface.
clear();
3028 IntArray interfaceEI(numberOfLayers-1);
3030 bool hasDelamination =
false;
3032 for (
int iEI = 1; iEI <= numEI; iEI++ ) {
3036 hasDelamination =
true;
3041 delaminationInterface.
followedBy(delaminationInterfaceNum);
3042 interfaceEI.
at(delaminationInterfaceNum) = iEI;
3045 delaminationInterface.
sort();
3047 if ( hasDelamination ) {
3051 if (numThicknessIP < 2) {
3053 OOFEM_ERROR(
"To few thickness IP per layer to do polynomial fit");
3056 int numDel = delaminationInterface.
giveSize();
3060 std::vector <FloatMatrix> tractionBC; tractionBC.resize(numDel+2);
3061 tractionBC[numDel+1].resize(3,numInPlaneIP);
3062 tractionBC[0].resize(3,numInPlaneIP);
3070 tractionBC[0].at(1,i) = tractionBtm.
at(1);
3071 tractionBC[0].at(2,i) = tractionBtm.
at(2);
3072 tractionBC[0].at(3,i) = tractionBtm.
at(3);
3073 tractionBC[numDel+1].at(1,i) = tractionTop.
at(1);
3074 tractionBC[numDel+1].at(2,i) = tractionTop.
at(2);
3075 tractionBC[numDel+1].at(3,i) = tractionTop.
at(3);
3079 for (
int iDel = 1 ; iDel <= numDel ; iDel++) {
3081 tractionBC[iDel].resize(3,numInPlaneIP);
3083 int interfaceNum = delaminationInterface.
at(iDel);
3092 OOFEM_ERROR(
"Interface IPs doesn't match the element IPs");
3099 FloatArray lCoords(3), nCov, CZPKtraction(3);
3104 lCoords.
at(1) = gp->giveNaturalCoordinate(1);
3105 lCoords.
at(2) = gp->giveNaturalCoordinate(2);
3129 this->
computeFAt(lCoords, F, genEpsC, tStep);
3142 if (intMatStatus == 0) {
3152 tractionBC[iDel].at(1,iIGP) = CZPKtraction.
at(1);
3153 tractionBC[iDel].at(2,iIGP) = CZPKtraction.
at(2);
3154 tractionBC[iDel].at(3,iIGP) = CZPKtraction.
at(3);
3160 tractionBC[iDel].zero();
3167 double zeroThicknessLevel = - 0.5 * totalThickness;
3169 FloatMatrix dSmatLayerIP(3,numInPlaneIP*numThicknessIP);
3173 delaminationInterface.
followedBy(numberOfLayers);
3174 for (
int topLayer : delaminationInterface) {
3175 SmatOld = tractionBC[iInt];
3176 int numDelLayers = topLayer-layerOld;
3177 std::vector <FloatMatrix> dSmatIP; dSmatIP.
resize(numDelLayers);
3178 std::vector <FloatMatrix> dSmat; dSmat.
resize(numDelLayers);
3179 std::vector <FloatMatrix> dSmatIPupd; dSmatIPupd.resize(numDelLayers);
3180 std::vector <FloatMatrix> dSmatupd; dSmatupd.resize(numDelLayers);
3184 for (
int delLayer = 1 ; delLayer <= numDelLayers; delLayer++ ) {
3186 this->
giveLayerContributionToSR(dSmat[delLayer-1], dSmatIP[delLayer-1], delLayer+layerOld, zeroThicknessLevel + dz, tStep);
3187 SmatOld.
add(dSmat[delLayer-1]);
3193 this->
fitRecoveredStress2BC(dSmatIPupd, dSmatupd, dSmat, dSmatIP, SmatOld, tractionBC[iInt], tractionBC[iInt+1], zeroThicknessLevel, {0.0,0.0,1.0}, layerOld+1, topLayer);
3195 for (
int layer = 1 ; layer <= numDelLayers; layer++ ) {
3199 zeroThicknessLevel += dz;
3200 layerOld = topLayer;
3204 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
3222 if ( layerHasBC.at(layer+1) ) {
3232 if (iRuleI->giveNumberOfIntegrationPoints() !=
numInPlaneIP ) {
3233 OOFEM_ERROR(
"Interface IPs doesn't match the element IPs");
3236 FloatArray lCoords(3), nCov, CZPKtraction(3);
3237 CZPKtraction.
zero();
3242 lCoords.
at(1) = gp->giveNaturalCoordinate(1);
3243 lCoords.
at(2) = gp->giveNaturalCoordinate(2);
3246 FloatArray GPcoords = gp->giveGlobalCoordinates();
3264 if (intMatStatus == 0) {
3277 SmatOld.
at(1,iIGP) = CZPKtraction.
at(1);
3278 SmatOld.
at(2,iIGP) = CZPKtraction.
at(2);
3279 SmatOld.
at(3,iIGP) = CZPKtraction.
at(3);
3311 failedInterfaces.
clear();
3312 std :: vector < FloatMatrix > transverseInterfaceStresses;
3313 if (recoverStresses) {
3328 bool initiateElt =
false;
3329 int interfaceMatNumber(this->
giveLayeredCS()->giveInterfaceMaterialNum(iInterface));
3343 if (temp.
giveSize() == 1 && temp.
at(1) > 0) {
3352 OOFEM_ERROR(
"Intitiation stress for delaminations not found or incorrect on CZ-material" );
3357 for (
int iGP = 1 ; iGP <= transverseInterfaceStresses[iInterface-1].giveNumberOfColumns() ; iGP++ ) {
3358 if ( transverseInterfaceStresses[iInterface-1].giveNumberOfRows() != numSC ) {
3359 OOFEM_ERROR(
"Wrong number of stress components" );
3364 interfaceStresses.
beColumnOf(transverseInterfaceStresses[iInterface-1],iGP);
3368 GaussPoint *gp = iRuleI->getIntegrationPoint(iGP-1);
3371 lCoords.
at(3) = interfaceXiCoords.
at(iInterface);
3385 double S1(interfaceStresses.
at(1));
3386 double S2(interfaceStresses.
at(2));
3387 double N(interfaceStresses.
at(3));
3391 double NM = 0.5*(
N + fabs(
N));
3392 double failCrit = NM*NM/(sigF.
at(3)*sigF.
at(3)) + (S1*S1 + S2*S2)/(sigF.
at(1)*sigF.
at(1));
3393 if (failCrit > (initiationFactors.
at(iInterface)*initiationFactors.
at(iInterface))) {
3395 failurestresses.at(1,iInterface) = NM;
3396 failurestresses.at(2,iInterface) = sqrt(S1*S1 + S2*S2);
3426 if (failedInterfaces.
giveSize() > 0) {
3427 printf(
" Delamination criterion was activated in element %i : \n",this->
giveGlobalNumber() );
3428 for (
auto iInterface : failedInterfaces) {
3429 printf(
" Interface %i - NM = %f, S = %f \n",iInterface,failurestresses.at(1,iInterface),failurestresses.at(2,iInterface));
3438 transverseStress.clear();
3440 transverseStress.resize(numberOfLayers-1);
3444 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
3446 if (layer < numberOfLayers) {
3447 transverseStress[layer-1].resize(3,numInPlaneIP);
3453 for (
int i = 0; i < numThicknessIP; i++ ) {
3455 int point = i*numInPlaneIP + j;
3459 this->
giveIPValue(tempIPvalues, ip, IST_StressTensor, tStep);
3461 for (
int iInt = layer-1 ; iInt <= layer ; iInt++ ) {
3462 if ( iInt > 0 && iInt < numberOfLayers ) {
3463 transverseStress[iInt-1].at(1,j+1) += (0.5/numThicknessIP)*tempIPvalues.
at(5);
3464 transverseStress[iInt-1].at(2,j+1) += (0.5/numThicknessIP)*tempIPvalues.
at(4);
3465 transverseStress[iInt-1].at(3,j+1) += (0.5/numThicknessIP)*tempIPvalues.
at(3);
3477 transverseStress.clear();
3482 IntArray delaminationInterface; delaminationInterface.
clear();
3483 IntArray interfaceEI(numberOfLayers-1);
3485 bool hasDelamination =
false;
3487 for (
int iEI = 1; iEI <= numEI; iEI++ ) {
3491 hasDelamination =
true;
3495 delaminationInterface.
followedBy(delaminationInterfaceNum);
3496 interfaceEI.
at(delaminationInterfaceNum) = iEI;
3499 delaminationInterface.
sort();
3501 if ( hasDelamination ) {
3502 transverseStress.resize(numberOfLayers-1);
3506 if (numThicknessIP < 2) {
3508 OOFEM_ERROR(
"To few thickness IP per layer to do polynomial fit");
3511 int numDel = delaminationInterface.
giveSize();
3515 std::vector <FloatMatrix> tractionBC; tractionBC.resize(numDel+2);
3516 tractionBC[numDel+1].resize(3,numInPlaneIP);
3517 tractionBC[0].resize(3,numInPlaneIP);
3521 for (
int iDel = 1 ; iDel <= numDel ; iDel++) {
3523 tractionBC[iDel].resize(3,numInPlaneIP);
3525 int interfaceNum = delaminationInterface.
at(iDel);
3533 OOFEM_ERROR(
"Interface IPs doesn't match the element IPs");
3538 FloatArray lCoords(3), nCov, CZPKtraction(3);
3539 CZPKtraction.zero();
3544 lCoords.
at(1) = gp->giveNaturalCoordinate(1);
3545 lCoords.
at(2) = gp->giveNaturalCoordinate(2);
3565 this->
computeFAt(lCoords, F, genEpsC, tStep);
3578 if (intMatStatus == 0) {
3587 tractionBC[iDel].at(1,iIGP) = CZPKtraction.at(1);
3588 tractionBC[iDel].at(2,iIGP) = CZPKtraction.at(2);
3589 tractionBC[iDel].at(3,iIGP) = CZPKtraction.at(3);
3595 tractionBC[iDel].zero();
3601 double zeroThicknessLevel = - 0.5 * totalThickness;
3603 FloatMatrix dSmatLayerIP(3,numInPlaneIP*numThicknessIP);
3607 delaminationInterface.
followedBy(numberOfLayers);
3608 for (
int topLayer : delaminationInterface) {
3609 SmatOld = tractionBC[iInt];
3610 int numDelLayers = topLayer-layerOld;
3611 std::vector <FloatMatrix> dSmatIP; dSmatIP.
resize(numDelLayers);
3612 std::vector <FloatMatrix> dSmat; dSmat.
resize(numDelLayers);
3613 std::vector <FloatMatrix> dSmatIPupd; dSmatIPupd.resize(numDelLayers);
3614 std::vector <FloatMatrix> dSmatupd; dSmatupd.resize(numDelLayers);
3618 for (
int delLayer = 1 ; delLayer <= numDelLayers; delLayer++ ) {
3620 this->
giveLayerContributionToSR(dSmat[delLayer-1], dSmatIP[delLayer-1], delLayer+layerOld, zeroThicknessLevel + dz, tStep);
3621 SmatOld.
add(dSmat[delLayer-1]);
3628 this->
fitRecoveredStress2BC(dSmatIPupd, dSmatupd, dSmat, dSmatIP, SmatOld, tractionBC[iInt], tractionBC[iInt+1], zeroThicknessLevel, {0.0,0.0,1.0}, layerOld+1, topLayer);
3630 for (
int delLayer = 1 ; delLayer <= numDelLayers; delLayer++ ) {
3631 if ( (delLayer + layerOld) < numberOfLayers ) {
3632 transverseStress[delLayer+layerOld-1] = dSmatupd[delLayer-1];
3636 zeroThicknessLevel += dz;
3637 layerOld = topLayer;
void setInternalVarInNode(int varNum, int nodeNum, FloatArray valueArray)
CrossSection * giveCrossSection()
void setInternalXFEMVarInNode(int varNum, int eiNum, int nodeNum, FloatArray valueArray)
void evalInitialContravarBaseVectorsAt(const FloatArray &lCoords, FloatMatrix &Gcon)
double evaluateHeavisideXi(double xi, ShellCrack *ei)
virtual void giveFailedInterfaceNumber(IntArray &failedInterfaces, FloatArray &initiationFactor, TimeStep *tStep, bool recoverStresses=true)
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
std::vector< Triangle > allTri
int giveNumberOfColumns() const
Returns number of columns of receiver.
void setCellVar(int varNum, int cellNum, FloatArray valueArray)
void computeCohesiveTangent(FloatMatrix &answer, TimeStep *tStep)
void subtract(const FloatArray &src)
Subtracts array src to receiver.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void computeLambdaGMatricesDis(FloatMatrix lambdaD[3], double zeta)
bool isElementEnriched(const Element *element) const
Abstract class representing entity, which is included in the FE model using one (or more) global func...
virtual void evaldNdxi(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
void giveFictiousNodeCoordsForExport(std::vector< FloatArray > &nodes, int layer, int subCell)
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
bool evalNodeEnrMarkerInNode(double &oNodeEnrMarker, int iNodeInd) const
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of interpolation functions (shape functions) at given point.
double giveDelamXiCoord() const
FloatArray convV6ToV9Stress(const FloatArray &V6)
double giveMidSurfaceZcoordFromBottom()
void beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
Computes vector product (or cross product) of vectors given as parameters, , and stores the result in...
void giveMaxCZDamages(FloatArray &answer, TimeStep *tStep)
virtual void give3dStiffnessMatrix_dTdj(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
bool isDofManEnriched(const DofManager &iDMan) const
void giveUnknownsAt(const FloatArray &lcoords, FloatArray &solVec, FloatArray &x, FloatArray &m, double &gam, TimeStep *tStep)
int giveGlobalNumber() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
int giveLayerMaterial(int layer)
void computeCohesiveNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei)
virtual void evalCovarBaseVectorsAt(const FloatArray &lCoords, FloatMatrix &gcon, FloatArray &solVec, TimeStep *tStep)
virtual void vtkEvalInitialGlobalCZCoordinateAt(const FloatArray &localCoords, int interface, FloatArray &globalCoords)
virtual FloatArray giveInterfaceStrength()
std::vector< std::vector< Triangle > > crackSubdivisions
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
int giveDelamInterfaceNum() const
void computeStressMatrix(FloatMatrix &answer, FloatArray &genEps, GaussPoint *gp, Material *mat, TimeStep *tStep)
Provides Xfem interface for an element.
virtual int giveNumberOfEdgeDofManagers()=0
Load is specified in global c.s.
void setNumberOfNodes(int numNodes)
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
virtual void evaluateEnrFuncAt(std::vector< double > &oEnrFunc, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl) const =0
virtual void evaluateEnrFuncAt(std::vector< double > &oEnrFunc, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl) const
double & at(int i)
Coefficient access function.
void giveFictiousCZNodeCoordsForExport(std::vector< FloatArray > &nodes, int layer, int subCell)
int max(int i, int j)
Returns bigger value form two given decimals.
virtual void giveAverageTransverseInterfaceStress(std::vector< FloatMatrix > &transverseStress, TimeStep *tStep)
virtual void giveRecoveredTransverseInterfaceStress(std::vector< FloatMatrix > &transverseStress, TimeStep *tStep)
void beSubMatrixOf(const FloatMatrix &src, int topRow, int bottomRow, int topCol, int bottomCol)
Assigns to the receiver the sub-matrix of another matrix.
int giveGlobalNumber() const
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
void computeEnrTractionForce(FloatArray &answer, const int iedge, BoundaryLoad *edgeLoad, TimeStep *tStep, ValueModeType mode, EnrichmentItem *ei)
Shell7BaseXFEM(int n, Domain *d)
This class implements a boundary load (force, moment,...) that acts directly on a boundary of some fi...
void setNumberOfInternalVarsToExport(int numVars, int numNodes)
void computeFailureCriteriaQuantities(FailureCriteriaStatus *fc, TimeStep *tStep)
void computeSectionalForcesAt(FloatArray §ionalForces, IntegrationPoint *ip, Material *mat, TimeStep *tStep, FloatArray &genEps, double zeta)
void giveFictiousCZNodeCoordsForExport(std::vector< FloatArray > &nodes, int interface)
void clear()
Clears receiver (zero size).
int giveInterpolationOrder()
Returns the interpolation order.
LayeredCrossSection * layeredCS
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
virtual void giveLocalNodeCoords(FloatMatrix &answer)
Returns a matrix containing the local coordinates for each node corresponding to the interpolation...
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
ConnectivityTable * giveConnectivityTable()
Returns receiver's associated connectivity table.
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)=0
Computes components values of load at given point - global coordinates (coordinates given)...
virtual int checkConsistency()
Performs consistency check.
virtual FloatArray * giveCoordinates()
virtual CoordSystType giveCoordSystMode()
Returns receiver's coordinate system.
void computeInterfaceJumpAt(int interf, FloatArray &lCoords, TimeStep *tStep, FloatArray &answer)
const FloatArray & giveFirstPKTraction() const
Returns the const pointer to receiver's first Piola-Kirchhoff traction vector.
InternalStateValueType
Determines the type of internal variable.
virtual int giveNumberOfDofs()
Base class for dof managers.
virtual void edgeComputeBmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, int li=1, int ui=ALL_STRAINS)
void jump(FloatMatrix lambda, FloatArray deltaUnknowns)
virtual void giveCZExportData(VTKPiece &vtkPiece, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep)
void computeLinearizedStiffness(GaussPoint *gp, StructuralMaterial *mat, TimeStep *tStep, FloatMatrix A[3][3])
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void giveLocalNodeCoords(FloatMatrix &answer)
Returns a matrix containing the local coordinates for each node corresponding to the interpolation...
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
void setNumberOfCells(int numCells)
int giveInternalStateTypeSize(InternalStateValueType valType)
XfemManager * giveXfemManager()
void giveInterfaceXiCoords(FloatArray &answer)
virtual int giveNumberOfDofManagers() const
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element's local coordinates.
virtual FEInterpolation * giveInterpolation() const
virtual void edgeGiveUpdatedSolutionVector(FloatArray &answer, const int iedge, TimeStep *tStep)
virtual void discComputeBulkTangentMatrix(FloatMatrix &KdIJ, IntegrationPoint *ip, EnrichmentItem *eiI, EnrichmentItem *eiJ, int layer, FloatMatrix A[3][3], TimeStep *tStep)
virtual void edgeEvaldNdxi(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of edge interpolation functions (shape functions) at given point...
virtual void recoverShearStress(TimeStep *tStep)
virtual void edgeLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates edge global coordinates from given local ones.
void rotatedWith(FloatMatrix &r, char mode)
Returns the receiver a rotated according the change-of-base matrix r.
Abstract base class representing integration rule.
This class implements a layered cross section in a finite element problem.
virtual double computeVolumeAroundLayer(GaussPoint *mastergp, int layer)=0
void NodalRecoveryMI_recoverValues(std::vector< FloatArray > &recoveredValues, int layer, InternalStateType type, TimeStep *tStep)
LayeredCrossSection * giveLayeredCS()
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
void setSubMatrix(const FloatMatrix &src, int sr, int sc)
Adds the given matrix as sub-matrix to receiver.
virtual const IntArray & giveOrderingNodes() const =0
void computePressureTangentMatrixDis(FloatMatrix &KCC, FloatMatrix &KCD, FloatMatrix &KDD, IntegrationPoint *ip, Load *load, const int iSurf, TimeStep *tStep)
void computeDiscSolutionVector(IntArray &dofIdArray, TimeStep *tStep, FloatArray &solVecD)
void beColumnOf(const FloatMatrix &mat, int col)
Reciever will be set to a given column in a matrix.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
void setNodeCoords(int nodeNum, FloatArray &coords)
virtual void discComputeStiffness(FloatMatrix &LCC, FloatMatrix &LDD, FloatMatrix &LDC, IntegrationPoint *ip, int layer, FloatMatrix A[3][3], TimeStep *tStep)
void giveFictiousUpdatedNodeCoordsForExport(std::vector< FloatArray > &nodes, int layer, TimeStep *tStep, int subCell)
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
double distance(const FloatArray &x) const
Computes the distance between position represented by receiver and position given as parameter...
int giveNumberOfEnrichmentItems() const
void mapXi3FromLocalToShell(FloatArray &answer, FloatArray &local, int layer)
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
double computeIntegralThick()
Returns the total thickness of all layers.
void computeSectionalForces(FloatArray &answer, TimeStep *tStep, FloatArray &solVec, int useUpdatedGpRecord=0)
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
void computeMassMatrixNum(FloatMatrix &answer, TimeStep *tStep)
virtual void giveEdgeDofMapping(IntArray &answer, int iEdge) const =0
Assembles edge dof mapping mask, which provides mapping between edge local DOFs and "global" element ...
FEI3dWedgeQuad interpolationForExport
void setCellType(int cellNum, int type)
double giveNaturalCoordinate(int i) const
Returns i-th natural element coordinate of receiver.
bool hasCohesiveZone(int interfaceNum)
void setNumberOfInternalXFEMVarsToExport(int numVars, int numEnrichmentItems, int numNodes)
const IntArray & giveDofManArray() const
virtual void evalCovarNormalAt(FloatArray &nCov, const FloatArray &lCoords, FloatArray &genEpsC, TimeStep *tStep)
virtual void giveFirstPKTraction_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &jump, const FloatMatrix &F, TimeStep *tStep)
void setNumberOfPrimaryVarsToExport(int numVars, int numNodes)
Abstract base class representing a boundary load (force, momentum, ...) that acts directly on a bound...
void giveUpdatedSolutionVector(FloatArray &answer, TimeStep *tStep)
Material * giveMaterial(int n)
Service for accessing particular domain material model.
Element * giveElement(int n)
Service for accessing particular domain fe element.
std::vector< IntArray > orderingArrays
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
virtual const IntArray & giveOrderingDofTypes() const =0
double giveLayerThickness(int layer)
void clear()
Clears the array (zero size).
virtual void edgeComputeNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer)
void setNumberOfCellVarsToExport(int numVars, int numCells)
int giveInterfaceMaterialNum(int interface)
DofIDItem
Type representing particular dof type.
void giveLocalNodeCoordsForExport(FloatArray &nodeLocalXi1Coords, FloatArray &nodeLocalXi2Coords, FloatArray &nodeLocalXi3Coords, int subCell, int layer, FloatMatrix &localNodeCoords)
UnknownType
Type representing particular unknown (its physical meaning).
void times(double f)
Multiplies receiver by factor f.
void computeBoundaryEdgeLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global)
Computes the contribution of the given load at the given boundary edge.
std::vector< IntArray > activeDofsArrays
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver 'a' transformed using give transformation matrix r.
void addProductOf(const FloatMatrix &a, const FloatMatrix &b)
Adds to the receiver product of .
bool evalLevelSetNormalInNode(double &oLevelSet, int iNodeInd, const FloatArray &iGlobalCoord) const
CoordSystType
Load coordinate system type.
Class representing connectivity table.
Wrapper around element definition to provide FEICellGeometry interface.
virtual void edgeGiveUpdatedSolutionVector(FloatArray &answer, const int iedge, TimeStep *tStep)
virtual void evalCovarBaseVectorsAt(const FloatArray &lCoords, FloatMatrix &gcov, FloatArray &genEps, TimeStep *tStep)
virtual int global2local(FloatArray &answer, const FloatArray &gcoords, const FEICellGeometry &cellgeo)=0
Evaluates local coordinates from given global ones.
void beLocalCoordSys(const FloatArray &normal)
Makes receiver the local coordinate for the given normal.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
void recoverShearStress(TimeStep *tStep)
virtual int checkConsistency()
Performs consistency check.
double evaluateCutHeaviside(const double xi, const double xiBottom, const double xiTop) const
double giveLayerMidZ(int layer)
This class implements a structural interface material status information.
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
Adds to the receiver the product .
void giveLayerContributionToSR(FloatMatrix &dSmat, FloatMatrix &dSmatLayerIP, int layer, double zeroThicknessLevel, TimeStep *tStep)
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes the stiffness matrix of receiver.
void resizeWithValues(int s, int allocChunk=0)
Checks size of receiver towards requested bounds.
virtual int giveApproxOrder()=0
void computeEnrichedNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei)
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix^T and anArray.
Abstract base class for all material models.
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
virtual void OLDcomputeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
virtual void giveShellExportData(VTKPiece &vtkPiece, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep)
void giveElementNeighbourList(IntArray &answer, IntArray &elemList)
Returns list of neighboring elements to given elements (they are included too).
std::vector< std::unique_ptr< IntegrationRule > > czIntegrationRulesArray
void giveFictiousNodeCoordsForExport(std::vector< FloatArray > &nodes, int layer)
virtual void computeTractionForce(FloatArray &answer, const int iedge, BoundaryLoad *edgeLoad, TimeStep *tStep, ValueModeType mode, bool map2elementDOFs=false)
void computeDiscGeneralizedStrainVector(FloatArray &dGenEps, const FloatArray &lCoords, EnrichmentItem *ei, TimeStep *tStep)
void setPrimaryVarInNode(int varNum, int nodeNum, FloatArray valueArray)
int numberOfGaussPoints
Number of integration points as specified by nip.
void computeCohesiveTangentAt(FloatMatrix &answer, TimeStep *tStep, Delamination *dei, EnrichmentItem *ei_j, EnrichmentItem *ei_k)
void subtract(const FloatMatrix &a)
Subtracts matrix from the receiver.
virtual void evalInitialCovarNormalAt(FloatArray &nCov, const FloatArray &lCoords)
bool evalLevelSetTangInNode(double &oLevelSet, int iNodeInd, const FloatArray &iGlobalCoord) const
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
Class representing vector of real numbers.
virtual void vtkEvalUpdatedGlobalCoordinateAt(const FloatArray &localCoords, int layer, FloatArray &globalCoords, TimeStep *tStep)
Load is specified in global c.s. but follows the deformation.
void computeLambdaNMatrixDis(FloatMatrix &lambda_xd, double zeta)
void giveDisUnknownsAt(const FloatArray &lCoords, EnrichmentItem *ei, FloatArray &solVec, FloatArray &x, FloatArray &m, double &gam, TimeStep *tStep)
int findSorted(int value) const
Finds the first occurrence of given value, assuming that the receiver is sorted.
void computeOrderingArray(IntArray &orderingArray, IntArray &activeDofsArray, EnrichmentItem *ei)
Implementation of matrix containing floating point numbers.
double giveBoundingDelamXiCoord() const
IntArray DelaminatedInterfaceList
void interpLevelSet(double &oLevelSet, const FloatArray &iN, const IntArray &iNodeInd) const
This class manages the xfem part.
virtual void vtkEvalInitialGlobalCoordinateAt(const FloatArray &localCoords, int layer, FloatArray &globalCoords)
IRResultType
Type defining the return values of InputRecord reading operations.
GaussPoint * getIntegrationPoint(int n)
Access particular integration point of receiver.
virtual ~Shell7BaseXFEM()
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
static void computeIPAverage(FloatArray &answer, IntegrationRule *iRule, Element *elem, InternalStateType isType, TimeStep *tStep)
Computes a cell average of an InternalStateType varible based on the weights in the integrationpoints...
IntArray vtkExportFields
List with the fields that should be exported to VTK.
void setOffset(int cellNum, int offset)
virtual double giveGlobalZcoord(const FloatArray &lCoords)
const FloatArray & giveNodeCoordinates() const
As giveCoordinates, but non-virtual and therefore faster (because it can be inlined).
void beSubArrayOf(const FloatArray &src, const IntArray &indx)
Extract sub vector form src array and stores the result into receiver.
void edgeComputeEnrichedBmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei, const int edge)
void assemble(const FloatArray &fe, const IntArray &loc)
Assembles the array fe (typically, the load vector of a finite element) into the receiver, using loc as location array.
virtual int giveNumberOfDofs()
This class represent a 7 parameter shell element.
virtual double computeAreaAround(GaussPoint *gp, double xi)=0
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual void printYourself() const
Print receiver on stdout.
Class representing a general abstraction for surface finite element interpolation class...
std::vector< Dof * >::const_iterator findDofWithDofId(DofIDItem dofID) const
Finds index of DOF with required physical meaning of receiver.
void fitRecoveredStress2BC(std::vector< FloatMatrix > &answer1, std::vector< FloatMatrix > &answer2, std::vector< FloatMatrix > &dSmat, std::vector< FloatMatrix > &dSmatIP, FloatMatrix &SmatOld, FloatMatrix &tractionBtm, FloatMatrix &tractionTop, double zeroThicknessLevel, FloatArray fulfillBC, int startLayer, int endLayer)
std::vector< Dof * >::iterator begin()
void add(const FloatMatrix &a)
Adds matrix to the receiver.
void followedBy(const IntArray &b, int allocChunk=0)
Appends array b at the end of receiver.
int giveNumberOfIntegrationPoints() const
Returns number of integration points of receiver.
void zero()
Zeroes all coefficients of receiver.
void computeFAt(const FloatArray &lCoords, FloatMatrix &answer, FloatArray &genEps, TimeStep *tStep)
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int li=1, int ui=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
virtual void edgeEvalN(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of edge interpolation functions (shape functions) at given point.
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
void edgeComputeEnrichedNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei, const int edge)
const FloatArray & giveTempFirstPKTraction() const
Returns the const pointer to receiver's temporary first Piola-Kirchhoff traction vector.
void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord)
Evaluates nodal representation of real internal forces.
void times(double s)
Multiplies receiver with scalar.
IntArray numSubDivisionsArray
double evaluateLevelSet(const FloatArray &lCoords, EnrichmentItem *ei)
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
EnrichmentItem * giveEnrichmentItem(int n)
virtual void computeBulkTangentMatrix(FloatMatrix &answer, FloatArray &solVec, TimeStep *tStep)
virtual void giveRecoveredTransverseInterfaceStress(std::vector< FloatMatrix > &transverseStress, TimeStep *tStep)
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Computes the element local coordinates from given global coordinates.
void printYourself() const
Prints matrix to stdout. Useful for debugging.
void recoverValuesFromIP(std::vector< FloatArray > &nodes, int layer, InternalStateType type, TimeStep *tStep, stressRecoveryType SRtype=copyIPvalue)
Abstract base class for all "structural" constitutive models.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
virtual void postInitialize()
Performs post initialization steps.
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Returns dofmanager dof mask for node.
virtual void giveCompositeExportData(std::vector< VTKPiece > &vtkPieces, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep)
void zero()
Zeroes all coefficient of receiver.
Domain * giveDomain() const
InterfaceType
Enumerative type, used to identify interface type.
void setConnectivity(int cellNum, IntArray &nodes)
void computeEnrichedBmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei)
double EvaluateEnrFuncInDofMan(int dofManNum, EnrichmentItem *ei)
virtual double edgeComputeLengthAround(GaussPoint *gp, const int iedge)
Load is base abstract class for all loads.
void edgeEvalEnrCovarBaseVectorsAt(const FloatArray &lCoords, const int iedge, FloatMatrix &gcov, TimeStep *tStep, EnrichmentItem *ei)
void updateLayerTransvStressesSR(FloatMatrix &dSmatLayerIP, int layer)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
InternalStateValueType giveInternalStateValueType(InternalStateType type)
int giveNumIntegrationPointsInLayer()
void giveFictiousUpdatedCZNodeCoordsForExport(std::vector< FloatArray > &nodes, int layer, TimeStep *tStep, int subCell)
int giveSize() const
Returns the size of receiver.
Abstract base class for all "structural" interface models.
void giveTractionBC(FloatMatrix &tractionTop, FloatMatrix &tractionBtm, TimeStep *tStep)
the oofem namespace is to define a context or scope in which all oofem names are defined.
DofManager * giveDofManager(int i) const
virtual int giveNumberOfEdgeDofs()=0
void assemble(const FloatMatrix &src, const IntArray &loc)
Assembles the contribution using localization array into receiver.
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
Class implementing node in finite element mesh.
virtual void giveEIDofIdArray(IntArray &answer) const
double normalize()
Normalizes receiver.
void computeCohesiveForces(FloatArray &answer, TimeStep *tStep, FloatArray &solVec, FloatArray &solVecD, EnrichmentItem *ei, EnrichmentItem *coupledToEi)
Node * giveNode(int i) const
Returns reference to the i-th node of element.
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)
Computes components values of load at given point - global coordinates (coordinates given)...
Load * giveLoad(int n)
Service for accessing particular domain load.
void recoverValuesFromCZIP(std::vector< FloatArray > &recoveredValues, int interfce, InternalStateType type, TimeStep *tStep)
virtual int SetUpPointsOnLine(int nPoints, MaterialMode mode)
Sets up receiver's integration points on unit line integration domain.
void symmetrized()
Initializes the lower half of the receiver according to the upper half.
void discComputeSectionalForces(FloatArray &answer, TimeStep *tStep, FloatArray &solVec, FloatArray &solVecD, EnrichmentItem *ei)
FEI3dTrQuad interpolationForCZExport
const double DISC_DOF_SCALE_FAC
std::vector< std::vector< FloatArray > > quantities
Class representing integration point in finite element program.
IntArray boundaryLoadArray
void giveLocalCZNodeCoordsForExport(FloatArray &nodeLocalXi1Coords, FloatArray &nodeLocalXi2Coords, FloatArray &nodeLocalXi3Coords, int subCell, FloatMatrix &localNodeCoords)
void computeTripleProduct(FloatMatrix &answer, const FloatMatrix &a, const FloatMatrix &b, const FloatMatrix &c)
void computeLambdaNMatrix(FloatMatrix &lambda, FloatArray &genEps, double zeta)
virtual void computeLocalEdgeMapping(IntArray &edgeNodes, int iedge)=0
void computeLambdaGMatrices(FloatMatrix lambda[3], FloatArray &genEps, double zeta)
Class representing solution step.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
FloatMatrix giveAxialMatrix(const FloatArray &vec)
int numberOfDofMans
Number of dofmanagers.
void add(const FloatArray &src)
Adds array src to receiver.
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates global coordinates from given local ones.
Material * giveInterfaceMaterial(int interface)
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
virtual void postInitialize()
Performs post initialization steps.
virtual void computeNmatrixAt(const FloatArray &iLocCoords, FloatMatrix &answer)
Computes interpolation matrix for element unknowns.
#define _IFT_Shell7BaseXFEM_CohesiveZoneMaterial
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
Adds the product .