本文整理汇总了C++中peano::grid::VertexEnumerator::getCellFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ VertexEnumerator::getCellFlags方法的具体用法?C++ VertexEnumerator::getCellFlags怎么用?C++ VertexEnumerator::getCellFlags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类peano::grid::VertexEnumerator
的用法示例。
在下文中一共展示了VertexEnumerator::getCellFlags方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assertion
void particles::pit::adapters::MoveParticlesAndPlot2VTKGridVisualiser_0::leaveCell(
particles::pit::Cell& fineGridCell,
particles::pit::Vertex * const fineGridVertices,
const peano::grid::VertexEnumerator& fineGridVerticesEnumerator,
particles::pit::Vertex * const coarseGridVertices,
const peano::grid::VertexEnumerator& coarseGridVerticesEnumerator,
particles::pit::Cell& coarseGridCell,
const tarch::la::Vector<DIMENSIONS,int>& fineGridPositionOfCell
) {
#ifdef Parallel
if (fineGridCell.isLeaf() && !fineGridCell.isAssignedToRemoteRank()) {
#else
if (fineGridCell.isLeaf()) {
#endif
assertion( DIMENSIONS==2 || DIMENSIONS==3 );
int vertexIndex[TWO_POWER_D];
dfor2(i)
tarch::la::Vector<DIMENSIONS,double> currentVertexPosition = fineGridVerticesEnumerator.getVertexPosition(i);
assertion2 ( _vertex2IndexMap.find(currentVertexPosition) != _vertex2IndexMap.end(), currentVertexPosition, fineGridVertices[ fineGridVerticesEnumerator(i) ].toString() );
vertexIndex[iScalar] = _vertex2IndexMap[currentVertexPosition];
enddforx
int cellIndex;
if (DIMENSIONS==2) {
cellIndex = _cellWriter->plotQuadrangle(vertexIndex);
}
if (DIMENSIONS==3) {
cellIndex = _cellWriter->plotHexahedron(vertexIndex);
}
_cellStateWriter->plotCell(cellIndex,fineGridVerticesEnumerator.getCellFlags());
_cellNormWriterX->plotCell(cellIndex,(fineGridCell.getMyNorm())[0]);
_cellNormWriterY->plotCell(cellIndex,(fineGridCell.getMyNorm())[1]);
}
}
void particles::pit::adapters::MoveParticlesAndPlot2VTKGridVisualiser_0::beginIteration(
particles::pit::State& solverState
) {
assertion( _vtkWriter==0 );
_vtkWriter = new tarch::plotter::griddata::unstructured::vtk::VTKTextFileWriter();
_vertexWriter = _vtkWriter->createVertexWriter();
_cellWriter = _vtkWriter->createCellWriter();
_vertexTypeWriter = _vtkWriter->createVertexDataWriter(particles::pit::Vertex::Records::getInsideOutsideDomainMapping()+"/Hanging=-1" ,1);
_vertexRefinementControlWriter = _vtkWriter->createVertexDataWriter(particles::pit::Vertex::Records::getRefinementControlMapping() ,1);
_vertexAdjacentCellsHeight = _vtkWriter->createVertexDataWriter( peano::grid::getCellFlagsLegend(),1);
_cellStateWriter = _vtkWriter->createCellDataWriter( "cell-flag(>=-1=stationary,-1=parallel-boundary,<=-2=not-stationary" ,1);
_cellNormWriterX = _vtkWriter->createCellDataWriter( "Norm,X-direction" ,1);
_cellNormWriterY = _vtkWriter->createCellDataWriter( "Norm,Y-direction" ,1);
}