9 #include "imstkTimeIntegrator.h" 21 NewmarkBeta(
const double dT,
const double beta = 0.25,
const double gamma = 0.5) :
TimeIntegrator(Type::NewmarkBeta, dT), m_gamma(gamma), m_beta(beta)
25 void updateStateGivenDv(std::shared_ptr<FeDeformBodyState> prevState, std::shared_ptr<FeDeformBodyState> currentState, Vectord& dV)
27 currentState->getQDot() = prevState->getQDot() + dV;
28 currentState->getQDotDot() = (currentState->getQDot() - prevState->getQDot()) / (m_gamma *
m_dT) - (1.0 / m_gamma - 1) * prevState->getQDotDot();
29 currentState->getQ() = prevState->getQ() + m_dT * currentState->getQDot() + 0.5 * m_dT * m_dT * ((1 - 2 * m_beta) * prevState->getQDotDot() + 2 * m_beta * currentState->getQDotDot());
32 void updateStateGivenDu(std::shared_ptr<FeDeformBodyState> prevState, std::shared_ptr<FeDeformBodyState> currentState, Vectord& dU)
36 void updateStateGivenV(std::shared_ptr<FeDeformBodyState> prevState, std::shared_ptr<FeDeformBodyState> currentState, Vectord& v)
38 currentState->getQDot() = v;
39 currentState->getQDotDot() = (currentState->getQDot() - prevState->getQDot()) / (m_gamma *
m_dT) - (1.0 / m_gamma - 1) * prevState->getQDotDot();
40 currentState->getQ() = prevState->getQ() + m_dT * currentState->getQDot() + 0.5 * m_dT * m_dT * ((1 - 2 * m_beta) * prevState->getQDotDot() + 2 * m_beta * currentState->getQDotDot());
43 void updateStateGivenU(std::shared_ptr<FeDeformBodyState> prevState, std::shared_ptr<FeDeformBodyState> currentState, Vectord& u)
This class defines the time integrators of various types. It only sets the rules of how the velocity ...
void updateStateGivenDv(std::shared_ptr< FeDeformBodyState > prevState, std::shared_ptr< FeDeformBodyState > currentState, Vectord &dV)
Update states given the updates in different forms.
Newmark-beta time integration.