本文整理汇总了C++中peano::grid::VertexEnumerator::getCellSize方法的典型用法代码示例。如果您正苦于以下问题:C++ VertexEnumerator::getCellSize方法的具体用法?C++ VertexEnumerator::getCellSize怎么用?C++ VertexEnumerator::getCellSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类peano::grid::VertexEnumerator
的用法示例。
在下文中一共展示了VertexEnumerator::getCellSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defined
void particles::pidt::mappings::MoveParticles::enterCell(
particles::pidt::Cell& fineGridCell,
particles::pidt::Vertex * const fineGridVertices,
const peano::grid::VertexEnumerator& fineGridVerticesEnumerator,
particles::pidt::Vertex * const coarseGridVertices,
const peano::grid::VertexEnumerator& coarseGridVerticesEnumerator,
particles::pidt::Cell& coarseGridCell,
const tarch::la::Vector<DIMENSIONS,int>& fineGridPositionOfCell
) {
logTraceInWith4Arguments( "enterCell(...)", fineGridCell, fineGridVerticesEnumerator.toString(), coarseGridCell, fineGridPositionOfCell );
if (fineGridCell.isRefined()) {
fineGridCell.clearMaxVComponent();
}
else {
#if defined(SharedTBB) && !defined(__WIN32__)
tbb::atomic<int> numberOfParticlesMoved;
#elif defined(SharedTBB) && defined(__WIN32__)
static tarch::multicore::BooleanSemaphore semaphore;
int numberOfParticlesMoved;
#elif SharedOMP
#error not implemented yet
#else
int numberOfParticlesMoved;
#endif
numberOfParticlesMoved = 0;
pdfor2(k)
const int sourceVertexIndex = fineGridVertices[ fineGridVerticesEnumerator(k) ].getVertexIndex();
#ifdef MOVE_USES_SORTED_PARTICLES
const int resultOfOneVertex = moveParticlesOfOneVertexWithinCellIfTheyAreSorted(
sourceVertexIndex,
fineGridVerticesEnumerator
);
#else
const int resultOfOneVertex = moveParticlesOfOneVertexWithinCell(
sourceVertexIndex,
fineGridVerticesEnumerator
);
#endif
#if defined(SharedTBB) && defined(__WIN32__)
tarch::multicore::Lock lock(semaphore);
#endif
numberOfParticlesMoved += resultOfOneVertex;
endpdforx
_state.updateParticleStatisticsInLeaf(numberOfParticlesMoved,fineGridVerticesEnumerator.getCellSize());
}
logTraceOutWith1Argument( "enterCell(...)", fineGridCell );
}
示例2: logInfo
void peanoclaw::mappings::ValidateGrid::createCell(
peanoclaw::Cell& fineGridCell,
peanoclaw::Vertex * const fineGridVertices,
const peano::grid::VertexEnumerator& fineGridVerticesEnumerator,
peanoclaw::Vertex * const coarseGridVertices,
const peano::grid::VertexEnumerator& coarseGridVerticesEnumerator,
peanoclaw::Cell& coarseGridCell,
const tarch::la::Vector<DIMENSIONS,int>& fineGridPositionOfCell
) {
logTraceInWith4Arguments( "createCell(...)", fineGridCell, fineGridVerticesEnumerator.toString(), coarseGridCell, fineGridPositionOfCell );
//TODO unterweg debug
logInfo("", "Creating cell " << fineGridVerticesEnumerator.getVertexPosition(0) << ", "
<< fineGridVerticesEnumerator.getCellSize()
<< ", index=" << fineGridCell.getCellDescriptionIndex()
<< ",level=" << fineGridVerticesEnumerator.getLevel()
);
logTraceOutWith1Argument( "createCell(...)", fineGridCell );
}