本文整理汇总了C++中FILE::InsertNextCell方法的典型用法代码示例。如果您正苦于以下问题:C++ FILE::InsertNextCell方法的具体用法?C++ FILE::InsertNextCell怎么用?C++ FILE::InsertNextCell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FILE
的用法示例。
在下文中一共展示了FILE::InsertNextCell方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doOutput
//.........这里部分代码省略.........
if ( ( ireg > 0 ) && ( this->smoother->giveElementVirtualRegionNumber(ielem) != ireg ) ) {
continue;
}
if ( this->isElementComposite(elem) ) {
continue; // composite cells exported individually
}
if ( !elem-> isActivated(tStep) ) { //skip inactivated elements
continue;
}
#ifdef __PARALLEL_MODE
if ( elem->giveParallelMode() != Element_local ) {
continue;
}
#endif
nelemNodes = elem->giveNumberOfNodes();
this->giveElementCell(cellNodes, elem, 0);
#ifdef __VTK_MODULE
elemNodeArray->Reset();
elemNodeArray->SetNumberOfIds(nelemNodes);
#endif
for ( int i = 1; i <= nelemNodes; i++ ) {
#ifdef __VTK_MODULE
elemNodeArray->SetId(i-1, mapG2L.at( cellNodes.at(i) ) - 1);
#else
fprintf(stream, "%d ", mapG2L.at( cellNodes.at(i) ) - 1);
#endif
}
#ifdef __VTK_MODULE
stream->InsertNextCell(this->giveCellType(elem), elemNodeArray);
#else
fprintf(stream, " ");
#endif
}
#ifndef __VTK_MODULE
int vtkCellType;
fprintf(stream, "</DataArray>\n");
// output the offsets (index of individual element data in connectivity array)
fprintf(stream, " <DataArray type=\"Int32\" Name=\"offsets\" format=\"ascii\"> ");
int offset = 0;
for ( int ielem = 1; ielem <= nelem; ielem++ ) {
elem = d->giveElement(ielem);
if ( ( ireg > 0 ) && ( this->smoother->giveElementVirtualRegionNumber(ielem) != ireg ) ) {
continue;
}
#ifdef __PARALLEL_MODE
if ( elem->giveParallelMode() != Element_local ) {
continue;
}
#endif
offset += elem->giveNumberOfNodes();
fprintf(stream, "%d ", offset);
}
fprintf(stream, "</DataArray>\n");
// output cell (element) types
fprintf(stream, " <DataArray type=\"UInt8\" Name=\"types\" format=\"ascii\"> ");
for ( int ielem = 1; ielem <= nelem; ielem++ ) {