build the section
| 1638 | |
| 1639 | // build the section |
| 1640 | int |
| 1641 | buildSection(Tcl_Interp *interp, TclModelBuilder *theTclModelBuilder, |
| 1642 | int secTag, UniaxialMaterial &theTorsion) |
| 1643 | { |
| 1644 | SectionRepres *sectionRepres = theTclModelBuilder->getSectionRepres(secTag); |
| 1645 | if (sectionRepres == 0) |
| 1646 | { |
| 1647 | opserr << "WARNING cannot retrieve section\n"; |
| 1648 | return TCL_ERROR; |
| 1649 | } |
| 1650 | |
| 1651 | if (sectionRepres->getType() == SEC_TAG_FiberSection) |
| 1652 | { |
| 1653 | // build the section |
| 1654 | |
| 1655 | FiberSectionRepr *fiberSectionRepr = (FiberSectionRepr *) sectionRepres; |
| 1656 | |
| 1657 | int i, j, k; |
| 1658 | int numFibers; |
| 1659 | |
| 1660 | int numPatches; |
| 1661 | Patch **patch; |
| 1662 | |
| 1663 | int numReinfLayers; |
| 1664 | ReinfLayer **reinfLayer; |
| 1665 | |
| 1666 | numPatches = fiberSectionRepr->getNumPatches(); |
| 1667 | patch = fiberSectionRepr->getPatches(); |
| 1668 | numReinfLayers = fiberSectionRepr->getNumReinfLayers(); |
| 1669 | reinfLayer = fiberSectionRepr->getReinfLayers(); |
| 1670 | |
| 1671 | int numSectionRepresFibers = fiberSectionRepr->getNumFibers(); |
| 1672 | Fiber **sectionRepresFibers = fiberSectionRepr->getFibers(); |
| 1673 | |
| 1674 | numFibers = numSectionRepresFibers; |
| 1675 | for (i = 0; i < numPatches; i++) |
| 1676 | numFibers += patch[i]->getNumCells(); |
| 1677 | |
| 1678 | for (i = 0; i < numReinfLayers; i++) |
| 1679 | numFibers += reinfLayer[i]->getNumReinfBars(); |
| 1680 | |
| 1681 | //opserr << "\nnumFibers: " << numFibers; |
| 1682 | |
| 1683 | static Vector fiberPosition(2); |
| 1684 | int matTag; |
| 1685 | |
| 1686 | ID fibersMaterial(numFibers-numSectionRepresFibers); |
| 1687 | Matrix fibersPosition(2,numFibers-numSectionRepresFibers); |
| 1688 | Vector fibersArea(numFibers-numSectionRepresFibers); |
| 1689 | |
| 1690 | int numCells; |
| 1691 | Cell **cell; |
| 1692 | |
| 1693 | k = 0; |
| 1694 | for (i = 0; i < numPatches; i++) |
| 1695 | { |
| 1696 | //opserr << "\nPatch :" << i; |
| 1697 |
no test coverage detected