本文整理汇总了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;
}