63 lines
1.6 KiB
C++
63 lines
1.6 KiB
C++
#include "AtPointConstraintIqctJqc.h"
|
|
#include "DispCompIeqctJeqcO.h"
|
|
#include "CREATE.h"
|
|
|
|
using namespace MbD;
|
|
|
|
AtPointConstraintIqctJqc::AtPointConstraintIqctJqc(EndFrmcptr frmi, EndFrmcptr frmj, int axisi) :
|
|
AtPointConstraintIqcJqc(frmi, frmj, axisi)
|
|
{
|
|
}
|
|
|
|
void AtPointConstraintIqctJqc::initializeGlobally()
|
|
{
|
|
riIeJeO->initializeGlobally();
|
|
ppGpEJpEJ = std::static_pointer_cast<DispCompIeqctJeqcO>(riIeJeO)->ppriIeJeOpEJpEJ;
|
|
}
|
|
|
|
void AtPointConstraintIqctJqc::initriIeJeO()
|
|
{
|
|
riIeJeO = CREATE<DispCompIeqctJeqcO>::With(frmI, frmJ, axis);
|
|
}
|
|
|
|
void AtPointConstraintIqctJqc::calcPostDynCorrectorIteration()
|
|
{
|
|
//"ppGpEIpEI is no longer constant."
|
|
|
|
ppGpEIpEI = std::static_pointer_cast<DispCompIeqctJeqcO>(riIeJeO)->ppriIeJeOpEIpEI;
|
|
AtPointConstraintIqcJqc::calcPostDynCorrectorIteration();
|
|
}
|
|
|
|
ConstraintType AtPointConstraintIqctJqc::type()
|
|
{
|
|
return essential;
|
|
}
|
|
|
|
void AtPointConstraintIqctJqc::preVelIC()
|
|
{
|
|
AtPointConstraintIJ::preVelIC();
|
|
pGpt = std::static_pointer_cast<DispCompIeqctJeqcO>(riIeJeO)->priIeJeOpt;
|
|
}
|
|
|
|
void AtPointConstraintIqctJqc::fillVelICError(FColDsptr col)
|
|
{
|
|
col->atiminusNumber(iG, pGpt);
|
|
}
|
|
|
|
void AtPointConstraintIqctJqc::fillAccICIterError(FColDsptr col)
|
|
{
|
|
AtPointConstraintIqcJqc::fillAccICIterError(col);
|
|
auto efrmIqc = std::static_pointer_cast<EndFrameqc>(frmI);
|
|
auto qEdotI = efrmIqc->qEdot();
|
|
double sum = (ppGpEIpt->timesFullColumn(qEdotI)) * 2.0;
|
|
sum += ppGptpt;
|
|
col->atiplusNumber(iG, sum);
|
|
}
|
|
|
|
void AtPointConstraintIqctJqc::preAccIC()
|
|
{
|
|
AtPointConstraintIJ::preAccIC();
|
|
ppGpEIpt = std::static_pointer_cast<DispCompIeqctJeqcO>(riIeJeO)->ppriIeJeOpEIpt;
|
|
ppGptpt = std::static_pointer_cast<DispCompIeqctJeqcO>(riIeJeO)->ppriIeJeOptpt;
|
|
}
|