4.8.3.9. GET_FFLEX_BODYSEQID
GET_FFLEX_BODYSEQID subroutine returns FFlex body Sequence Id defined in RecurDyn/Solver. This is an auxiliary subroutine for Nodal_Force and Nodal_Force_Ext.
Language type |
Subroutine |
FORTRAN |
call get_fflex_bodyseqid (BodyName,ifbody ,ErrFlg) |
C/C++ |
get_fflex_bodyseqid (BodyName,&ifbody ,&ErrFlg) |
Variable Name |
Size |
Description |
BODYNAME |
tchar[256] |
Name of FFlex body defined in RecurDyn. This name have to exactly same with the name of FFlexBody which user defined in RecurDyn/GUI. |
IFBODY |
int |
Sequential id of FFlex body defined in RecurDyn/Solver. This is a related argument with the 5th argument of Nodal_Force_Ext subroutine. |
ErrFlg |
int |
Error flag.
If the result of this argument is -1
(means TRUE in Fortran logical
value), there is no error.
The others mean that there is an error.
|
TEST_API void __cdecl nodal_force_ext
(int id, double time, double upar[], int npar, int ifbody, int nodarr[], int nonde, int jflag, int iflag, double result[])
{
using namespace rd_syscall;
// Parameter Information
// id : Nodal Force sequential identification. (Input)
// time : Simulation time of RD/Solver. (Input)
// upar : Parameters defined by user. (Input)
// npar : Number of user parameters. (Input)
// ifbody : FFLEX Body sequential ID. (Input)
// nodarr : Node sequential ID array of input node set. (Input)
// nonde : Number of node of node set. (Input)
// jflag : When RD/Solver evaluates a Jacobian, the flag is true. (Input)
// iflag : When RD/Solver initializes arrays, the flag is true. (Input)
// result : Returned nodal force vector. Acting point of the nodal force is each center of each node.
// Reference frame of each force vector must be Ground.InertiaMarker. (Output, Size : nonde * 6)
// User Statement
using namespace rd_syscall;
int errflg = 0;
int targerBodySeq = 0;
int targetNodeSeq = 0;
int targerNodeID = 62;
TCHAR targerBodyName[256];
_tcscpy(targerBodyName,_T("FFlexBody1"));
get_fflex_bodyseqid(targerBodyName,&targerBodySeq,&errflg);
get_fflex_nodeseqid(targerBodySeq,targerNodeID,&targetNodeSeq,&errflg);
for(int i=0;i<6;i++) result[i] = 0.0;
}