Solve dragging (#47)

runPreDrag, runDragStep, runPostDrag, PosICDragNewtonRaphson
This commit is contained in:
aiksiongkoh
2024-01-11 06:28:38 -07:00
committed by GitHub
parent 737152273e
commit fe99ad2593
29 changed files with 4204 additions and 107 deletions

View File

@@ -28,6 +28,7 @@
#include "AccKineNewtonRaphson.h"
#include "VelICKineSolver.h"
#include "AccICKineNewtonRaphson.h"
#include "PosICDragNewtonRaphson.h"
using namespace MbD;
@@ -164,6 +165,18 @@ void SystemSolver::runBasicKinematic()
}
}
void SystemSolver::runPreDrag()
{
initializeLocally();
initializeGlobally();
runPosIC();
}
void MbD::SystemSolver::runDragStep(std::shared_ptr<std::vector<std::shared_ptr<Part>>> dragParts)
{
runPosICDrag(dragParts);
}
void SystemSolver::runQuasiKinematic()
{
try {
@@ -197,6 +210,15 @@ void SystemSolver::runAccKine()
icTypeSolver->run();
}
void MbD::SystemSolver::runPosICDrag(std::shared_ptr<std::vector<std::shared_ptr<Part>>> dragParts)
{
auto newtonRaphson = PosICDragNewtonRaphson::With();
newtonRaphson->setdragParts(dragParts);
icTypeSolver = newtonRaphson;
icTypeSolver->setSystem(this);
icTypeSolver->run();
}
void SystemSolver::runPosICKine()
{
icTypeSolver = CREATE<PosICKineNewtonRaphson>::With();