| 372 | } |
| 373 | |
| 374 | int OPS_Fiber() |
| 375 | { |
| 376 | // create fiber |
| 377 | |
| 378 | Fiber* theFiber = 0; |
| 379 | |
| 380 | if (theActiveFiberSection2d != 0 || theActiveFiberSection2dThermal!=0) { |
| 381 | |
| 382 | theFiber = (UniaxialFiber2d*) OPS_UniaxialFiber2d(); |
| 383 | |
| 384 | } else if (theActiveFiberSection3d != 0 || theActiveFiberSectionWarping3d != 0 || theActiveFiberSectionAsym3d != 0 || theActiveFiberSection3dThermal!=0) { |
| 385 | |
| 386 | theFiber = (UniaxialFiber3d*) OPS_UniaxialFiber3d(); |
| 387 | |
| 388 | } else if (theActiveNDFiberSection2d != 0 || theActiveNDFiberSectionWarping2d != 0) { |
| 389 | |
| 390 | theFiber = (NDFiber2d*) OPS_NDFiber2d(); |
| 391 | |
| 392 | } else if (theActiveNDFiberSection3d != 0) { |
| 393 | |
| 394 | theFiber = (NDFiber3d*) OPS_NDFiber3d(); |
| 395 | |
| 396 | } |
| 397 | |
| 398 | if (theFiber == 0) { |
| 399 | |
| 400 | opserr<<"WARNING failed to create fiber\n"; |
| 401 | return -1; |
| 402 | |
| 403 | } |
| 404 | |
| 405 | // add fiber to section |
| 406 | int res = 0; |
| 407 | if (theActiveFiberSection2d != 0) { |
| 408 | |
| 409 | res = theActiveFiberSection2d->addFiber(*theFiber); |
| 410 | |
| 411 | } else if (theActiveFiberSection3d != 0) { |
| 412 | |
| 413 | res = theActiveFiberSection3d->addFiber(*theFiber); |
| 414 | |
| 415 | } else if (theActiveFiberSectionWarping3d != 0) { |
| 416 | |
| 417 | res = theActiveFiberSectionWarping3d->addFiber(*theFiber); |
| 418 | |
| 419 | } else if (theActiveFiberSectionAsym3d != 0) { |
| 420 | |
| 421 | res = theActiveFiberSectionAsym3d->addFiber(*theFiber); |
| 422 | |
| 423 | } else if (theActiveNDFiberSection2d != 0) { |
| 424 | |
| 425 | res = theActiveNDFiberSection2d->addFiber(*theFiber); |
| 426 | |
| 427 | } else if (theActiveNDFiberSection3d != 0) { |
| 428 | |
| 429 | res = theActiveNDFiberSection3d->addFiber(*theFiber); |
| 430 | |
| 431 | } else if (theActiveNDFiberSectionWarping2d != 0) { |
no test coverage detected