For developers writing C++, Fortran, Java, code who have questions or comments to make.
Moderators: silvia, selimgunay, Moderators
-
fabian.gerold
- Posts: 15
- Joined: Mon Aug 06, 2007 3:37 am
- Location: Bauhaus University Weimar
-
Contact:
Post
by fabian.gerold »
Hi,
I try to get the moments from ElasticBeam3d elements. I tried the following:
Code: Select all
const char* args = "globalForce";
StandardStream dummy;
Response* theResponse = m_element->setResponse( &args, 1, dummy );
Information &eleInfo = theResponse->getInformation();
const Vector &eleData = eleInfo.getData();
float my1 = eleData(4);
float my2 = eleData(10);
But I always get zero.
What am I doing wrong?
-
fabian.gerold
- Posts: 15
- Joined: Mon Aug 06, 2007 3:37 am
- Location: Bauhaus University Weimar
-
Contact:
Post
by fabian.gerold »
Sorry, that was nonsense. I thought I have to get the forces like an ElementRecorder.
But this seems to work actually:
Code: Select all
const Vector force = m_element->getResistingForce();
float mya = force(0);
float mye = force(5);