本文整理汇总了C++中fei::SharedPtr::getBlkIndices_Owned方法的典型用法代码示例。如果您正苦于以下问题:C++ SharedPtr::getBlkIndices_Owned方法的具体用法?C++ SharedPtr::getBlkIndices_Owned怎么用?C++ SharedPtr::getBlkIndices_Owned使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fei::SharedPtr
的用法示例。
在下文中一共展示了SharedPtr::getBlkIndices_Owned方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runtime_error
fei::SharedPtr<fei::Vector>
Factory_Aztec::createVector(fei::SharedPtr<fei::VectorSpace> vecSpace,
bool isSolutionVector,
int numVectors)
{
std::vector<int> indices;
int err = 0, localSize = 0;
if (reducer_.get() != NULL) {
indices = reducer_->getLocalReducedEqns();
localSize = indices.size();
}
else {
if (blockEntryMatrix_) {
localSize = vecSpace->getNumBlkIndices_Owned();
indices.resize(localSize*2);
err = vecSpace->getBlkIndices_Owned(localSize, &indices[0], &indices[localSize], localSize);
}
else {
localSize = vecSpace->getNumIndices_Owned();
err = vecSpace->getIndices_Owned(indices);
}
}
if (err != 0) {
throw std::runtime_error("fei::Factory_Aztec: error in vecSpace->getIndices_Owned");
}
fei::SharedPtr<fei::Vector> feivec, tmpvec;
if (reducer_.get() != NULL) {
feivec.reset(new fei::VectorReducer(reducer_,
tmpvec, isSolutionVector));
}
else {
feivec = tmpvec;
}
return(feivec);
}