You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should try to avoid states are being allocated and assigned to coupled objects, because their dynamics are solved externally. MD-F does not add coupled object states to the state list. I know the performance improvements will probably be minimal, but it would probably help. I will involve changing the loops over <object>List that involve state calculations. For example in the main Init function, change t_integrator.Add<object> to iterate over the free objects. I.e. change:
t_integrator.SetGround(GroundBody);
for (auto obj : BodyList)
t_integrator.AddBody(obj);
for (auto obj : RodList)
t_integrator.AddRod(obj);
for (auto obj : PointList)
t_integrator.AddPoint(obj);
for (auto obj : LineList)
t_integrator.AddLine(obj);
to the following (in icLegacy and icStationary in MoorDyn2.cpp):
t_integrator.SetGround(GroundBody);
for (unsigned int i : FreeBodyIs)
t_integrator.AddBody(BodyList[i]);
for (unsigned int i : FreeRodIs)
t_integrator.AddRod(RodList[i]);
for (unsigned int i : FreePointIs)
t_integrator.AddPoint(PointList[i]);
for (auto obj : LineList)
t_integrator.AddLine(obj);
Activity