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

Function OPS_sectionDeformation

SRC/interpreter/OpenSeesOutputCommands.cpp:2675–2767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2673}
2674
2675int 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) {

Callers 2

Calls 9

push_backMethod · 0.80
OPS_GetIntInputFunction · 0.70
OPS_GetDomainFunction · 0.70
OPS_SetDoubleOutputFunction · 0.70
getElementMethod · 0.45
setResponseMethod · 0.45
getResponseMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected