本文整理匯總了C++中TPZAutoPointer::VariableIndex方法的典型用法代碼示例。如果您正苦於以下問題:C++ TPZAutoPointer::VariableIndex方法的具體用法?C++ TPZAutoPointer::VariableIndex怎麽用?C++ TPZAutoPointer::VariableIndex使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TPZAutoPointer
的用法示例。
在下文中一共展示了TPZAutoPointer::VariableIndex方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: DrawSolution
void TPZDXGraphMesh::DrawSolution(char * var)
{
//int nmat = fCompMesh->MaterialVec().NElements();
TPZAutoPointer<TPZMaterial> matp = Material();
int i,varind;
varind = matp->VariableIndex(var);
TPZVec<int> vec(1);
(fOutFile) << "object " << fNextDataField << " class array type float rank 1 shape " <<
matp->NSolutionVariables(varind) << " items " << NPoints() << " data follows " << endl;
vec[0] = varind;
int nel = fCompMesh->ConnectVec().NElements();
for(i=0;i<nel;i++) {
TPZGraphNode n = fNodeMap[i];
n.DrawSolution(vec,fStyle);
}
(fOutFile) << "attribute \"dep\" string \"positions\"" << endl;
(fOutFile) << "#" << endl;
(fOutFile) << "object " << (fNextDataField+1) << " class field" << endl;
(fOutFile) << "component \"data\" value " << fNextDataField << endl;
// (fOutFile) << "component \"positions\" value " << fNodeCoField << endl;
// (fOutFile) << "component \"connections\" value " << fConnectField << endl;
(fOutFile) << "attribute \"name\" string \"" << var << fNextDataField <<
"\"" << endl;
(fOutFile) << "#" << endl;
fNextDataField += 2;
}