| 527 | } |
| 528 | |
| 529 | int |
| 530 | Mesh::newElements(const ID &elends) { |
| 531 | Domain *domain = OPS_GetDomain(); |
| 532 | if (domain == 0) { |
| 533 | opserr << "WARNING: domain is not created\n"; |
| 534 | return -1; |
| 535 | } |
| 536 | |
| 537 | // if no element, no new elements |
| 538 | if (eleType == 0) return 0; |
| 539 | if (elends.Size() < numelenodes) { |
| 540 | return 0; |
| 541 | } |
| 542 | if (numelenodes <= 0) { |
| 543 | return 0; |
| 544 | } |
| 545 | |
| 546 | // function to call |
| 547 | void *(*OPS_Func)(const ID &info) = 0; |
| 548 | switch (eleType) { |
| 549 | case ELE_TAG_ElasticBeam2d: |
| 550 | OPS_Func = OPS_ElasticBeam2d; |
| 551 | break; |
| 552 | case ELE_TAG_ElasticBeam3d: |
| 553 | OPS_Func = OPS_ElasticBeam3d; |
| 554 | break; |
| 555 | case ELE_TAG_ForceBeamColumn2d: |
| 556 | OPS_Func = OPS_ForceBeamColumn2d; |
| 557 | break; |
| 558 | case ELE_TAG_ForceBeamColumn3d: |
| 559 | OPS_Func = OPS_ForceBeamColumn3d; |
| 560 | break; |
| 561 | case ELE_TAG_DispBeamColumn2d: |
| 562 | OPS_Func = OPS_DispBeamColumn2d; |
| 563 | break; |
| 564 | case ELE_TAG_DispBeamColumn3d: |
| 565 | OPS_Func = OPS_DispBeamColumn3d; |
| 566 | break; |
| 567 | case ELE_TAG_TimoshenkoBeamColumn2d: |
| 568 | OPS_Func = OPS_TimoshenkoBeamColumn2d; |
| 569 | break; |
| 570 | case ELE_TAG_TimoshenkoBeamColumn3d: |
| 571 | OPS_Func = OPS_TimoshenkoBeamColumn3d; |
| 572 | break; |
| 573 | case ELE_TAG_PFEMElement2DBubble: |
| 574 | OPS_Func = OPS_PFEMElement2DBubble; |
| 575 | break; |
| 576 | case ELE_TAG_PFEMElement3DBubble: |
| 577 | OPS_Func = OPS_PFEMElement3DBubble; |
| 578 | break; |
| 579 | case ELE_TAG_PFEMElement2Dmini: |
| 580 | OPS_Func = OPS_PFEMElement2Dmini; |
| 581 | break; |
| 582 | case ELE_TAG_PFEMElement2DCompressible: |
| 583 | OPS_Func = OPS_PFEMElement2DCompressible; |
| 584 | break; |
| 585 | case ELE_TAG_Tri31: |
| 586 | OPS_Func = OPS_Tri31; |
no test coverage detected