227VTKXMLPeriodicExportModule :: initRegionNodeNumbering(
ExportRegion& vtkPiece,
231 int elementNode, node;
235 int regionDofMans = 0;
236 int regionSingleCells = 0;
244 for (
int ie = 1; ie <= elements.
giveSize(); ie++ ) {
250 for (
int ielnode = 1; ielnode <= 4; ielnode++ ) {
251 if ( loc.
at(ielnode) != 0 ) {
257 for (
int ielnode = 1; ielnode <= 2; ielnode++ ) {
258 if ( loc.
at(ielnode) != 0 ) {
266 regionG2LNodalNumbers.
resize(nnodes + extraNodes);
267 regionG2LNodalNumbers.
zero();
279 for (
int ie = 1; ie <= elements.
giveSize(); ie++ ) {
280 int ielem = elements.
at(ie);
306 for ( elementNode = 1; elementNode <=
elemNodes; elementNode++ ) {
311 if ( loc.
at(elementNode) != 0 ) {
314 regionG2LNodalNumbers.
at(nnodes + totalNodes) = 1;
316 if ( regionG2LNodalNumbers.
at(node) == 0 ) {
321 regionG2LNodalNumbers.
at(node) = 1;
324 if ( regionG2LNodalNumbers.
at(nnodes) == 0 ) {
325 regionG2LNodalNumbers.
at(nnodes) = 1;
336 for (
int j = nnodes + 1; j <= nnodes + uniqueNodes; j++ ) {
340 if ( dx < 1e-9 && dy < 1e-9 && dz < 1e-9 ) {
346 if ( repeatFlag == 0 ) {
355 if ( regionG2LNodalNumbers.
at(node) == 0 ) {
359 regionG2LNodalNumbers.
at(node) = 1;
366 if ( loc.
at(elementNode) != 0 ) {
369 regionG2LNodalNumbers.
at(nnodes + totalNodes) = 1;
371 if ( regionG2LNodalNumbers.
at(node) == 0 ) {
376 regionG2LNodalNumbers.
at(node) = 1;
379 if ( regionG2LNodalNumbers.
at(nnodes) == 0 ) {
380 regionG2LNodalNumbers.
at(nnodes) = 1;
391 for (
int j = nnodes + 1; j <= nnodes + uniqueNodes; j++ ) {
395 if ( dx < 1e-9 && dy < 1e-9 && dz < 1e-9 ) {
401 if ( repeatFlag == 0 ) {
412 if ( regionG2LNodalNumbers.
at(node) == 0 ) {
416 regionG2LNodalNumbers.
at(node) = 1;
426 regionDofMans = nnodes + uniqueNodes;
428 regionL2GNodalNumbers.
resize(regionDofMans);
433 for (
int i = 1; i <= regionDofMans; i++ ) {
434 if ( regionG2LNodalNumbers.
at(i) ) {
435 regionG2LNodalNumbers.
at(i) = currOffset++;
436 regionL2GNodalNumbers.
at(regionG2LNodalNumbers.
at(i) ) = i;
458 std::vector<int> dofIDVector;
459 dofIDVector.assign(dofIdArray.
begin(), dofIdArray.
end());
466 std::vector<int> macroTrussIDs = { E_xx };
467 std::vector<int> macroMembraneIDs = { E_xx, E_yy, E_xy, E_yx };
468 std::vector<int> macroBeamIDs = { E_xx, E_zx, K_xx };
469 std::vector<int> macroPlateIDs = { E_xx, E_yy, E_zy, E_zx, E_xy, E_yx, K_xx, K_yy, K_xy, K_yx };
470 std::vector<int> macro3DVoigtIDs = { E_xx, E_yy, E_zz, G_yz, G_xz, G_xy };
471 std::vector<int> macro3DIDs = { E_xx, E_yy, E_zz, E_yz, E_zy, E_xz, E_zx, E_xy, E_yx };
472 std::vector<int> macro2DIDs = { E_xx, E_yy, G_xy };
480 for (
int inode = 1; inode <= mapL2G.
giveSize(); inode++ ) {
481 if ( inode <= nnodes && mapL2G.
at(inode) <= nnodes && mapL2G.
at(inode) != 0 ) {
489 if ( mapL2G.
at(inode) != 0 ) {
500 if ( type == DisplacementVector ) {
501 if ( dofIDVector == macro3DIDs ) {
503 valueArray.
at(1) = helpArray.
at(1) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(1) +
504 unitCellSize.at(2) * switches.
at(2) * macroField.
at(8) + unitCellSize.at(3) * switches.
at(3) * macroField.
at(6);
505 valueArray.
at(2) = helpArray.
at(2) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(9) +
506 unitCellSize.at(2) * switches.
at(2) * macroField.
at(2) + unitCellSize.at(3) * switches.
at(3) * macroField.
at(4);
507 valueArray.
at(3) = helpArray.
at(3) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(7) +
508 unitCellSize.at(2) * switches.
at(2) * macroField.
at(5) + unitCellSize.at(3) * switches.
at(3) * macroField.
at(3);
509 }
else if ( dofIDVector == macroTrussIDs ) {
511 valueArray.
at(1) = helpArray.
at(1) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(1);
512 valueArray.
at(2) = helpArray.
at(2);
513 valueArray.
at(3) = helpArray.
at(3);
514 }
else if ( dofIDVector == macroMembraneIDs ) {
516 valueArray.
at(1) = helpArray.
at(1) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(1) +
517 unitCellSize.at(2) * switches.
at(2) * macroField.
at(3);
518 valueArray.
at(2) = helpArray.
at(2) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(4) +
519 unitCellSize.at(2) * switches.
at(2) * macroField.
at(2);
520 valueArray.
at(3) = helpArray.
at(3);
521 }
else if ( dofIDVector == macro2DIDs ) {
523 valueArray.
at(1) = helpArray.
at(1) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(1);
524 valueArray.
at(2) = helpArray.
at(2) + unitCellSize.at(2) * switches.
at(2) * macroField.
at(2) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(3);
525 valueArray.
at(3) = helpArray.
at(3);
526 }
else if ( dofIDVector == macroBeamIDs ) {
528 valueArray.
at(1) = helpArray.
at(1) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(1) -
530 valueArray.
at(2) = helpArray.
at(2);
531 valueArray.
at(3) = helpArray.
at(3) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(2);
532 }
else if ( dofIDVector == macroPlateIDs ) {
534 valueArray.
at(1) = helpArray.
at(1) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(1) +
535 unitCellSize.at(2) * switches.
at(2) * macroField.
at(5) -
538 valueArray.
at(2) = helpArray.
at(2) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(6) +
539 unitCellSize.at(2) * switches.
at(2) * macroField.
at(2) -
542 valueArray.
at(3) = helpArray.
at(3) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(4) +
543 unitCellSize.at(2) * switches.
at(2) * macroField.
at(3);
544 }
else if ( dofIDVector == macro3DVoigtIDs ) {
546 valueArray.
at(1) = helpArray.
at(1) + unitCellSize.at(1) * switches.
at(1) * macroField.
at(1) +
547 unitCellSize.at(3) * switches.
at(3) * macroField.
at(5) + unitCellSize.at(2) * switches.
at(2) * macroField.
at(6);
548 valueArray.
at(2) = helpArray.
at(2) + unitCellSize.at(2) * switches.
at(2) * macroField.
at(2) +
549 unitCellSize.at(3) * switches.
at(3) * macroField.
at(4);
550 valueArray.
at(3) = helpArray.
at(3) + unitCellSize.at(3) * switches.
at(3) * macroField.
at(3);
582 for (
int nodeNum = 1; nodeNum <= mapL2G.
giveSize(); nodeNum++ ) {
583 if ( nodeNum <= nnodes && mapL2G.
at(nodeNum) <= nnodes && mapL2G.
at(nodeNum) != 0 ) {
590 if ( mapL2G.
at(nodeNum) != 0 ) {
601 answer.
resize(ncomponents);
603 if ( isType == IST_BeamForceMomentTensor ) {
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.