Need Help again

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

Moderators: silvia, selimgunay, Moderators

Post Reply
zhan
Posts: 11
Joined: Fri Nov 21, 2008 4:25 pm
Location: UCLA

Need Help again

Post by zhan »

Hello everyone,

I got a question about Opensees framework.

when I define my parameters for my own object,
how do I output my defined parameter :?:

It is easy in Matlab. I just need to declare a global variable.
But I don't know how to realize it in Opensees.
:?
For example:
I have a variable fp (it's a vector length 2) defined for the object.
Then in my file MyObject.cpp, I have everything declared and the following:

const Vector&
MyObject::getfpvector(void)
{
x...........x // all the code to calculate vector fp

return fp;
}

My object in each loop gives a 1x2 vector;
After all the analysis, I expect to have a matrix of fp nx2.

Then, what I need to do if I want to output fp to a file in TCLeditor?
what do I need to record?

Hope my question make sense.
Thank you!
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

if this is stuff from an element or a material use recorders and the setResponse/getResponse methods to identify th data and then return it.

if this is something else you could place some code in the destructor for you object to open a file and write all the data to it.
Post Reply