| 2673 | } |
| 2674 | |
| 2675 | int OPS_sectionDeformation() |
| 2676 | { |
| 2677 | // make sure at least one other argument to contain type of system |
| 2678 | if (OPS_GetNumRemainingInputArgs() < 2) { |
| 2679 | opserr << "WARNING want - sectionDeformation eleTag? secNum? <dof?> \n"; |
| 2680 | return -1; |
| 2681 | } |
| 2682 | |
| 2683 | //opserr << "sectionDeformation: "; |
| 2684 | //for (int i = 0; i < argc; i++) |
| 2685 | // opserr << argv[i] << ' ' ; |
| 2686 | //opserr << endln; |
| 2687 | |
| 2688 | int numdata = 2; |
| 2689 | int data[3]; |
| 2690 | |
| 2691 | if (OPS_GetIntInput(&numdata, data) < 0) { |
| 2692 | opserr << "WARNING sectionDeformation eleTag? secNum? <dof?> - could not read int input? \n"; |
| 2693 | return -1; |
| 2694 | } |
| 2695 | |
| 2696 | int tag = data[0]; |
| 2697 | int secNum = data[1]; |
| 2698 | int dof = -1; |
| 2699 | |
| 2700 | Domain* theDomain = OPS_GetDomain(); |
| 2701 | if (theDomain == 0) return -1; |
| 2702 | |
| 2703 | Element *theElement = theDomain->getElement(tag); |
| 2704 | if (theElement == 0) { |
| 2705 | opserr << "WARNING sectionDeformation element with tag " << tag << " not found in domain \n"; |
| 2706 | return -1; |
| 2707 | } |
| 2708 | |
| 2709 | int argcc = 3; |
| 2710 | char a[80] = "section"; |
| 2711 | char b[80]; |
| 2712 | sprintf(b, "%d", secNum); |
| 2713 | char c[80] = "deformation"; |
| 2714 | const char *argvv[3]; |
| 2715 | argvv[0] = a; |
| 2716 | argvv[1] = b; |
| 2717 | argvv[2] = c; |
| 2718 | |
| 2719 | DummyStream dummy; |
| 2720 | |
| 2721 | Response *theResponse = theElement->setResponse(argvv, argcc, dummy); |
| 2722 | if (theResponse == 0) { |
| 2723 | return 0; |
| 2724 | } |
| 2725 | |
| 2726 | theResponse->getResponse(); |
| 2727 | Information &info = theResponse->getInformation(); |
| 2728 | const Vector &theVec = *(info.theVector); |
| 2729 | |
| 2730 | if (OPS_GetNumRemainingInputArgs() > 0) { |
| 2731 | numdata = 1; |
| 2732 | if (OPS_GetIntInput(&numdata, &dof) < 0) { |
no test coverage detected