在下面这段代码中,为什么在VS平台上运行至//error处,会出现断点指令错误(debugbreak)
int numElements = theDomain->getNumElements();
for (int i = 1; i <= numElements; i++) {//本例中单元编号从1开始
Element* element = theDomain->getElement(i);
//Information* info = new Information();
//element->getResponse(3, *info);
//const Vector& stressVector = info->getData();
// 获取当前单元的节点列表(向量)
const ID& nodeTags = element->getExternalNodes();
// 计算共享节点的平均应力
Vector averageStress(3 * nodeTags.Size());
for (int k = 0; k < nodeTags.Size(); k++) {
double sumStress01 = 0.0;
double sumStress02 = 0.0;
double sumStress03 = 0.0;
int count = 0;
for (int l = 1; l <= numElements; l++) {
Element* otherElement = theDomain->getElement(l);
const ID& otherNodeTags = otherElement->getExternalNodes();
for (int m = 0; m < otherNodeTags.Size(); m++) {
if (nodeTags(k) == otherNodeTags(m)) {
Information* otherInfo = new Information();
otherElement->getResponse(3, *otherInfo);
const Vector& otherStressVector = otherInfo->getData();
sumStress01 += otherStressVector(3 * m - 3);
sumStress02 += otherStressVector(3 * m - 2);
sumStress03 += otherStressVector(3 * m - 1);
count++;
}//error
}
}
averageStress(3 * k - 3) = sumStress01 / count;
averageStress(3 * k - 2) = sumStress02 / count;
averageStress(3 * k - 1) = sumStress03 / count;
}
}