void peano::applications::poisson::multigrid::mappings::SpacetreeGrid2SetupExperiment::createBoundaryVertex( peano::applications::poisson::multigrid::SpacetreeGridVertex& fineGridVertex, const tarch::la::Vector<DIMENSIONS,double>& fineGridX, const tarch::la::Vector<DIMENSIONS,double>& fineGridH, peano::applications::poisson::multigrid::SpacetreeGridVertex const * const coarseGridVertices, const peano::kernel::gridinterface::VertexEnumerator& coarseGridVerticesEnumerator, const peano::applications::poisson::multigrid::SpacetreeGridCell& coarseGridCell, const tarch::la::Vector<DIMENSIONS,int>& fineGridPositionOfVertex ) { logTraceInWith6Arguments( "createBoundaryVertex(...)", fineGridVertex, fineGridX, fineGridH, coarseGridVerticesEnumerator.toString(), coarseGridCell, fineGridPositionOfVertex ); // if (tarch::la::volume(fineGridH) > _refinementThreshold) { // fineGridVertex.refine(); // } if (coarseGridVerticesEnumerator.getLevel() < 3) { fineGridVertex.refine(); } peano::toolbox::stencil::Stencil stencil(0.0); fineGridVertex.setStencil(stencil); peano::toolbox::stencil::ProlongationMatrix prolongation (0.0); fineGridVertex.setP(prolongation); peano::toolbox::stencil::RestrictionMatrix restriction(0.0); fineGridVertex.setR(restriction); fineGridVertex.clearTempAP(); fineGridVertex.clearTempP(); logTraceOutWith1Argument( "createBoundaryVertex(...)", fineGridVertex ); }
void Multigrid::iterate() { int short o = controller->getCommand(); if (o < 0) { if (superlevel != nullptr) smooth(); sublevel->resetZero(); restriction(); sublevel->iterate(); } else if (o == 0) { smooth(); } else{ if (superlevel != nullptr) { smooth(); prolongation(); superlevel->iterate(); } else { smooth(); if (allNeumann) subtractMean(); controller->reset(); } } }
inline void Celestial::ForkPrediction() { CHECK(prediction_ == nullptr); prediction_ = mutable_prolongation()->NewFork(prolongation().last().time()); }