本文整理汇总了C++中DOF_Group::getEigenvectors方法的典型用法代码示例。如果您正苦于以下问题:C++ DOF_Group::getEigenvectors方法的具体用法?C++ DOF_Group::getEigenvectors怎么用?C++ DOF_Group::getEigenvectors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOF_Group
的用法示例。
在下文中一共展示了DOF_Group::getEigenvectors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Vector
int
IncrementalIntegrator::setupModal(const Vector *modalDampingValues)
{
int numModes = modalDampingValues->Size();
const Vector &eigenvalues = theAnalysisModel->getEigenvalues();
int numEigen = eigenvalues.Size();
if (numEigen < numModes)
numModes = numEigen;
int numDOF = theSOE->getNumEqn();
if (eigenValues == 0 || *eigenValues != eigenvalues) {
if (eigenValues != 0)
delete eigenValues;
if (eigenVectors != 0)
delete [] eigenVectors;
if (dampingForces != 0)
delete dampingForces;
if (mV != 0)
delete mV;
if (tmpV1 != 0)
delete tmpV1;
if (tmpV2 != 0)
delete tmpV2;
eigenValues = new Vector(eigenvalues);
dampingForces = new Vector(numDOF);
eigenVectors = new double[numDOF*numModes];
mV = new Vector(numDOF);
tmpV1 = new Vector(numDOF);
tmpV2 = new Vector(numDOF);
DOF_GrpIter &theDOFs2 = theAnalysisModel->getDOFs();
DOF_Group *dofPtr;
while ((dofPtr = theDOFs2()) != 0) {
const Matrix &dofEigenvectors =dofPtr->getEigenvectors();
const ID &dofID = dofPtr->getID();
for (int j=0; j<numModes; j++) {
for (int i=0; i<dofID.Size(); i++) {
int id = dofID(i);
if (id >= 0)
eigenVectors[j*numDOF + id] = dofEigenvectors(i,j);
}
}
}
double *eigenVectors2 = new double[numDOF*numModes];
for (int i=0; i<numModes; i++) {
double *eigenVectorI = &eigenVectors[numDOF*i];
double *mEigenVectorI = &eigenVectors2[numDOF*i];
Vector v1(eigenVectorI,numDOF);
Vector v2(mEigenVectorI,numDOF);
this->doMv(v1, v2);
}
eigenVectors = eigenVectors2;
}
return 0;
}