Defining an engine
I have to run a rotation cum constant pressure plate over a open FacetBox filled with spheres: imitating aggregate compaction in the field. Through my literature review, I came across this code for rotation plate engine:
#include "RotationEngine
#include<
#include<
#include<
RotationEngine:
{
rotateAroundZero = false;
zeroPoint = Vector3r(0,0,0);
}
void RotationEngine:
{
DeusExMachina:
REGISTER_
REGISTER_
REGISTER_
REGISTER_
}
void RotationEngine:
{
if (!deserializing) return;
rotationAxis.
}
void RotationEngine:
{
shared_
std::vector<
std::vector<
Real dt = Omega::
// time = dt;
Quaternionr q;
q.FromAxisAngle
Vector3r ax;
Real an;
for(;ii!
{
RigidBodyParameters * rb =
static_
>physicalParame
154
if(rotateAround
rb->se3.position = q*(rb->
zeroPoint; // for RotatingBox
rb->se3.orientation = q*rb->se3.
rb->se3.
rb->se3.
rb->angularVelocity = rotationAxis*
rb->velocity = Vector3r(0,0,0);
}
}
YADE_PLUGIN();
<src: Chen, J. (2011). Discrete element method (DEM) analyses for hot-mix asphalt (HMA) mixture compaction.>
My question is, how do I use this C++ code in my python program? Do I have to copy-paste this code somewhere to be called as an engine in the main python framework?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Robert Caulk
- Solved:
- Last query:
- Last reply: