MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / OPS_FiberSectionAsym3d

Function OPS_FiberSectionAsym3d

SRC/material/section/FiberSectionAsym3d.cpp:61–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59ID FiberSectionAsym3d::code(5);
60
61void* 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:
116FiberSectionAsym3d::FiberSectionAsym3d(int tag, int num, Fiber **fibers, UniaxialMaterial *torsion, double yss, double zss):

Callers 1

OPS_FiberSectionAsymFunction · 0.85

Calls 5

OPS_GetIntInputFunction · 0.50
OPS_GetDoubleInputFunction · 0.50
OPS_GetStringFunction · 0.50
OPS_getUniaxialMaterialFunction · 0.50

Tested by

no test coverage detected