runPosIC, initializeGlobally

This commit is contained in:
Aik-Siong Koh
2023-05-27 21:43:09 -06:00
parent 6a577c052c
commit 9ddbdca742
139 changed files with 2401 additions and 431 deletions

View File

@@ -3,18 +3,12 @@
#include "SystemSolver.h"
#include "NewtonRaphson.h"
#include "PosICNewtonRaphson.h"
#include "CREATE.h"
using namespace MbD;
//class PosICNewtonRaphson;
std::shared_ptr<SystemSolver> MbD::SystemSolver::Create(System* x)
{
auto item = std::make_shared<SystemSolver>(x);
item->initialize();
return item;
}
void MbD::SystemSolver::initialize()
{
tstartPasts = std::make_shared<std::vector<double>>();
@@ -57,7 +51,7 @@ void SystemSolver::runAllIC()
void MbD::SystemSolver::runPosIC()
{
icTypeSolver = std::make_shared<PosICNewtonRaphson>();
icTypeSolver = CREATE<PosICNewtonRaphson>::With();
icTypeSolver->setSystem(this);
icTypeSolver->run();
}
@@ -95,3 +89,28 @@ void MbD::SystemSolver::partsJointsMotionsDo(const std::function<void(std::share
{
system->partsJointsMotionsDo(f);
}
void MbD::SystemSolver::logString(std::string& str)
{
system->logString(str);
}
std::shared_ptr<std::vector<std::shared_ptr<Part>>> MbD::SystemSolver::parts()
{
return std::shared_ptr<std::vector<std::shared_ptr<Part>>>();
}
std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> MbD::SystemSolver::essentialConstraints2()
{
return std::shared_ptr<std::vector<std::shared_ptr<Constraint>>>();
}
std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> MbD::SystemSolver::displacementConstraints()
{
return std::shared_ptr<std::vector<std::shared_ptr<Constraint>>>();
}
std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> MbD::SystemSolver::perpendicularConstraints2()
{
return std::shared_ptr<std::vector<std::shared_ptr<Constraint>>>();
}