本文整理汇总了C++中AnalysisModel::commitDomain方法的典型用法代码示例。如果您正苦于以下问题:C++ AnalysisModel::commitDomain方法的具体用法?C++ AnalysisModel::commitDomain怎么用?C++ AnalysisModel::commitDomain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnalysisModel
的用法示例。
在下文中一共展示了AnalysisModel::commitDomain方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: commit
int CollocationHSIncrReduct::commit(void)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING CollocationHSIncrReduct::commit() - no AnalysisModel set\n";
return -1;
}
// determine response quantities at t+deltaT
Udotdot->addVector(1.0/theta, *Utdotdot, (theta-1.0)/theta);
(*Udot) = *Utdot;
double a1 = deltaT*(1.0 - gamma);
double a2 = deltaT*gamma;
Udot->addVector(1.0, *Utdotdot, a1);
Udot->addVector(1.0, *Udotdot, a2);
(*U) = *Ut;
U->addVector(1.0, *Utdot, deltaT);
double a3 = deltaT*deltaT*(0.5 - beta);
double a4 = deltaT*deltaT*beta;
U->addVector(1.0, *Utdotdot, a3);
U->addVector(1.0, *Udotdot, a4);
// update the response at the DOFs
theModel->setResponse(*U, *Udot, *Udotdot);
// set the time to be t+deltaT
double time = theModel->getCurrentDomainTime();
time += (1.0-theta)*deltaT;
theModel->setCurrentDomainTime(time);
return theModel->commitDomain();
}
示例2: commit
int CollocationHSFixedNumIter::commit(void)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING CollocationHSFixedNumIter::commit() - no AnalysisModel set\n";
return -1;
}
LinearSOE *theSOE = this->getLinearSOE();
if (theSOE == 0) {
opserr << "WARNING CollocationHSFixedNumIter::commit() - no LinearSOE set\n";
return -2;
}
if (theSOE->solve() < 0) {
opserr << "WARNING CollocationHSFixedNumIter::commit() - "
<< "the LinearSysOfEqn failed in solve()\n";
return -3;
}
const Vector &deltaU = theSOE->getX();
// determine the response at t+theta*deltaT
U->addVector(1.0, deltaU, c1);
Udot->addVector(1.0, deltaU, c2);
Udotdot->addVector(1.0, deltaU, c3);
// determine response quantities at t+deltaT
Udotdot->addVector(1.0/theta, *Utdotdot, (theta-1.0)/theta);
(*Udot) = *Utdot;
double a1 = deltaT*(1.0 - gamma);
double a2 = deltaT*gamma;
Udot->addVector(1.0, *Utdotdot, a1);
Udot->addVector(1.0, *Udotdot, a2);
(*U) = *Ut;
U->addVector(1.0, *Utdot, deltaT);
double a3 = deltaT*deltaT*(0.5 - beta);
double a4 = deltaT*deltaT*beta;
U->addVector(1.0, *Utdotdot, a3);
U->addVector(1.0, *Udotdot, a4);
// update the response at the DOFs
theModel->setResponse(*U,*Udot,*Udotdot);
// set the time to be t+deltaT
double time = theModel->getCurrentDomainTime();
time += (1.0-theta)*deltaT;
theModel->setCurrentDomainTime(time);
return theModel->commitDomain();
}
示例3:
int
HHT1::commit(void)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING HHT1::commit() - no AnalysisModel set\n";
return -1;
}
// update the responses at the DOFs
theModel->setResponse(*U,*Udot,*Udotdot);
theModel->updateDomain();
return theModel->commitDomain();
}
示例4: commit
int AlphaOSGeneralized::commit(void)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING AlphaOSGeneralized::commit() - no AnalysisModel set\n";
return -1;
}
// set the time to be t+deltaT
double time = theModel->getCurrentDomainTime();
time += (1.0-alphaF)*deltaT;
theModel->setCurrentDomainTime(time);
return theModel->commitDomain();
}
示例5: commit
int CentralDifference::commit(void)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING CentralDifference::commit() - no AnalysisModel set\n";
return -1;
}
// set the time to be t+deltaT
double time = theModel->getCurrentDomainTime();
time += deltaT;
theModel->setCurrentDomainTime(time);
return theModel->commitDomain();
}
示例6:
int
CentralDifferenceNoDamping::commit(void)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING CentralDifferenceNoDamping::commit() - no AnalysisModel set\n";
return -1;
}
// update time in Domain to T + deltaT & commit the domain
double time = theModel->getCurrentDomainTime() + deltaT;
theModel->setCurrentDomainTime(time);
return theModel->commitDomain();
return 0;
}
示例7: commit
int HHTHSFixedNumIter::commit(void)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING HHTHSFixedNumIter::commit() - no AnalysisModel set\n";
return -1;
}
LinearSOE *theSOE = this->getLinearSOE();
if (theSOE == 0) {
opserr << "WARNING HHTHSFixedNumIter::commit() - no LinearSOE set\n";
return -2;
}
if (this->formTangent(statusFlag) < 0) {
opserr << "WARNING HHTHSFixedNumIter::commit() - "
<< "the Integrator failed in formTangent()\n";
return -3;
}
if (theSOE->solve() < 0) {
opserr << "WARNING HHTHSFixedNumIter::commit() - "
<< "the LinearSysOfEqn failed in solve()\n";
return -4;
}
const Vector &deltaU = theSOE->getX();
// determine the response at t+deltaT
U->addVector(1.0, deltaU, c1);
Udot->addVector(1.0, deltaU, c2);
Udotdot->addVector(1.0, deltaU, c3);
// update the response at the DOFs
theModel->setResponse(*U,*Udot,*Udotdot);
// set the time to be t+deltaT
double time = theModel->getCurrentDomainTime();
time += (1.0-alphaF)*deltaT;
theModel->setCurrentDomainTime(time);
return theModel->commitDomain();
}
示例8: commit
int AlphaOS::commit(void)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING AlphaOS::commit() - no AnalysisModel set\n";
return -1;
}
// set the time to be t+deltaT
double time = theModel->getCurrentDomainTime();
time += (1.0-alpha)*deltaT;
theModel->setCurrentDomainTime(time);
// update the displacements in the elements
if (updElemDisp == true)
theModel->updateDomain();
return theModel->commitDomain();
}
示例9: commit
int GeneralizedAlpha::commit(void)
{
AnalysisModel *theModel = this->getAnalysisModel();
if (theModel == 0) {
opserr << "WARNING GeneralizedAlpha::commit() - no AnalysisModel set\n";
return -1;
}
// update the response at the DOFs
theModel->setResponse(*U,*Udot,*Udotdot);
if (theModel->updateDomain() < 0) {
opserr << "GeneralizedAlpha::commit() - failed to update the domain\n";
return -4;
}
// set the time to be t+deltaT
double time = theModel->getCurrentDomainTime();
time += (1.0-alphaF)*deltaT;
theModel->setCurrentDomainTime(time);
return theModel->commitDomain();
}