60ParamKey Shell7Base :: IPK_Shell7Base_recoverStress(
"recoverstress");
68void Shell7Base :: initializeFrom(
InputRecord &ir,
int priority)
71 NLStructuralElement :: initializeFrom(ir, priority);
76Shell7Base :: checkConsistency()
78 NLStructuralElement :: checkConsistency();
81 OOFEM_ERROR(
"Elements derived from Shell7Base only supports layered cross section");
88Shell7Base :: postInitialize()
92 OOFEM_ERROR(
"Shell7Base derived elements only supports layered cross section");
98 Element :: postInitialize();
139 return NLStructuralElement :: giveInterface(it);
145Shell7Base :: giveDofManDofIDMask(
int inode,
IntArray &answer)
const
147 answer = { D_u, D_v, D_w, W_u, W_v, W_w, Gamma };
152Shell7Base :: giveNumberOfDofs()
173 const auto &xbar = this->
giveNode(i)->giveCoordinates();
208Shell7Base :: giveGlobalZcoordInLayer(
double xi,
int layer)
211 return this->
layeredCS->giveLayerMidZ(layer) + xi*this->
layeredCS->giveLayerThickness(layer)*0.5 ;
232 const auto &nodeCoords = (xbar + zeta*M);
233 G1 += dNdxi.
at(i, 1) * nodeCoords;
234 G2 += dNdxi.
at(i, 2) * nodeCoords;
249Shell7Base :: edgeEvalInitialCovarBaseVectorsAt(
const FloatArrayF<1> &lcoords,
const int iedge)
253 const auto &edgeNodes = this->
fei->computeLocalEdgeMapping(iedge);
259 for (
int i = 1; i <= edgeNodes.giveSize(); i++ ) {
262 auto nodeCoords = (xbar + zeta*M);
263 G1 += dNdxi.
at(i) * nodeCoords;
285 auto gMetric =
Tdot(base1,base1);
286 auto ginv =
inv(gMetric);
287 return dotT(base1, ginv);
306Shell7Base :: edgeEvalInitialDirectorAt(
const FloatArrayF<1> &lcoords,
const int iEdge)
311 const auto &edgeNodes = this->
fei->computeLocalEdgeMapping(iEdge);
315 for (
int i = 1; i <= edgeNodes.giveSize(); i++ ) {
323Shell7Base :: setupInitialNodeDirectors()
333 for (
int node = 1; node <= nDofMan; node++ ) {
339 for (
int i = 1; i <= nDofMan; i++ ) {
341 G1 += dNdxi.
at(i, 1) * nodeI;
342 G2 += dNdxi.
at(i, 2) * nodeI;
356 double dgamdxi1, dgamdxi2, gam;
359 double fac1 = ( zeta + 0.5 * gam * zeta * zeta );
360 double fac2 = ( 0.5 * zeta * zeta );
361 double fac3 = ( 1.0 + zeta * gam );
363 auto g1 = dxdxi1 + fac1*dmdxi1 + fac2*dgamdxi1*m;
364 auto g2 = dxdxi2 + fac1*dmdxi2 + fac2*dgamdxi2*m;
378 double zeta = lcoords.
at(3);
392 double dgamdxi = genEpsEdge.
at(10);
393 double gam = genEpsEdge.
at(11);
395 double fac1 = ( zeta + 0.5 * gam * zeta * zeta );
396 double fac2 = ( 0.5 * zeta * zeta );
397 double fac3 = ( 1.0 + zeta * gam );
399 auto g2 =
normalize(dxdxi + fac1*dmdxi + fac2*dgamdxi*m);
432 for (
int i = 1; i <= nLoads; i++ ) {
435 Load *load = this->
domain->giveLoad(load_number);
440 answer.
add(K_pressure);
446std::array<FloatMatrixF<3,18>, 3>
447Shell7Base :: computeLambdaGMatrices(
FloatArray &genEps,
double zeta)
454 double dgam1, dgam2, gam;
458 double a = zeta + 0.5 * gam * zeta * zeta;
459 double b = 0.5 * zeta * zeta;
460 double c = 1.0 + gam * zeta;
466 std::array<FloatMatrixF<3,18>, 3> lambda;
469 lambda[ 0 ](0,0) = lambda[ 0 ](1,1) = lambda[ 0 ](2,2) = 1.;
470 lambda[ 0 ](0,6) = lambda[ 0 ](1,7) = lambda[ 0 ](2,8) = a;
471 lambda[ 0 ](0,12) = lambda[ 0 ](1,13) = lambda[ 0 ](2,14) = b * dgam1;
472 lambda[ 0 ].setColumn(bm, 15);
473 lambda[ 0 ].setColumn(bdm1, 17);
476 lambda[ 1 ](0,3) = lambda[ 1 ](1,4) = lambda[ 1 ](2,5) = 1.;
477 lambda[ 1 ](0,9) = lambda[ 1 ](1,10) = lambda[ 1 ](2,11) = a;
478 lambda[ 1 ](0,12) = lambda[ 1 ](1,13) = lambda[ 1 ](2,14) = b * dgam2;
479 lambda[ 1 ].setColumn(bm, 16);
480 lambda[ 1 ].setColumn(bdm2, 17);
483 lambda[ 2 ](0,12) = lambda[ 2 ](1,13) = lambda[ 2 ](2,14) = c;
485 lambda[ 2 ].setColumn(zm, 17);
492Shell7Base :: computeLambdaNMatrix(
FloatArray &genEps,
double zeta)
498 double gam = genEps.
at(18);
501 double a = zeta + 0.5 * gam * zeta * zeta;
502 double b = 0.5 * zeta * zeta;
506 lambda.
at(1,1) = lambda.
at(2,2) = lambda.
at(3,3) = 1.0;
507 lambda.
at(1,4) = lambda.
at(2,5) = lambda.
at(3,6) = a;
520 int ndofs = Shell7Base :: giveNumberOfDofs();
521 answer.
resize(ndofs, ndofs); tempAnswer.
resize(ndofs, ndofs);
524 int numberOfLayers = this->
layeredCS->giveNumberOfLayers();
527 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
531 const auto &lCoords = gp->giveNaturalCoordinates();
536 Shell7Base :: computeLinearizedStiffness(gp, mat, tStep, A);
544 for (
int i = 0; i < 3; i++) {
546 for (
int j = 0; j < 3; j++) {
547 A_lambda.addProductOf(A[i][j], lambda[j]);
549 L.plusProductSymmUpper(lambda[i], A_lambda, 1.0);
561 answer.
assemble(tempAnswer, ordering, ordering);
576 for (
int I = 1; I <= 3; I++) {
577 for (
int J = I; J <= 3; J++) {
578 A[I - 1][J - 1].
resize(3, 3);
579 A[I - 1][J - 1].
zero();
581 for (
int k = 1; k <= 3; k++) {
582 for (
int l = 1; l <= 3; l++) {
583 for (
int m = 1; m <= 3; m++) {
584 for (
int n = 1; n <= 3; n++) {
624 int ndof = Shell7Base :: giveNumberOfDofs();
625 answer.
resize(ndof, ndof);
627 for (
auto *ip: iRule ) {
628 lcoords.at(1) = ip->giveNaturalCoordinate(1);
629 lcoords.at(2) = ip->giveNaturalCoordinate(2);
638 load->
computeValueAt(pressure, tStep, ip->giveNaturalCoordinates(), VM_Total);
640 auto g1 = gcov.column(0);
641 auto g2 = gcov.column(1);
673 answer.
at(2, 3) = v.
at(1);
674 answer.
at(3, 2) = -v.
at(1);
675 answer.
at(1, 3) = -v.
at(2);
676 answer.
at(3, 1) = v.
at(2);
677 answer.
at(1, 2) = v.
at(3);
678 answer.
at(2, 1) = -v.
at(3);
696 return dotT(gcov, Gcon);
705 auto vP =
static_cast< StructuralMaterial *
>( mat )->giveFirstPKStressVector_3d(vF, gp, tStep);
722 auto F = this->
computeFAt(lCoords, genEps, tStep);
728 S.beMatrixFormOfStress(vS);
741 case IST_CauchyStressTensor:
745 return Element :: giveIPValue(answer, gp, type, tStep);
776 int ndofs = Shell7Base :: giveNumberOfDofs();
778 int numberOfLayers = this->
layeredCS->giveNumberOfLayers();
783 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
787 const FloatArray &lCoords = gp->giveNaturalCoordinates();
812 auto PG =
dot(P, Gcon);
813 auto PG1 = PG.column(0);
814 auto PG2 = PG.column(1);
815 auto PG3 = PG.column(2);
819 sectionalForces.
clear();
845 double gam, dg1, dg2;
854 auto temp =
cross(dX1, dX2);
855 double sc =
norm(temp);
857 answer.
at(3) =
dot(M, temp) / sc;
860 answer.
at(2) =
dot(M, temp) / sc;
862 temp =
cross(dM1, dM2);
864 answer.
at(1) =
norm(temp) / sc;
871 OOFEM_ERROR(
"Shell7Base :: computeLumpedMassMatrix - No lumping algorithm implemented");
892 for (
auto &gp: iRule ) {
893 const FloatArray &lCoords = gp->giveNaturalCoordinates();
897 m = { unknowns.
at(4), unknowns.
at(5), unknowns.
at(6) };
898 double gam = unknowns.
at(7);
907 double rho = mat->
give(
'd', gp);
913 mass.
at(1, 1) = mass.
at(2, 2) = mass.
at(3, 3) = factors.
at(1);
914 mass.
at(1, 4) = mass.
at(2, 5) = mass.
at(3, 6) = factors.
at(2);
915 mass.
at(1, 7) = factors.
at(3) * m.
at(1);
916 mass.
at(2, 7) = factors.
at(3) * m.
at(2);
917 mass.
at(3, 7) = factors.
at(3) * m.
at(3);
918 mass.
at(4, 4) = mass.
at(5, 5) = mass.
at(6, 6) = factors.
at(4);
919 mass.
at(4, 7) = factors.
at(5) * m.
at(1);
920 mass.
at(5, 7) = factors.
at(5) * m.
at(2);
921 mass.
at(6, 7) = factors.
at(5) * m.
at(3);
928 NtmN.
times(dA * rho);
933 answer.
resize(ndofs, ndofs);
946 double a1 = coeff.
at(1);
947 double a2 = coeff.
at(2);
948 double a3 = coeff.
at(3);
954 double gam2 = gam * gam;
957 factors.
at(1) = a3 * h + ( a1 * h3 ) / 12.;
958 factors.
at(2) = h3 * ( 40. * a2 + 20. * a3 * gam + 3. * a1 * h2 * gam ) / 480.;
959 factors.
at(3) = h3 * ( 20. * a3 + 3. * a1 * h2 ) / 480. * 1.0;
960 factors.
at(4) = ( 28. * a3 * h3 * ( 80. + 3. * h2 * gam2 ) + 3. * h5 * ( 112. * a2 * gam + a1 * ( 112. + 5. * h2 * gam2 ) ) ) / 26880.;
961 factors.
at(5) = h5 * ( 56. * a2 + 28. * a3 * gam + 5. * a1 * h2 * gam ) / 8960.;
962 factors.
at(6) = h5 * ( 28. * a3 + 5. * a1 * h2 ) / 8960.;
974 int numberOfLayers = this->
layeredCS->giveNumberOfLayers();
978 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
990 const FloatArray &lCoords = gp->giveNaturalCoordinates();
999 mass =
Tdot(lambda, lambda);
1004 double rho = mat->
give(
'd', gp);
1010 answer.
assemble(M, ordering, ordering);
1028 double gam, dgam, dA;
1032 for (
auto &gp: iRule ) {
1033 const FloatArray &lCoords = gp->giveNaturalCoordinates();
1040 m = { a.
at(4), a.
at(5), a.
at(6) };
1042 dm = { da.
at(4), da.
at(5), da.
at(6) };
1045 double a1, a2, a3, h, h2, h3, h5, fac1, fac2, fac3, rho;
1049 rho = mat->
give(
'd', gp);
1066 fac1 = rho * h3 * ( 20. * a3 + 3. * a1 * h2 ) / 240.;
1067 fac2 = rho * h5 * ( 56. * a2 + 28. * a3 * gam + 5. * a1 * h2 * gam ) / 4480.;
1068 fac3 = rho * h5 * ( 28. * a3 + 5. * a1 * h2 ) / 4480.;
1069 fm.
at(1) = fac1 * dm.
at(1) * dgam;
1070 fm.
at(2) = fac1 * dm.
at(2) * dgam;
1071 fm.
at(3) = fac1 * dm.
at(3) * dgam;
1072 fm.
at(4) = fac2 * dm.
at(1) * dgam;
1073 fm.
at(5) = fac2 * dm.
at(2) * dgam;
1074 fm.
at(6) = fac2 * dm.
at(3) * dgam;
1089 if ( type != ExternalForcesVector ) {
1125 xi = pLoad->giveLoadOffset();
1129 xi = sLoad->giveLoadOffset();
1134 auto iRule = std::make_unique<GaussIntegrationRule>(1,
this);
1136 iRule->SetUpPointsOnTriangle(nPointsTri, _3dMat);
1140 FloatArray Fp, fp, genEps, genEpsC, traction, solVecC;
1142 for (
auto *ip: *iRule ) {
1144 ip->giveNaturalCoordinate(1),
1145 ip->giveNaturalCoordinate(2),
1163 answer.
resize( Shell7Base :: giveNumberOfDofs() );
1175 OOFEM_ERROR(
"incompatible load surface must be 0 for this element");
1185 lcoords.
at(3) = pLoad->giveLoadOffset();
1192 traction.
times( -load.
at(1) );
1197 lcoords.at(3) = sLoad->giveLoadOffset();
1203 traction.
assemble(tempTraction,sLoad->giveDofIDs());
1214 auto g1 = gcov.column(0);
1215 auto g2 = gcov.column(1);
1223 auto G1 = Gcov.column(0);
1224 auto G2 = Gcov.column(1);
1242 const FloatArray &lCoords = gp->giveNaturalCoordinates();
1248 if ( coordSystType == Load :: CST_UpdatedGlobal ) {
1254 FloatArray distrForces(3), distrMoments(3), t1, t2;
1255 distrForces = { components.
at(1), components.
at(2), components.
at(3)};
1256 distrMoments = { components.
at(4), components.
at(5), components.
at(6) };
1259 fT.addSubVector(t1,1);
1260 fT.addSubVector(t2,4);
1261 fT.at(7) = components.
at(7);
1263 }
else if( coordSystType == Load :: CST_Global ) {
1265 for (
int i = 1; i <= 7; i++) {
1266 fT.at(i) = components.
at(i);
1269 OOFEM_ERROR(
"Shell7Base :: computeTractionForce - does not support local coordinate system");
1277 if (map2elementDOFs) {
1280 answer.
resize( Shell7Base :: giveNumberOfDofs() );
1293 OOFEM_ERROR(
"Shell7Base :: computeBodyLoadVectorAt - currently not implemented");
1305Shell7Base :: edgeComputeLengthAround(
GaussPoint *gp,
const int iedge)
1310 auto G1 = tmp.first;
1311 double detJ =
norm(G1);
1324 if ( type == IST_DirectorField ) {
1327 answer.
at(1) += this->
giveNode(node)->giveDofWithID(W_u)->giveUnknown(VM_Total, tStep);
1328 answer.
at(2) += this->
giveNode(node)->giveDofWithID(W_v)->giveUnknown(VM_Total, tStep);
1329 answer.
at(3) += this->
giveNode(node)->giveDofWithID(W_w)->giveUnknown(VM_Total, tStep);
1352 if ( !this->
giveIPValue(stressVector, gp, type, tStep) ) {
1353 stressVector.
resize(size);
1354 stressVector.
zero();
1385 sum += fullAnswer.
at(i, j);
1424 recoveredValues.resize(numNodes);
1426 for (
int i = 1; i <= numNodes; i++ ) {
1428 recoveredValues[i-1].resize(9);
1430 for (
int j = 1; j <= recoveredSize; j++ ) {
1431 temp.
at(j) = nValProd.
at(i,j) / nnMatrix.
at(i);
1454 const auto &bNodes = this->
fei->computeLocalEdgeMapping(boundary);
1484 Element :: computeVectorOf(dofIdArray, VM_Total, tStep, temp,
true);
1490Shell7Base :: setupInitialSolutionVector()
1499 const auto &Xi = this->
giveNode(i)->giveCoordinates();
1520 Shell7Base :: giveDofManDofIDMask(dummy, dofIdArray);
1527Shell7Base :: setupInitialEdgeSolutionVector()
1532 for (
int iEdge = 1; iEdge <= numEdges; iEdge++ ) {
1536 const auto &edgeNodes = this->
fei->computeLocalEdgeMapping(iEdge);
1537 int ndofs_x = 3 * edgeNodes.giveSize();
1538 for (
int i = 1, j = 0; i <= edgeNodes.giveSize(); i++, j += 3 ) {
1539 const auto &Xi = this->
giveNode( edgeNodes.at(i) )->giveCoordinates();
1541 solVec.
at(1 + j) = Xi.at(1);
1542 solVec.
at(2 + j) = Xi.at(2);
1543 solVec.
at(3 + j) = Xi.at(3);
1544 solVec.
at(ndofs_x + 1 + j) = Mi.at(1);
1545 solVec.
at(ndofs_x + 2 + j) = Mi.at(2);
1546 solVec.
at(ndofs_x + 3 + j) = Mi.at(3);
1557 dphidxi1 = { genEps.
at(1), genEps.
at(2), genEps.
at(3) };
1558 dphidxi2 = { genEps.
at(4), genEps.
at(5), genEps.
at(6) };
1559 dmdxi1 = { genEps.
at(7), genEps.
at(8), genEps.
at(9) };
1560 dmdxi2 = { genEps.
at(10), genEps.
at(11), genEps.
at(12) };
1561 m = { genEps.
at(13), genEps.
at(14), genEps.
at(15) };
1562 dgamdxi1 = genEps.
at(16);
1563 dgamdxi2 = genEps.
at(17);
1564 gam = genEps.
at(18);
1576 x = { temp.
at(1), temp.
at(2), temp.
at(3) };
1577 m = { temp.
at(4), temp.
at(5), temp.
at(6) };
1609 answer.
at(1, 1 + j) =
N.at(i);
1610 answer.
at(2, 2 + j) =
N.at(i);
1611 answer.
at(3, 3 + j) =
N.at(i);
1612 answer.
at(4, ndofs_xm + 1 + j) =
N.at(i);
1613 answer.
at(5, ndofs_xm + 2 + j) =
N.at(i);
1614 answer.
at(6, ndofs_xm + 3 + j) =
N.at(i);
1615 answer.
at(7, ndofs_xm * 2 + i) =
N.at(i);
1645 for (
int i = 1, j = 0; i <= ndofman; i++, j += 3 ) {
1646 answer.
at(1, 1 + j) = dNdxi.
at(i);
1647 answer.
at(2, 2 + j) = dNdxi.
at(i);
1648 answer.
at(3, 3 + j) = dNdxi.
at(i);
1652 for (
int i = 1, j = 0; i <= ndofman; i++, j += 3 ) {
1653 answer.
at(4, ndofs_xm + 1 + j) = dNdxi.
at(i);
1654 answer.
at(5, ndofs_xm + 2 + j) = dNdxi.
at(i);
1655 answer.
at(6, ndofs_xm + 3 + j) = dNdxi.
at(i);
1656 answer.
at(7, ndofs_xm + 1 + j) =
N.at(i);
1657 answer.
at(8, ndofs_xm + 2 + j) =
N.at(i);
1658 answer.
at(9, ndofs_xm + 3 + j) =
N.at(i);
1662 for (
int i = 1, j = 0; i <= ndofman; i++, j += 1 ) {
1663 answer.
at(10, ndofs_xm * 2 + 1 + j) = dNdxi.
at(i);
1664 answer.
at(11, ndofs_xm * 2 + 1 + j) =
N.at(i);
1675 int ndofs = Shell7Base :: giveNumberOfDofs();
1677 answer.
resize(18, ndofs);
1694 for (
int i = 1, j = 0; i <= ndofman; i++, j += 3 ) {
1695 answer.
at(1, 1 + j) = dNdxi.
at(i, 1);
1696 answer.
at(2, 2 + j) = dNdxi.
at(i, 1);
1697 answer.
at(3, 3 + j) = dNdxi.
at(i, 1);
1698 answer.
at(4, 1 + j) = dNdxi.
at(i, 2);
1699 answer.
at(5, 2 + j) = dNdxi.
at(i, 2);
1700 answer.
at(6, 3 + j) = dNdxi.
at(i, 2);
1704 for (
int i = 1, j = 0; i <= ndofman; i++, j += 3 ) {
1705 answer.
at(7, ndofs_xm + 1 + j) = dNdxi.
at(i, 1);
1706 answer.
at(8, ndofs_xm + 2 + j) = dNdxi.
at(i, 1);
1707 answer.
at(9, ndofs_xm + 3 + j) = dNdxi.
at(i, 1);
1708 answer.
at(10, ndofs_xm + 1 + j) = dNdxi.
at(i, 2);
1709 answer.
at(11, ndofs_xm + 2 + j) = dNdxi.
at(i, 2);
1710 answer.
at(12, ndofs_xm + 3 + j) = dNdxi.
at(i, 2);
1711 answer.
at(13, ndofs_xm + 1 + j) =
N.at(i);
1712 answer.
at(14, ndofs_xm + 2 + j) =
N.at(i);
1713 answer.
at(15, ndofs_xm + 3 + j) =
N.at(i);
1717 for (
int i = 1, j = 0; i <= ndofman; i++, j += 1 ) {
1718 answer.
at(16, ndofs_xm * 2 + 1 + j) = dNdxi.
at(i, 1);
1719 answer.
at(17, ndofs_xm * 2 + 1 + j) = dNdxi.
at(i, 2);
1720 answer.
at(18, ndofs_xm * 2 + 1 + j) =
N.at(i);
1731 int ndofs = Shell7Base :: giveNumberOfDofs();
1744 answer.
at(1, 1 + j) =
N.at(i);
1745 answer.
at(2, 2 + j) =
N.at(i);
1746 answer.
at(3, 3 + j) =
N.at(i);
1747 answer.
at(4, ndofs_xm + 1 + j) =
N.at(i);
1748 answer.
at(5, ndofs_xm + 2 + j) =
N.at(i);
1749 answer.
at(6, ndofs_xm + 3 + j) =
N.at(i);
1750 answer.
at(7, ndofs_xm * 2 + i) =
N.at(i);
1761Shell7Base :: vtkEvalInitialGlobalCoordinateAt(
const FloatArrayF<3> &localCoords,
int layer)
1771 globalCoords +=
N.at(i) * ( xbar + zeta * M );
1773 return globalCoords;
1777Shell7Base :: vtkEvalInitialGlobalCZCoordinateAt(
const FloatArrayF<3> &localCoords,
int interface)
1787 globalCoords +=
N.at(i) * ( xbar + zeta * M );
1789 return globalCoords;
1800 double fac = ( zeta + 0.5 * gam * zeta * zeta );
1805Shell7Base :: giveCompositeExportData(std::vector< ExportRegion > &vtkPieces,
IntArray &primaryVarsToExport,
IntArray &internalVarsToExport,
IntArray cellVarsToExport,
TimeStep *tStep )
1807 vtkPieces.resize(1);
1808 this->
giveShellExportData(vtkPieces[0], primaryVarsToExport, internalVarsToExport, cellVarsToExport, tStep );
1815 int numCells = this->
layeredCS->giveNumberOfLayers();
1816 const int numCellNodes = 15;
1817 int numTotalNodes = numCellNodes*numCells;
1828 for (
int layer = 1; layer <= numCells; layer++ ) {
1833 for (
int node = 1; node <= numCellNodes; node++ ) {
1839 for (
int i = 1; i <= numCellNodes; i++ ) {
1840 nodes.
at(i) = val++;
1845 offset += numCellNodes;
1857 std::vector<FloatArray> values;
1858 for (
int fieldNum = 1; fieldNum <= primaryVarsToExport.
giveSize(); fieldNum++ ) {
1861 for (
int layer = 1; layer <= numCells; layer++ ) {
1863 if ( type == DisplacementVector ) {
1866 for (
int j = 1; j <= numCellNodes; j++ ) {
1867 u = updatedNodeCoords[j-1];
1875 for (
int j = 1; j <= numCellNodes; j++ ) {
1886 for (
int fieldNum = 1; fieldNum <= internalVarsToExport.
giveSize(); fieldNum++ ) {
1895 for (
int layer = 1; layer <= numCells; layer++ ) {
1897 for (
int j = 1; j <= numCellNodes; j++ ) {
1909 for (
int i = 1; i <= cellVarsToExport.
giveSize(); i++ ) {
1912 for (
int layer = 1; layer <= numCells; layer++ ) {
1950 inod.printYourself(
"recovered-värden");
1968 recoveredValues.resize(numNodes);
1974 for (
int i = 1; i <= numNodes; i++ ) {
1976 double distOld = 3.0;
1978 for (
int j = 0; j < iRule->giveNumberOfIntegrationPoints(); ++j ) {
1982 double dist =
distance(nodeCoords, ipCoords);
1983 if ( dist < distOld ) {
1984 closestIPArray.
at(i) = j;
1991 for (
int i = 1; i <= numNodes; i++ ) {
1995 recoveredValues[i-1].resize(9);
2001 recoveredValues[i-1] = ipValues;
2016 recoveredValues.resize(numNodes);
2020 int numIP = iRule->giveNumberOfIntegrationPoints();
2024 if (numNodes > numIP) {
2025 OOFEM_ERROR(
"Least square fit not possible for more nodes than IP:s per layer.");
2029 FloatMatrix Nbar, NbarTNbar, NbarTNbarInv, Nhat, ipValues, temprecovedValues, temprecovedValuesT;
2030 Nbar.
resize(numIP,numNodes);
2035 for (
int i = 0; i < numIP; i++ ) {
2036 ip = iRule->getIntegrationPoint(i);
2046 tempIPvalues.
zero();
2047 tempIPvalues.
at(1) = 7.8608e+09 * ( 0.2 - ipGlobalCoords.
at(1) ) * ipGlobalCoords.
at(3);
2066 IntArray strangeNodeNumbering = {2, 1, 3, 5, 4, 6, 7, 9, 8, 10, 12, 11, 13, 14, 15 };
2067 for (
int i = 0; i < numNodes; i++ ) {
2070 nodalStresses.
beColumnOf(temprecovedValuesT,i+1);
2071 recoveredValues[strangeNodeNumbering[i]-1] =
convV6ToV9Stress(nodalStresses);
2073 recoveredValues[strangeNodeNumbering[i]-1].beColumnOf(temprecovedValuesT,i+1);
2088 int numIP = iRule->giveNumberOfIntegrationPoints();
2094 Nbar.
resize(numIP,numNodes);
2096 if ( valueType ==
ISVT_TENSOR_S3 ) { numSC = 6; }
else { numSC = 9; };
2097 ipValues.
resize(numIP,numSC);
2099 for (
int i = 0; i < numIP; i++ ) {
2100 auto *ip = iRule->getIntegrationPoint(i);
2125 int numEltIP = iRule->giveNumberOfIntegrationPoints();
2126 eltIPvalues.
clear();
2127 eltPolynomialValues.
clear();
2130 for (
int iIP = 0; iIP < numEltIP; iIP++ ) {
2131 ip = iRule->getIntegrationPoint(iIP);
2142 IpCoords.
at(2)*IpCoords.
at(3),IpCoords.
at(1)*IpCoords.
at(3),IpCoords.
at(1)*IpCoords.
at(2),
2143 IpCoords.
at(1)*IpCoords.
at(1),IpCoords.
at(2)*IpCoords.
at(2)};
2153 tractionTop.
zero(); tractionBtm.
zero();
2157 for (
int i = 1; i <= numLoads; i++ ) {
2161 Load *load = this->
domain->giveLoad(load_number);
2168 double xi = sLoad->giveLoadOffset();
2169 tractionBC.assemble(tempBC,sLoad->giveDofIDs());
2171 OOFEM_ERROR(
"Number of stress components don't match");
2198 int numberOfLayers = this->
layeredCS->giveNumberOfLayers();
2200 int numThicknessIP = this->
layeredCS->giveNumIntegrationPointsInLayer();
2201 if (numThicknessIP < 2) {
2203 OOFEM_ERROR(
"To few thickness IP per layer to do polynomial fit");
2209 double totalThickness = this->
layeredCS->computeIntegralThick();
2211 double zeroThicknessLevel = - 0.5 * totalThickness;
2218 std::vector <FloatMatrix> dSmatIP; dSmatIP.resize(numberOfLayers);
2219 std::vector <FloatMatrix> dSmat; dSmat.resize(numberOfLayers);
2220 std::vector <FloatMatrix> dSmatIPupd; dSmatIPupd.resize(numberOfLayers);
2221 std::vector <FloatMatrix> dSmatupd; dSmatupd.resize(numberOfLayers);
2226 SmatOld = tractionBtm;
2235 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
2260 dSmatIP[layer-1].beSubMatrixOf(dSmatLayerIP, 3, 3, 1, numWedgeIP);
2261 dSmat[layer-1].beSubMatrixOf(dSmatLayer, 3, 3, 1,
numInPlaneIP);
2268 SmatOld.
add(dSmatLayer);
2277 SmatOld.
add(dSmat[layer-1]);
2279 zeroThicknessLevel += this->
layeredCS->giveLayerThickness(layer);
2286 zeroThicknessLevel = - 0.5 * totalThickness;
2293 FloatArray tempTractionTop = {tractionTop.at(3)};
2294 fitRecoveredStress2BC(dSmatIPupd, dSmat, dSmatIP, integratedStress, tempTractionBtm, tempTractionTop, zeroThicknessLevel, {1});
2298 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
2305 fitRecoveredStress2BC(dSmatIPupd, dSmatupd, dSmat, dSmatIP, SmatOld, tractionBtm, tractionTop, zeroThicknessLevel, {0.0,0.0,1.0}, 1, numberOfLayers);
2307 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
2316Shell7Base :: giveRecoveredTransverseInterfaceStress(std::vector<FloatMatrix> &transverseStress,
TimeStep *tStep)
2319 transverseStress.clear();
2321 int numberOfLayers = this->
layeredCS->giveNumberOfLayers();
2322 int numThicknessIP = this->
layeredCS->giveNumIntegrationPointsInLayer();
2323 if (numThicknessIP < 2) {
2325 OOFEM_ERROR(
"To few thickness IP per layer to do polynomial fit");
2329 double totalThickness = this->
layeredCS->computeIntegralThick();
2330 double zeroThicknessLevel = - 0.5 * totalThickness;
2335 std::vector <FloatMatrix> dSmatIP; dSmatIP.resize(numberOfLayers);
2336 std::vector <FloatMatrix> dSmat; dSmat.resize(numberOfLayers);
2337 std::vector <FloatMatrix> dSmatIPupd; dSmatIPupd.resize(numberOfLayers);
2338 std::vector <FloatMatrix> dSmatupd; dSmatupd.resize(numberOfLayers);
2343 SmatOld = tractionBtm;
2353 for (
int layer = 1; layer <= numberOfLayers; layer++ ) {
2377 SmatOld.
add(dSmat[layer-1]);
2379 zeroThicknessLevel += this->
layeredCS->giveLayerThickness(layer);
2384 zeroThicknessLevel = - 0.5 * totalThickness;
2387 transverseStress.
resize(numberOfLayers-1);
2388 fitRecoveredStress2BC(dSmatIPupd, dSmatupd, dSmat, dSmatIP, SmatOld, tractionBtm, tractionTop, zeroThicknessLevel, {0.0,0.0,1.0}, 1, numberOfLayers);
2390 for (
int layer = 1 ; layer < numberOfLayers ; layer++ ) {
2391 transverseStress[layer-1] = dSmatupd[layer-1];
2418 int numThicknessIP = this->
layeredCS->giveNumIntegrationPointsInLayer();
2426 int numSampledIP = 0, numCoefficents = 11;
2430 patchIpValues.
zero();
2436 for (
int patchElNum : patchEls) {
2444 int numEltIP = iRule->giveNumberOfIntegrationPoints();
2447 for (
int iIP = 0; iIP < numEltIP; iIP++ ) {
2448 ip = iRule->getIntegrationPoint(iIP);
2453 patchEl->
giveIPValue(tempIPvalues, ip, IST_StressTensor, tStep);
2465 IpCoords.
at(2)*IpCoords.
at(3),IpCoords.
at(1)*IpCoords.
at(3),IpCoords.
at(1)*IpCoords.
at(2),
2466 IpCoords.
at(1)*IpCoords.
at(1),IpCoords.
at(2)*IpCoords.
at(2),
2467 IpCoords.
at(1)*IpCoords.
at(1)*IpCoords.
at(3),IpCoords.
at(2)*IpCoords.
at(2)*IpCoords.
at(3)};
2487 patchEl->
giveSPRcontribution(eltIPvalues,eltPolynomialValues,layer,IST_StressTensor,tStep);
2492 patchIpValues.
setSubMatrix(eltIPvalues,numSampledIP+1,1);
2496 numSampledIP += numEltIP;
2499 if (numSampledIP < numCoefficents*numThicknessIP) {
2501 OOFEM_ERROR(
"To few in-plane IP to do polynomial fit");
2521 aSiz.
resize(2,numCoefficents*2);
2522 aSzz.
resize(1,numCoefficents*3);
2523 for (
int iCol = 1; iCol <= numCoefficents; iCol++) {
2524 aSiz.
at(1,iCol) = a.
at(iCol,1);
2525 aSiz.
at(1,iCol+numCoefficents) = a.
at(iCol,6);
2526 aSiz.
at(2,iCol) = a.
at(iCol,6);
2527 aSiz.
at(2,iCol+numCoefficents) = a.
at(iCol,2);
2528 aSzz.
at(1,iCol) = a.
at(iCol,1);
2529 aSzz.
at(1,iCol+numCoefficents) = 2.0*a.
at(iCol,6);
2530 aSzz.
at(1,iCol+2*numCoefficents) = a.
at(iCol,2);
2537 dSmatLayerIP.
zero();
2538 double thickness = this->
layeredCS->giveLayerThickness(layer);
2546 GaussPoint *gp = iRuleL->getIntegrationPoint(j);
2549 GPcoords.
at(3) = zeroThicknessLevel;
2562 for (
int i = 0; i < numThicknessIP; i++ ) {
2566 GaussPoint *gp = iRuleL->getIntegrationPoint(point);
2573 GPcoords.printYourself(
"wedge GPs");
2590 dSmatLayerIP.
at(1,point+1) = dS.
at(1) + dSBtm.
at(1);
2591 dSmatLayerIP.
at(2,point+1) = dS.
at(2) + dSBtm.
at(2);
2601 dSmatLayerIP.
at(3,point+1) = dSzz.
at(1) + dSzzBtm.
at(1);
2610 GPcoords.at(3) = thickness + zeroThicknessLevel;
2619 dSmatLayer.
at(1,j+1) = dS.
at(1) + dSBtm.
at(1);
2620 dSmatLayer.
at(2,j+1) = dS.
at(2) + dSBtm.
at(2);
2630 dSmatLayer.
at(3,j+1) = dSzz.
at(1) + dSzzBtm.
at(1);
2638 int numCoefficents2 = 2;
2645 int numEltIP = iRuleL->giveNumberOfIntegrationPoints();
2646 for (
int iIP = 0; iIP < numEltIP; iIP++ ) {
2647 ip = iRuleL->getIntegrationPoint(iIP);
2651 this->
giveIPValue(tempIPvalues, ip, IST_StressTensor, tStep);
2658 IpCoords.
at(3) -= zeroThicknessLevel;
2680 a2Szz.
resize(1,numCoefficents2*2);
2696 for (
int i = 0; i < numThicknessIP; i++ ) {
2700 GaussPoint *gp = iRuleL->getIntegrationPoint(point);
2703 GPcoords.
at(3) -= zeroThicknessLevel;
2713 dSmatLayerIP.
at(3,point+1) += dSzz2.
at(1);
2716 GPcoords.
at(3) = thickness;
2730 dSmatLayer.
at(3,j+1) += dSzz2.
at(1);
2737Shell7Base :: 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)
2745 int numberOfLayers = startLayer - endLayer + 1;
2746 int numThicknessIP = this->
layeredCS->giveNumIntegrationPointsInLayer();
2748 double totalThickness = 0.0;
2749 if ( numberOfLayers == this->
layeredCS->giveNumberOfLayers() ) {
2750 totalThickness = this->
layeredCS->computeIntegralThick();
2752 for (
int layer = startLayer ; layer <= endLayer; layer++ ) {
2753 totalThickness += this->
layeredCS->giveLayerThickness(layer);
2758 OOFEM_ERROR(
"Number of stress components don't match");
2766 for (
int iSC = 1; iSC <= numSC; iSC++) {
2770 intError.
at(iSC,j+1) = tractionTop.
at(iSC,j+1) - SmatOld.
at(iSC,j+1);
2771 C1.
at(iSC,j+1) = (1.0/totalThickness)*intError.
at(iSC,j+1);
2772 SOld.
at(iSC,j+1) = tractionBtm.
at(iSC,j+1) - 0.5*(1.0 - fulfillBC.
at(iSC))*intError.
at(iSC,j+1);
2779 for (
int layer = startLayer ; layer <= endLayer; layer++ ) {
2782 answer1[layer-startLayer].resize(numSC,
numInPlaneIP*numThicknessIP);
2785 for (
int iSC = 1; iSC <= numSC; iSC++) {
2796 for (
int i = 0 ; i < numThicknessIP ; i++ ) {
2800 GaussPoint *gp = iRuleL->getIntegrationPoint(point);
2803 GPcoords.
at(3) -= zeroThicknessLevel;
2806 answer1[layer-startLayer].at(iSC,point+1) = dSmatIP[layer-startLayer].at(iSC,point+1) + C1.
at(iSC,j+1)*GPcoords.
at(3) + SOld.
at(iSC,j+1);
2809 GPcoords.
at(3) = this->
layeredCS->giveLayerThickness(layer);
2810 SOld.
at(iSC,j+1) += dSmat[layer-startLayer].at(iSC,j+1) + C1.
at(iSC,j+1)*GPcoords.
at(3);
2814 answer2[layer-startLayer] = SOld;
2816 zeroThicknessLevel += this->
layeredCS->giveLayerThickness(layer);
2821Shell7Base :: updateLayerTransvStressesSR(
FloatMatrix &dSmatLayerIP,
int layer)
2828 int numThicknessIP = this->
layeredCS->giveNumIntegrationPointsInLayer();
2831 for (
int i = 0; i < numThicknessIP; i++ ) {
2838 GaussPoint *gp = iRuleL->getIntegrationPoint(point);
2842 Sold.
at(5) = dSmatLayerIP.
at(1,point+1);
2843 Sold.
at(4) = dSmatLayerIP.
at(2,point+1);
2844 Sold.
at(3) = dSmatLayerIP.
at(3,point+1);
2846 Sold.
at(8) = Sold.
at(5);
2847 Sold.
at(7) = Sold.
at(4);
2863 int numThicknessIP = this->
layeredCS->giveNumIntegrationPointsInLayer();
2866 for (
int i = 0; i < numThicknessIP; i++ ) {
2872 GaussPoint *gp = iRuleL->getIntegrationPoint(point);
2884 Sold.
at(5) = dSmatLayerIP.
at(1,point+1);
2885 Sold.
at(4) = dSmatLayerIP.
at(2,point+1);
2887 Sold.
at(8) = Sold.
at(5);
2888 Sold.
at(7) = Sold.
at(4);
2903 int numThicknessIP = this->
layeredCS->giveNumIntegrationPointsInLayer();
2906 for (
int i = 0; i < numThicknessIP; i++ ) {
2908 dSzzMatLayerIP.
at(1,point+1) += SzzMatOld.
at(j+1);
2911 GaussPoint *gp = iRuleL->getIntegrationPoint(point);
2915 Sold.
at(3) = dSzzMatLayerIP.
at(1,point+1);
2939 answer = {0,1,0,0, 0,coords.
at(3),coords.
at(2),2.0*coords.
at(1), 0,
2940 0,0,1,0,coords.
at(3), 0,coords.
at(1), 0,2.0*coords.
at(2)};
2968 answer = {0,coords.
at(3),0,0,0,0.5*coords.
at(3)*coords.
at(3),coords.
at(2)*coords.
at(3),2.0*coords.
at(1)*coords.
at(3),0,coords.
at(1)*coords.
at(3)*coords.
at(3),0,
2969 0,0,coords.
at(3),0,0.5*coords.
at(3)*coords.
at(3),0,coords.
at(1)*coords.
at(3),0,2.0*coords.
at(2)*coords.
at(3),0,coords.
at(2)*coords.
at(3)*coords.
at(3)};
2999 answer = {0,0,0,0,0,0,0,coords.
at(3)*coords.
at(3),0,(1.0/3.0)*coords.
at(3)*coords.
at(3)*coords.
at(3),0,
3000 0,0,0,0,0,0,0.5*coords.
at(3)*coords.
at(3),0,0,0,0,
3001 0,0,0,0,0,0,0,0,coords.
at(3)*coords.
at(3),0,(1.0/3.0)*coords.
at(3)*coords.
at(3)*coords.
at(3)};
3017Shell7Base :: computeBmatrixForStressRecAt(
FloatArray &lcoords,
FloatMatrix &answer,
int layer,
bool intSzz)
3029 const int numNodes = this->interpolationForExport.giveNumberOfNodes();
3030 std::vector<FloatArray> nodes;
3031 giveFictiousNodeCoordsForExport(nodes, layer);
3042 int ndofs = numNodes*3;
3044 for (
int i = 1, j = 0; i <= numNodes; i++, j += 3 ) {
3045 answer.
at(1, j + 1) = dNdx.
at(i, 1);
3046 answer.
at(1, j + 3) = dNdx.
at(i, 2);
3047 answer.
at(2, j + 2) = dNdx.
at(i, 2);
3048 answer.
at(2, j + 3) = dNdx.
at(i, 1);
3051 int ndofs = numNodes*2;
3053 for (
int i = 1, j = 0; i <= numNodes; i++, j += 2 ) {
3054 answer.
at(1, j + 1) = dNdx.
at(i, 1);
3055 answer.
at(1, j + 2) = dNdx.
at(i, 2);
3065std::vector<FloatArray>
3066Shell7Base :: giveFictiousNodeCoordsForExport(
int layer)
3083std::vector<FloatArray>
3084Shell7Base :: giveFictiousCZNodeCoordsForExport(
int interface)
3095 localCoords.
at(3) = 1.0;
3101std::vector<FloatArray>
3102Shell7Base :: giveFictiousUpdatedNodeCoordsForExport(
int layer,
TimeStep *tStep)
3129 answer.
at(1) = V6.
at(1);
3130 answer.
at(2) = V6.
at(2);
3131 answer.
at(3) = V6.
at(3);
3132 answer.
at(4) = answer.
at(7) = V6.
at(4);
3133 answer.
at(5) = answer.
at(8) = V6.
at(5);
3134 answer.
at(6) = answer.
at(9) = V6.
at(6);
3140Shell7Base :: computeInterLaminarStressesAt(
int interfaceNum,
TimeStep *tStep, std::vector < FloatArray > &interLamStresses)
3152 interLamStresses.resize(numInterfaceIP);
3153 FloatArray vSLower, vSUpper, nCov, vSMean(6), stressVec;
3156 for (
int i = 1; i <= numInterfaceIP; i++ ) {
3158 this->
giveIPValue(vSUpper, ip, IST_CauchyStressTensor, tStep);
3160 this->
giveIPValue(vSLower, ip, IST_CauchyStressTensor, tStep);
3163 vSMean = 0.5 * ( vSUpper + vSLower );
3166 interLamStresses.at(i-1).resize( stressVec.
giveSize() );
3167 interLamStresses.at(i-1) = stressVec;
void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode) override
int giveApproxOrder() override=0
CoordSystType giveCoordSystMode() override
void giveElementNeighbourList(IntArray &answer, const IntArray &elemList)
ConnectivityTable * giveConnectivityTable()
Element * giveElement(int n)
int giveGlobalNumber() const
Node * giveNode(int i) const
IntArray boundaryLoadArray
virtual FEInterpolation * giveInterpolation() const
const IntArray & giveDofManArray() const
virtual IntegrationRule * giveIntegrationRule(int i)
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
virtual int giveNumberOfDofManagers() const
CrossSection * giveCrossSection()
void printOutputAt(FILE *file, TimeStep *tStep) override
void computeBoundaryVectorOf(const IntArray &bNodes, const IntArray &dofIDMask, ValueModeType u, TimeStep *tStep, FloatArray &answer, bool padding=false)
virtual Element_Geometry_Type giveGeometryType() const =0
Stores all neccessary data (of a region) in a VTKPiece so it can be exported later.
void setCellVar(InternalStateType type, int cellNum, FloatArray valueArray)
void setInternalVarInNode(InternalStateType type, int nodeNum, FloatArray valueArray)
void setCellType(int cellNum, int type)
void setNumberOfCellVarsToExport(const IntArray &cellVars, int numCells)
void setNumberOfInternalVarsToExport(const IntArray &ists, int numNodes)
void setNumberOfPrimaryVarsToExport(const IntArray &primVars, int numNodes)
void setConnectivity(int cellNum, IntArray &nodes)
void setPrimaryVarInNode(UnknownType type, int nodeNum, FloatArray valueArray)
void setOffset(int cellNum, int offset)
void setNumberOfCells(int numCells)
void setNodeCoords(int nodeNum, const FloatArray &coords)
void setNumberOfNodes(int numNodes)
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
int number
Component number.
FailureModuleElementInterface()
double & at(std::size_t i)
void beSymVectorForm(const FloatMatrix &aMatrix)
void assemble(const FloatArray &fe, const IntArray &loc)
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
double dotProduct(const FloatArray &x) const
Index giveSize() const
Returns the size of receiver.
void beColumnOf(const FloatMatrix &mat, int col)
virtual void printYourself() const
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void add(const FloatArray &src)
void subtract(const FloatArray &src)
void beSubArrayOf(const FloatArray &src, const IntArray &indx)
void setColumn(const FloatArrayF< N > &src, std::size_t c)
double at(std::size_t i, std::size_t j) const
void addSubVectorRow(const FloatArray &src, int sr, int sc)
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
void add(const FloatMatrix &a)
void resize(Index rows, Index cols)
*Sets size of receiver to be an empty matrix It will have zero rows and zero columns size void clear()
void beSubMatrixOf(const FloatMatrix &src, Index topRow, Index bottomRow, Index topCol, Index bottomCol)
void beProductTOf(const FloatMatrix &a, const FloatMatrix &b)
int giveNumberOfColumns() const
Returns number of columns of receiver.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
void plusDyadUnsym(const FloatArray &a, const FloatArray &b, double dV)
void setSubMatrix(const FloatMatrix &src, int sr, int sc)
void addSubVectorCol(const FloatArray &src, int sr, int sc)
void beTranspositionOf(const FloatMatrix &src)
void zero()
Zeroes all coefficient of receiver.
void beMatrixFormOfStress(const FloatArray &aArray)
bool beInverseOf(const FloatMatrix &src)
*Prints matrix to stdout Useful for debugging void printYourself() const
void plusDyadSymmUpper(const FloatArray &a, double dV)
int giveNumberOfRows() const
Returns number of rows of receiver.
void assemble(const FloatMatrix &src, const IntArray &loc)
double at(std::size_t i, std::size_t j) const
void subtract(const FloatMatrix &a)
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
int SetUpPointsOnLine(int nPoints, MaterialMode mode) override
int SetUpPointsOnWedge(int nPointsTri, int nPointsDepth, MaterialMode mode) override
double giveNaturalCoordinate(int i) const
Returns i-th natural element coordinate of receiver.
const FloatArray & giveGlobalCoordinates()
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
IntegrationPointStatus * giveMaterialStatus(IntegrationPointStatusIDType key=IPSID_Default)
double giveWeight()
Returns integration weight of receiver.
GaussPoint * getIntegrationPoint(int n)
LayeredCrossSectionInterface()
IntArray upperInterfacePoints
IntArray lowerInterfacePoints
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)=0
virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
virtual double give(int aProperty, GaussPoint *gp) const
NLStructuralElement(int n, Domain *d)
int nlGeometry
Flag indicating if geometrical nonlinearities apply.
NodalAveragingRecoveryModelInterface()
Constructor.
FloatArray initialSolutionVector
FloatMatrixF< 3, 3 > computeStressMatrix(FloatArray &genEps, GaussPoint *gp, Material *mat, TimeStep *tStep)
void giveLayerContributionToSR(FloatMatrix &dSmat, FloatMatrix &dSmatLayerIP, int layer, double zeroThicknessLevel, TimeStep *tStep)
virtual double edgeComputeLengthAround(GaussPoint *gp, const int iedge)
FloatMatrixF< 3, 7 > computeLambdaNMatrix(FloatArray &genEps, double zeta)
void computePressureForceAt(GaussPoint *gp, FloatArray &answer, const int iSurf, FloatArray genEps, BoundaryLoad *surfLoad, TimeStep *tStep, ValueModeType mode)
FloatArrayF< 3 > & giveInitialNodeDirector(int i)
void NodalRecoveryMI_computeNValProduct(FloatMatrix &answer, int layer, InternalStateType type, TimeStep *tStep)
static FEI3dWedgeQuad interpolationForExport
std::array< FloatMatrixF< 3, 18 >, 3 > computeLambdaGMatrices(FloatArray &genEps, double zeta)
virtual void giveShellExportData(ExportRegion &vtkPiece, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep)
virtual FloatMatrixF< 3, 3 > evalCovarBaseVectorsAt(const FloatArrayF< 3 > &lCoords, FloatArray &genEps, TimeStep *tStep)
virtual double giveGlobalZcoord(const FloatArrayF< 3 > &lCoords)
FloatArray & giveInitialSolutionVector()
void giveTractionBC(FloatMatrix &tractionTop, FloatMatrix &tractionBtm, TimeStep *tStep)
static void giveGeneralizedStrainComponents(FloatArray genEps, FloatArrayF< 3 > &dphidxi1, FloatArrayF< 3 > &dphidxi2, FloatArrayF< 3 > &dmdxi1, FloatArrayF< 3 > &dmdxi2, FloatArrayF< 3 > &m, double &dgamdxi1, double &dgamdxi2, double &gam)
virtual FloatArrayF< 3 > vtkEvalUpdatedGlobalCoordinateAt(const FloatArrayF< 3 > &localCoords, int layer, TimeStep *tStep)
Shell7Base(int n, Domain *d)
virtual void recoverShearStress(TimeStep *tStep)
void NodalRecoveryMI_recoverValues(std::vector< FloatArray > &recoveredValues, int layer, InternalStateType type, TimeStep *tStep)
virtual double computeVolumeAroundLayer(GaussPoint *mastergp, int layer)=0
std::vector< std::vector< int > > voigtIndices
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
virtual void edgeGiveUpdatedSolutionVector(FloatArray &answer, const int iedge, TimeStep *tStep)
static ParamKey IPK_Shell7Base_recoverStress
virtual void setupInitialNodeDirectors()
virtual double giveGlobalZcoordInLayer(double xi, int layer)
virtual FloatArrayF< 3 > vtkEvalInitialGlobalCoordinateAt(const FloatArrayF< 3 > &localCoords, int layer)
void computeThicknessMappingCoeff(GaussPoint *gp, FloatArray &answer)
void giveSPRcontribution(FloatMatrix &eltIPvalues, FloatMatrix &eltPolynomialValues, int layer, InternalStateType type, TimeStep *tStep)
void recoverValuesFromIP(std::vector< FloatArray > &nodes, int layer, InternalStateType type, TimeStep *tStep, stressRecoveryType SRtype=copyIPvalue)
virtual const IntArray & giveOrderingNodes() const =0
void computePressureTangentMatrix(FloatMatrix &answer, Load *load, const int iSurf, TimeStep *tStep)
FloatMatrixF< 3, 3 > evalInitialCovarBaseVectorsAt(const FloatArrayF< 3 > &lCoords)
void nodalLeastSquareFitFromIP(std::vector< FloatArray > &recoveredValues, int layer, InternalStateType type, TimeStep *tStep)
FloatMatrixF< 3, 3 > evalInitialContravarBaseVectorsAt(const FloatArrayF< 3 > &lCoords)
FloatArray & giveInitialEdgeSolutionVector(int i)
virtual void computeBulkTangentMatrix(FloatMatrix &answer, FloatArray &solVec, TimeStep *tStep)
virtual void computeTractionForce(FloatArray &answer, const int iedge, BoundaryLoad *edgeLoad, TimeStep *tStep, ValueModeType mode, bool map2elementDOFs=false)
void computeSectionalForces(FloatArray &answer, TimeStep *tStep, FloatArray &solVec, int useUpdatedGpRecord=0)
void setupInitialEdgeSolutionVector()
void CopyIPvaluesToNodes(std::vector< FloatArray > &recoveredValues, int layer, InternalStateType type, TimeStep *tStep)
LayeredCrossSection * layeredCS
FloatMatrixF< 3, 3 > computeFAt(const FloatArrayF< 3 > &lCoords, FloatArray &genEps, TimeStep *tStep)
static FloatArrayF< 9 > convV6ToV9Stress(const FloatArrayF< 6 > &V6)
virtual void edgeComputeBmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, int li=1, int ui=ALL_STRAINS)
virtual FloatArrayF< 3 > evalInitialCovarNormalAt(const FloatArrayF< 3 > &lCoords)
virtual int giveNumberOfEdgeDofs()=0
void computeSectionalForcesAt(FloatArray §ionalForces, IntegrationPoint *ip, Material *mat, TimeStep *tStep, FloatArray &genEpsC, double zeta)
void updateLayerTransvStressesSR(FloatMatrix &dSmatLayerIP, int layer)
static FloatMatrixF< 3, 3 > giveDualBase(FloatMatrixF< 3, 3 > &base1)
void updateLayerTransvShearStressesSR(FloatMatrix &dSmatLayerIP, FloatMatrix &SmatOld, int layer)
virtual double computeAreaAround(GaussPoint *gp, double xi)=0
int computeNumberOfDofs() override
void giveEdgeDofMapping(IntArray &answer, int iEdge) const override=0
virtual void giveMassFactorsAt(GaussPoint *gp, FloatArray &answer, double &gam)
void giveDofManDofIDMask(int inode, IntArray &) const override
virtual void computeCauchyStressVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
void printOutputAt(FILE *file, TimeStep *tStep) override
FloatMatrixF< 3, 3 > edgeEvalCovarBaseVectorsAt(const FloatArrayF< 3 > &lCoords, const int iedge, TimeStep *tStep)
void computeNmatrixAt(const FloatArray &iLocCoords, FloatMatrix &answer) override
FloatMatrixF< 3, 3 > giveAxialMatrix(const FloatArrayF< 3 > &vec)
virtual const IntArray & giveOrderingDofTypes() const =0
std::vector< FloatArray > initialEdgeSolutionVectors
void giveUpdatedSolutionVector(FloatArray &answer, TimeStep *tStep)
void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int li=1, int ui=ALL_STRAINS) override
FloatArrayF< 3 > evalInitialDirectorAt(const FloatArrayF< 3 > &lCoords)
void temp_computeBoundaryVectorOf(IntArray &dofIdArray, int boundary, ValueModeType u, TimeStep *tStep, FloatArray &answer)
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)
void giveZ2integratedPolynomial2GradientForStressRecAt(FloatArray &answer, FloatArray &coords)
int giveSymVoigtIndex(int ind1, int ind2)
virtual int giveNumberOfEdgeDofManagers()=0
void giveUnknownsAt(const FloatArrayF< 3 > &lcoords, const FloatArray &solVec, FloatArrayF< 3 > &x, FloatArrayF< 3 > &m, double &gam, TimeStep *tStep)
void ZZNodalRecoveryMI_ComputeEstimatedInterpolationMtrx(FloatArray &answer, GaussPoint *gp, InternalStateType type)
std::vector< FloatArray > giveFictiousUpdatedNodeCoordsForExport(int layer, TimeStep *tStep)
virtual const IntArray & giveOrderingEdgeNodes() const =0
void updateLayerTransvNormalStressSR(FloatMatrix &dSzzMatLayerIP, FloatArray &SzzMatOld, int layer)
void giveZintegratedPolynomialGradientForStressRecAt(FloatArray &answer, FloatArray &coords)
static FEI3dTrQuad interpolationForCZExport
std::vector< FloatArray > giveFictiousNodeCoordsForExport(int layer)
virtual void edgeComputeNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer)
FloatArrayF< 3 > edgeEvalInitialDirectorAt(const FloatArrayF< 1 > &lCoords, const int iEdge)
void setupInitialSolutionVector()
std::vector< FloatArrayF< 3 > > initialNodeDirectors
void NodalRecoveryMI_computeNNMatrix(FloatArray &answer, int layer, InternalStateType type)
std::pair< FloatArrayF< 3 >, FloatArrayF< 3 > > edgeEvalInitialCovarBaseVectorsAt(const FloatArrayF< 1 > &lCoords, const int iedge)
int giveVoigtIndex(int ind1, int ind2)
void letStressVectorBe(const FloatArray &v)
Assigns stressVector to given vector v.
const FloatArray & giveStressVector() const
Returns the const pointer to receiver's stress vector.
virtual FloatMatrixF< 9, 9 > give3dMaterialStiffnessMatrix_dPdF(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
static void computeIPAverage(FloatArray &answer, IntegrationRule *iRule, Element *elem, InternalStateType isType, TimeStep *tStep)
VTKXMLExportModuleElementInterface()
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
double norm(const FloatArray &x)
FloatMatrixF< N, P > Tdot(const FloatMatrixF< M, N > &a, const FloatMatrixF< M, P > &b)
Computes .
GaussPoint IntegrationPoint
FloatMatrixF< 3, 3 > from_voigt_form_9(const FloatArrayF< 9 > &v)
FloatMatrixF< N, P > dotT(const FloatMatrixF< N, M > &a, const FloatMatrixF< P, M > &b)
Computes .
double det(const FloatMatrixF< 2, 2 > &mat)
Computes the determinant.
InternalStateValueType
Determines the type of internal variable.
@ ISVT_TENSOR_S3
Symmetric 3x3 tensor.
FloatArrayF< 9 > to_voigt_form_33(const FloatMatrixF< 3, 3 > &t)
FloatArrayF< 3 > cross(const FloatArrayF< 3 > &x, const FloatArrayF< 3 > &y)
Computes $ x \cross y $.
double sum(const FloatArray &x)
double dot(const FloatArray &x, const FloatArray &y)
FloatMatrixF< N, N > inv(const FloatMatrixF< N, N > &mat, double zeropiv=1e-24)
Computes the inverse.
@ ZZNodalRecoveryModelInterfaceType
@ LayeredCrossSectionInterfaceType
@ VTKXMLExportModuleElementInterfaceType
@ NodalAveragingRecoveryModelInterfaceType
@ FailureModuleElementInterfaceType
InternalStateValueType giveInternalStateValueType(InternalStateType type)
FloatArrayF< N > normalize(const FloatArrayF< N > &x)
Normalizes vector (L2 norm).
FloatArrayF< N > zeros()
For more readable code.
double distance(const FloatArray &x, const FloatArray &y)
#define PM_UPDATE_PARAMETER(_val, _pm, _ir, _componentnum, _paramkey, _prio)