| 59 | ID FiberSectionAsym3d::code(5); |
| 60 | |
| 61 | void* OPS_FiberSectionAsym3d() |
| 62 | { |
| 63 | int numData = OPS_GetNumRemainingInputArgs(); |
| 64 | if(numData < 1) { |
| 65 | opserr<<"insufficient arguments for FiberSectionAsym3d\n"; |
| 66 | return 0; |
| 67 | } |
| 68 | |
| 69 | numData = 1; |
| 70 | int tag; |
| 71 | if (OPS_GetIntInput(&numData, &tag) < 0) { |
| 72 | opserr << "FiberSectionAsym3d - unable to read tag" << endln; |
| 73 | return 0; |
| 74 | } |
| 75 | |
| 76 | numData = 2; |
| 77 | double dData[2]; |
| 78 | if (OPS_GetDoubleInput(&numData, dData) < 0) { |
| 79 | opserr << "FiberSectionAsym3d - unable to read shear center data" << endln; |
| 80 | return 0; |
| 81 | } |
| 82 | |
| 83 | double GJ = 0.0; |
| 84 | UniaxialMaterial *torsion = 0; |
| 85 | bool deleteTorsion = false; |
| 86 | while (OPS_GetNumRemainingInputArgs() > 0) { |
| 87 | const char* opt = OPS_GetString(); |
| 88 | if (strcmp(opt, "-GJ") == 0 && OPS_GetNumRemainingInputArgs() > 0) { |
| 89 | numData = 1; |
| 90 | if (OPS_GetDoubleInput(&numData, &GJ) < 0) { |
| 91 | opserr << "WARNING: failed to read GJ" << endln; |
| 92 | return 0; |
| 93 | } |
| 94 | torsion = new ElasticMaterial(0, GJ); |
| 95 | deleteTorsion = true; |
| 96 | } |
| 97 | if (strcmp(opt, "-torsion") == 0 && OPS_GetNumRemainingInputArgs() > 0) { |
| 98 | numData = 1; |
| 99 | int torsionTag; |
| 100 | if (OPS_GetIntInput(&numData, &torsionTag) < 0) { |
| 101 | opserr << "WARNING: failed to read torsion\n"; |
| 102 | return 0; |
| 103 | } |
| 104 | torsion = OPS_getUniaxialMaterial(torsionTag); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | int num = 30; |
| 109 | SectionForceDeformation* section = new FiberSectionAsym3d(tag, num, torsion, dData[0], dData[1]); |
| 110 | if (deleteTorsion) |
| 111 | delete torsion; |
| 112 | return section; |
| 113 | } |
| 114 | |
| 115 | // constructors: |
| 116 | FiberSectionAsym3d::FiberSectionAsym3d(int tag, int num, Fiber **fibers, UniaxialMaterial *torsion, double yss, double zss): |
no test coverage detected