@@ -158,6 +158,9 @@ namespace {
158158 } else if (numData >= 8 ) {
159159 theSec = OPS_ElasticShearSection3d ();
160160 }
161+ } else {
162+ opserr << " ElasticSection not currently compatible with ndm = " << ndm << endln;
163+ return 0 ;
161164 }
162165
163166 return theSec;
@@ -174,6 +177,9 @@ namespace {
174177 } else if (ndm == 3 ) {
175178 theSec = OPS_FiberSection3d ();
176179 theActiveFiberSection3d = (FiberSection3d*)theSec;
180+ } else {
181+ opserr << " FiberSection not currently compatible with ndm = " << ndm << endln;
182+ return 0 ;
177183 }
178184
179185 return theSec;
@@ -184,12 +190,12 @@ namespace {
184190 void * theSec = 0 ;
185191 int ndm = OPS_GetNDM ();
186192 int ndf = OPS_GetNDF ();
187- if (ndm == 2 ) {
188- // theSec = OPS_FiberSectionWarping2d();
189- // theActiveFiberSectionWarping2d = (FiberSectionWarping2d*)theSec;
190- } else if (ndm == 3 ) {
193+ if (ndm == 3 ) {
191194 theSec = OPS_FiberSectionWarping3d ();
192195 theActiveFiberSectionWarping3d = (FiberSectionWarping3d*)theSec;
196+ } else {
197+ opserr << " FiberSectionWarping not currently compatible with ndm = " << ndm << endln;
198+ return 0 ;
193199 }
194200
195201 return theSec;
@@ -200,13 +206,12 @@ namespace {
200206 void * theSec = 0 ;
201207 int ndm = OPS_GetNDM ();
202208 int ndf = OPS_GetNDF ();
203- if (ndm == 2 ) {
204- // theSec = OPS_FiberSectionAsym2d();
205- // theActiveFiberSectionAsym2d = (FiberSectionAsym2d*)theSec;
206- }
207- else if (ndm == 3 ) {
209+ if (ndm == 3 ) {
208210 theSec = OPS_FiberSectionAsym3d ();
209211 theActiveFiberSectionAsym3d = (FiberSectionAsym3d*)theSec;
212+ } else {
213+ opserr << " FiberSectionAsym not currently compatible with ndm = " << ndm << endln;
214+ return 0 ;
210215 }
211216
212217 return theSec;
@@ -222,6 +227,9 @@ namespace {
222227 } else if (ndm == 3 ) {
223228 theSec = OPS_FiberSection3dThermal ();
224229 theActiveFiberSection3dThermal = (FiberSection3dThermal*)theSec;
230+ } else {
231+ opserr << " FiberSectionThermal not currently compatible with ndm = " << ndm << endln;
232+ return 0 ;
225233 }
226234
227235 return theSec;
@@ -237,6 +245,9 @@ namespace {
237245 } else if (ndm == 3 ) {
238246 theSec = OPS_NDFiberSection3d ();
239247 theActiveNDFiberSection3d = (NDFiberSection3d*)theSec;
248+ } else {
249+ opserr << " NDFiberSection not currently compatible with ndm = " << ndm << endln;
250+ return 0 ;
240251 }
241252
242253 return theSec;
@@ -249,9 +260,9 @@ namespace {
249260 if (ndm == 2 ) {
250261 theSec = OPS_NDFiberSectionWarping2d ();
251262 theActiveNDFiberSectionWarping2d = (NDFiberSectionWarping2d*)theSec;
252- } else if (ndm == 3 ) {
253- // theSec = OPS_NDFiberSection3d() ;
254- // theActiveNDFiberSection3d = (NDFiberSection3d*)theSec ;
263+ } else {
264+ opserr << " NDFiberSectionWarping not currently compatible with ndm = " << ndm << endln ;
265+ return 0 ;
255266 }
256267
257268 return theSec;
0 commit comments