Question about new recorder

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
buddhasarah
Posts: 93
Joined: Thu Feb 12, 2009 8:31 pm
Location: The University of Tokyo

Question about new recorder

Post by buddhasarah »

Hello, I made a new element and I tried to make a new recorder to record something that cannot be done by the exsiting recorders.
I browse the OpenSees developer folder and found SumElementForcesRecorder.cpp which is a demonstration of new recorder. The essential part of the recorder seems to be "const Vector &force = theElements[0]->getResistingForce();" which gets resisting force vectors which corresponds to the number of DOFs. However in my case, I have many internal elements which are far more than the DOFs. So I tried to make a new public method which is able to obtain forces of every internal elements and I tried "const Vector &force = theElements[0]->getInternalNodalForce();"
##################################################
class MyElement : public Element
{
public:
const Vector &getInternalNodalForce(void);
...........
}
##################################################


######### And I add it to the Element.h too #########################################
class Element : public DomainComponent
{
public:
...............
virtual const Vector &getInternalNodalForce(void) =0;
..................
}
##################################################

It was successfulled compiled but "getInternalNodalForce()" cannot be invoked in "const Vector &force = theElements[0]->getInternalNodalForce();"

Can you tell me how I can make it work?
THANK YOU VERY MUCH in advance!
Post Reply