Hi,
I have been working with the shear limit curve. When I execute the following lines in the checkElementState function, OpenSees crashes;
if (defType == 1) // maximum chord rotations
{
Response *theRotations =0; // integer element returns in setResponse
const char *r[1] = {"basicDeformations"}; // must be implemented in element
Vector *rotVec; //vector of chord rotations at beam-column ends
// set type of beam-column element response desired
theRotations = theElement->setResponse(r, 1, dummy);
// put element response in the vector of "myInfo"
result = theRotations->getResponse();
// access the myInfo vector containing the response (new for Version 1.2)
Information &theInfo = theRotations->getInformation();
rotVec = (theInfo.theVector);
deform = (fabs((*rotVec)(1)) > fabs((*rotVec)(2))) ?
fabs((*rotVec)(1)) : fabs((*rotVec)(2)); //use larger of two end rotations
}
To be more specific, OpenSees crashes when the following line is run;
result = theRotations->getResponse();
Does anyone have some insight into why this occurs?
-Cody
Limit Curve Functions
Moderators: silvia, selimgunay, Moderators
Re: Limit Curve Functions
I forgot to mention that the above lines are taken from the source code for the shear limit curve. ShearCurve.cpp
Re: Limit Curve Functions
if the code crashed right there it means that the pointer theRotations has either not been set correctly, not at all, or now points to something that got deleted.
given the code that preceded it, it means that the element returned nothing, i.e. 0, from the setResponse(). You are not checking for that condition in the code.
given the code that preceded it, it means that the element returned nothing, i.e. 0, from the setResponse(). You are not checking for that condition in the code.
Re: Limit Curve Functions
Thank you fmk. That was the problem.