gseidel
Mechanical
- Sep 4, 2018
- 1
Hello,
Here is my problem. I need to access nodal displacement and velocity of a specific (or some specific) node(s) during the integration process and in particular in the dload and uexternaldb subroutines.
Therefore I wrote a bunch of lines in C++ for those functions as follows:
extern "C" void dload_(...a lot of parameters...)
{
// my code
}
This is actually working when I test the function by writing some dummy values in some text files. But since U, V and A are not parameters of dload, I would like to use the utility routine getvrn_(NODE,'VAR',ARRAY,JRCD,JGVBLOCK,LTRN) and I'm currently facing two problems:
- I'm unable to pass the JGVBLOCK variable which is only available in UMESHMOTION subroutine
- I'm struggling with character arrays and the magnificent "Illegal memory access" while running the simulation.
I tested to call a basic utility routine in uexternaldb following this:
extern "C" void getnumcpus_(int* NUMPROCESSES);
extern "C" void uexternaldb_(...a lot of parameters...)
{
// some code
int *lenvar;
lenvar=new int;
getnumcpus_(lenvar);
cout << *lenvar;
// some code
}
and it works. Does anyone know how I could call GETVRN utility routine in both DLOAD and UEXTERNALDB subroutines OR maybe there is an easier way to get the iterated displacement and velocities of nodes.
Thank you in advance for you advice !
Here is my problem. I need to access nodal displacement and velocity of a specific (or some specific) node(s) during the integration process and in particular in the dload and uexternaldb subroutines.
Therefore I wrote a bunch of lines in C++ for those functions as follows:
extern "C" void dload_(...a lot of parameters...)
{
// my code
}
This is actually working when I test the function by writing some dummy values in some text files. But since U, V and A are not parameters of dload, I would like to use the utility routine getvrn_(NODE,'VAR',ARRAY,JRCD,JGVBLOCK,LTRN) and I'm currently facing two problems:
- I'm unable to pass the JGVBLOCK variable which is only available in UMESHMOTION subroutine
- I'm struggling with character arrays and the magnificent "Illegal memory access" while running the simulation.
I tested to call a basic utility routine in uexternaldb following this:
extern "C" void getnumcpus_(int* NUMPROCESSES);
extern "C" void uexternaldb_(...a lot of parameters...)
{
// some code
int *lenvar;
lenvar=new int;
getnumcpus_(lenvar);
cout << *lenvar;
// some code
}
and it works. Does anyone know how I could call GETVRN utility routine in both DLOAD and UEXTERNALDB subroutines OR maybe there is an easier way to get the iterated displacement and velocities of nodes.
Thank you in advance for you advice !