A crash occured when called "addLinearTranslationKinematic" function in coupling module using EDEM 2021.2
Hello, EDEM engineers:
When I used the coupling module to control the geometry motion, a crash occured when called "addLinearTranslationKinematic" function in coupling module using EDEM 2021.2. The code is shown as follow:
Is this a bug or this function has been deprecated in EdemCouplingClient4.lib?
Best regards.
Best Answer
-
Hi,
It works fine in my example coupling code that adds kinematics.
I would check what box.id returns by debugging.
I'm also calling mine from a csv file so I use 0/1 instead of false/true, so I'd maybe check with a 0 instead of false in case there's some strange issue there as well.
Richard
0
Answers
-
Hi,
It works fine in my example coupling code that adds kinematics.
I would check what box.id returns by debugging.
I'm also calling mine from a csv file so I use 0/1 instead of false/true, so I'd maybe check with a 0 instead of false in case there's some strange issue there as well.
Richard
0 -
Hi, Richard
Thank you for you reply.
My test files are attached. The EDEM crashed when I debugged to line 60 in the "Coupling_Module_Test.cpp".
Best regards.
Wenxuan XU
0 -
You have 12 arguments in your addKinematic() call. This function takes 20 arguments. The API/Coupling help at .../EDEM/src/Api/help/index.html shows you all the public functions and arguments.
bool addLinearRotationKinematic ( int geomId, double startTime, double endTime, double initialVelocity, double acceleration, double rotnXStart, double rotnXEnd, double rotnYStart, double rotnYEnd, double rotnZStart, double rotnZEnd, bool displayVector, bool movesWithBody = true
,bool poaAuto = true
,double poaX = 0.0
,double poaY = 0.0
,double poaZ = 0.0
,bool loop = false
,double loopInterval = 0.0
,double loopUntilTime = std::numeric_limits< double >().max()
) 0 -
Hi, Richard
I tried 12 argumentsand 20 arguments respectively, and the error still exists. Can you share your test case?
Best regards.
Wenxuan XU
0 -
I can't share my full code but the bits that are relevant are:
As I commented on a similar post yesterday the only other thing I can think of is you might be correctly building against the 2021.2 version of the coupling .lib but you are not using the correct dll at runtime. Make sure that the 2021.2 version of /lib is in your path and not an older version. My guess is you have an older version of EDEM in your path still and not 2021.2. The Altair installers no longer add this folder to the path, unfortunately.Richard
0