本文整理汇总了C++中DOF_Group::getCommittedAccel方法的典型用法代码示例。如果您正苦于以下问题:C++ DOF_Group::getCommittedAccel方法的具体用法?C++ DOF_Group::getCommittedAccel怎么用?C++ DOF_Group::getCommittedAccel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOF_Group
的用法示例。
在下文中一共展示了DOF_Group::getCommittedAccel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: domainChanged
int CollocationHSIncrReduct::domainChanged()
{
AnalysisModel *theModel = this->getAnalysisModel();
LinearSOE *theLinSOE = this->getLinearSOE();
const Vector &x = theLinSOE->getX();
int size = x.Size();
// create the new Vector objects
if (Ut == 0 || Ut->Size() != size) {
// delete the old
if (Ut != 0)
delete Ut;
if (Utdot != 0)
delete Utdot;
if (Utdotdot != 0)
delete Utdotdot;
if (U != 0)
delete U;
if (Udot != 0)
delete Udot;
if (Udotdot != 0)
delete Udotdot;
if (scaledDeltaU != 0)
delete scaledDeltaU;
// create the new
Ut = new Vector(size);
Utdot = new Vector(size);
Utdotdot = new Vector(size);
U = new Vector(size);
Udot = new Vector(size);
Udotdot = new Vector(size);
scaledDeltaU = new Vector(size);
// check we obtained the new
if (Ut == 0 || Ut->Size() != size ||
Utdot == 0 || Utdot->Size() != size ||
Utdotdot == 0 || Utdotdot->Size() != size ||
U == 0 || U->Size() != size ||
Udot == 0 || Udot->Size() != size ||
Udotdot == 0 || Udotdot->Size() != size ||
scaledDeltaU == 0 || scaledDeltaU->Size() != size) {
opserr << "CollocationHSIncrReduct::domainChanged() - ran out of memory\n";
// delete the old
if (Ut != 0)
delete Ut;
if (Utdot != 0)
delete Utdot;
if (Utdotdot != 0)
delete Utdotdot;
if (U != 0)
delete U;
if (Udot != 0)
delete Udot;
if (Udotdot != 0)
delete Udotdot;
if (scaledDeltaU != 0)
delete scaledDeltaU;
Ut = 0; Utdot = 0; Utdotdot = 0;
U = 0; Udot = 0; Udotdot = 0;
scaledDeltaU = 0;
return -1;
}
}
// now go through and populate U, Udot and Udotdot by iterating through
// the DOF_Groups and getting the last committed velocity and accel
DOF_GrpIter &theDOFs = theModel->getDOFs();
DOF_Group *dofPtr;
while ((dofPtr = theDOFs()) != 0) {
const ID &id = dofPtr->getID();
int idSize = id.Size();
int i;
const Vector &disp = dofPtr->getCommittedDisp();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*U)(loc) = disp(i);
}
}
const Vector &vel = dofPtr->getCommittedVel();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Udot)(loc) = vel(i);
}
}
const Vector &accel = dofPtr->getCommittedAccel();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Udotdot)(loc) = accel(i);
//.........这里部分代码省略.........
示例2: Vector
//.........这里部分代码省略.........
delete Ualpha;
if (Udotalpha != 0)
delete Udotalpha;
// create the new
Ut = new Vector(size);
Utdot = new Vector(size);
Utdotdot = new Vector(size);
U = new Vector(size);
Udot = new Vector(size);
Udotdot = new Vector(size);
Ualpha = new Vector(size);
Udotalpha = new Vector(size);
// check we obtained the new
if (Ut == 0 || Ut->Size() != size ||
Utdot == 0 || Utdot->Size() != size ||
Utdotdot == 0 || Utdotdot->Size() != size ||
U == 0 || U->Size() != size ||
Udot == 0 || Udot->Size() != size ||
Udotdot == 0 || Udotdot->Size() != size ||
Ualpha == 0 || Ualpha->Size() != size ||
Udotalpha == 0 || Udotalpha->Size() != size) {
opserr << "HHT1::domainChanged - ran out of memory\n";
// delete the old
if (Ut != 0)
delete Ut;
if (Utdot != 0)
delete Utdot;
if (Utdotdot != 0)
delete Utdotdot;
if (U != 0)
delete U;
if (Udot != 0)
delete Udot;
if (Udotdot != 0)
delete Udotdot;
if (Ualpha != 0)
delete Ualpha;
if (Udotalpha != 0)
delete Udotalpha;
Ut = 0; Utdot = 0; Utdotdot = 0;
U = 0; Udot = 0; Udotdot = 0; Udotalpha=0; Ualpha =0;
return -1;
}
}
// now go through and populate U, Udot and Udotdot by iterating through
// the DOF_Groups and getting the last committed velocity and accel
DOF_GrpIter &theDOFs = myModel->getDOFs();
DOF_Group *dofPtr;
while ((dofPtr = theDOFs()) != 0) {
const ID &id = dofPtr->getID();
int idSize = id.Size();
int i;
const Vector &disp = dofPtr->getCommittedDisp();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*U)(loc) = disp(i);
}
}
const Vector &vel = dofPtr->getCommittedVel();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Udot)(loc) = vel(i);
}
}
const Vector &accel = dofPtr->getCommittedAccel();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Udotdot)(loc) = accel(i);
}
}
/** NOTE WE CAN't DO TOGETHER BECAUSE DOF_GROUPS USING SINGLE VECTOR ******
for (int i=0; i < id.Size(); i++) {
int loc = id(i);
if (loc >= 0) {
(*U)(loc) = disp(i);
(*Udot)(loc) = vel(i);
(*Udotdot)(loc) = accel(i);
}
}
*******************************************************************************/
}
return 0;
}
示例3: domainChanged
int CentralDifference::domainChanged()
{
AnalysisModel *myModel = this->getAnalysisModel();
LinearSOE *theLinSOE = this->getLinearSOE();
const Vector &x = theLinSOE->getX();
int size = x.Size();
// if damping factors exist set them in the element & node of the domain
if (alphaM != 0.0 || betaK != 0.0 || betaKi != 0.0 || betaKc != 0.0)
myModel->setRayleighDampingFactors(alphaM, betaK, betaKi, betaKc);
// create the new Vector objects
if (Ut == 0 || Ut->Size() != size) {
if (Utm1 != 0)
delete Utm1;
if (Ut != 0)
delete Ut;
if (Utdot != 0)
delete Utdot;
if (Utdotdot != 0)
delete Utdotdot;
if (Udot != 0)
delete Udot;
if (Udotdot != 0)
delete Udotdot;
// create the new
Utm1 = new Vector(size);
Ut = new Vector(size);
Utdot = new Vector(size);
Utdotdot = new Vector(size);
Udot = new Vector(size);
Udotdot = new Vector(size);
// check we obtained the new
if (Utm1 == 0 || Utm1->Size() != size ||
Ut == 0 || Ut->Size() != size ||
Utdot == 0 || Utdot->Size() != size ||
Utdotdot == 0 || Utdotdot->Size() != size ||
Udot == 0 || Udot->Size() != size ||
Udotdot == 0 || Udotdot->Size() != size) {
opserr << "CentralDifference::domainChanged - ran out of memory\n";
// delete the old
if (Utm1 != 0)
delete Utm1;
if (Ut != 0)
delete Ut;
if (Utdot != 0)
delete Utdot;
if (Utdotdot != 0)
delete Utdotdot;
if (Udot != 0)
delete Udot;
if (Udotdot != 0)
delete Udotdot;
Utm1 = 0;
Ut = 0; Utdot = 0; Utdotdot = 0;
Udot = 0; Udotdot = 0;
return -1;
}
}
// now go through and populate U, Udot and Udotdot by iterating through
// the DOF_Groups and getting the last committed velocity and accel
DOF_GrpIter &theDOFs = myModel->getDOFs();
DOF_Group *dofPtr;
while ((dofPtr = theDOFs()) != 0) {
const ID &id = dofPtr->getID();
int idSize = id.Size();
int i;
const Vector &disp = dofPtr->getCommittedDisp();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Utm1)(loc) = disp(i);
(*Ut)(loc) = disp(i);
}
}
const Vector &vel = dofPtr->getCommittedVel();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Udot)(loc) = vel(i);
}
}
const Vector &accel = dofPtr->getCommittedAccel();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Udotdot)(loc) = accel(i);
}
}
//.........这里部分代码省略.........
示例4: domainChanged
//.........这里部分代码省略.........
Ualphadot = new Vector(size);
Ualphadotdot = new Vector(size);
Utm1 = new Vector(size);
Utm2 = new Vector(size);
scaledDeltaU = new Vector(size);
// check we obtained the new
if (Ut == 0 || Ut->Size() != size ||
Utdot == 0 || Utdot->Size() != size ||
Utdotdot == 0 || Utdotdot->Size() != size ||
U == 0 || U->Size() != size ||
Udot == 0 || Udot->Size() != size ||
Udotdot == 0 || Udotdot->Size() != size ||
Ualpha == 0 || Ualpha->Size() != size ||
Ualphadot == 0 || Ualphadot->Size() != size ||
Ualphadotdot == 0 || Ualphadotdot->Size() != size ||
Utm1 == 0 || Utm1->Size() != size ||
Utm2 == 0 || Utm2->Size() != size ||
scaledDeltaU == 0 || scaledDeltaU->Size() != size) {
opserr << "HHTHSFixedNumIter::domainChanged - ran out of memory\n";
// delete the old
if (Ut != 0)
delete Ut;
if (Utdot != 0)
delete Utdot;
if (Utdotdot != 0)
delete Utdotdot;
if (U != 0)
delete U;
if (Udot != 0)
delete Udot;
if (Udotdot != 0)
delete Udotdot;
if (Ualpha != 0)
delete Ualpha;
if (Ualphadot != 0)
delete Ualphadot;
if (Ualphadotdot != 0)
delete Ualphadotdot;
if (Utm1 != 0)
delete Utm1;
if (Utm2 != 0)
delete Utm2;
if (scaledDeltaU != 0)
delete scaledDeltaU;
Ut = 0; Utdot = 0; Utdotdot = 0;
U = 0; Udot = 0; Udotdot = 0;
Ualpha = 0; Ualphadot = 0; Ualphadotdot = 0;
Utm1 = 0; Utm2 = 0; scaledDeltaU = 0;
return -1;
}
}
// now go through and populate U, Udot and Udotdot by iterating through
// the DOF_Groups and getting the last committed velocity and accel
DOF_GrpIter &theDOFs = myModel->getDOFs();
DOF_Group *dofPtr;
while ((dofPtr = theDOFs()) != 0) {
const ID &id = dofPtr->getID();
int idSize = id.Size();
int i;
const Vector &disp = dofPtr->getCommittedDisp();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Utm1)(loc) = disp(i);
(*Ut)(loc) = disp(i);
(*U)(loc) = disp(i);
}
}
const Vector &vel = dofPtr->getCommittedVel();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Udot)(loc) = vel(i);
}
}
const Vector &accel = dofPtr->getCommittedAccel();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Udotdot)(loc) = accel(i);
}
}
}
if (polyOrder == 2)
opserr << "\nWARNING: HHTHSFixedNumIter::domainChanged() - assuming Ut-1 = Ut\n";
else if (polyOrder == 3)
opserr << "\nWARNING: HHTHSFixedNumIter::domainChanged() - assuming Ut-2 = Ut-1 = Ut\n";
return 0;
}
示例5: domainChanged
//.........这里部分代码省略.........
Ualpha = new Vector(size);
Ualphadot = new Vector(size);
Ualphadotdot = new Vector(size);
Utdothat = new Vector(size);
// check we obtained the new
if (alpha1 == 0 || alpha1->noRows() != size || alpha1->noCols() != size ||
alpha3 == 0 || alpha3->noRows() != size || alpha3->noCols() != size ||
Mhat == 0 || Mhat->noRows() != size || Mhat->noCols() != size ||
Ut == 0 || Ut->Size() != size ||
Utdot == 0 || Utdot->Size() != size ||
Utdotdot == 0 || Utdotdot->Size() != size ||
U == 0 || U->Size() != size ||
Udot == 0 || Udot->Size() != size ||
Udotdot == 0 || Udotdot->Size() != size ||
Ualpha == 0 || Ualpha->Size() != size ||
Ualphadot == 0 || Ualphadot->Size() != size ||
Ualphadotdot == 0 || Ualphadotdot->Size() != size ||
Utdothat == 0 || Utdothat->Size() != size) {
opserr << "WARNING KRAlphaExplicit::domainChanged() - ";
opserr << "ran out of memory\n";
// delete the old
if (alpha1 != 0)
delete alpha1;
if (alpha3 != 0)
delete alpha3;
if (Mhat != 0)
delete Mhat;
if (Ut != 0)
delete Ut;
if (Utdot != 0)
delete Utdot;
if (Utdotdot != 0)
delete Utdotdot;
if (U != 0)
delete U;
if (Udot != 0)
delete Udot;
if (Udotdot != 0)
delete Udotdot;
if (Ualpha != 0)
delete Ualpha;
if (Ualphadot != 0)
delete Ualphadot;
if (Ualphadotdot != 0)
delete Ualphadotdot;
if (Utdothat != 0)
delete Utdothat;
alpha1 = 0; alpha3 = 0; Mhat = 0;
Ut = 0; Utdot = 0; Utdotdot = 0;
U = 0; Udot = 0; Udotdot = 0;
Ualpha = 0; Ualphadot = 0; Ualphadotdot = 0;
Utdothat = 0;
return -1;
}
}
// now go through and populate U, Udot and Udotdot by iterating through
// the DOF_Groups and getting the last committed velocity and accel
DOF_GrpIter &theDOFs = myModel->getDOFs();
DOF_Group *dofPtr;
while ((dofPtr = theDOFs()) != 0) {
const ID &id = dofPtr->getID();
int idSize = id.Size();
int i;
const Vector &disp = dofPtr->getCommittedDisp();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*U)(loc) = disp(i);
}
}
const Vector &vel = dofPtr->getCommittedVel();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Udot)(loc) = vel(i);
}
}
const Vector &accel = dofPtr->getCommittedAccel();
for (i=0; i < idSize; i++) {
int loc = id(i);
if (loc >= 0) {
(*Udotdot)(loc) = accel(i);
}
}
}
// recalculate integration parameter matrices b/c domain changed
initAlphaMatrices = 1;
return 0;
}