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

Function OPS_Fiber

SRC/interpreter/OpenSeesSectionCommands.cpp:374–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374int 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) {

Callers 2

Tcl_ops_fiberFunction · 0.85
Py_ops_fiberFunction · 0.85

Calls 5

OPS_UniaxialFiber2dFunction · 0.85
OPS_UniaxialFiber3dFunction · 0.85
OPS_NDFiber2dFunction · 0.85
OPS_NDFiber3dFunction · 0.85
addFiberMethod · 0.45

Tested by

no test coverage detected