void peano::applications::navierstokes::prototype1::repositories::PrototypeRepositoryForRegularGridStandardImplementation::restart( const tarch::la::Vector<DIMENSIONS,int>& numberOfGridPoints, const tarch::la::Vector<DIMENSIONS,double>& domainSize, const tarch::la::Vector<DIMENSIONS,double>& computationalDomainOffset, const tarch::la::Vector<TWO_POWER_D_TIMES_TWO_POWER_D,int>& neighbourRanks ) { logTraceInWith3Arguments( "restart(...)", numberOfGridPoints, domainSize, computationalDomainOffset ); #ifdef Parallel assertion( !tarch::parallel::Node::getInstance().isMasterProcess()); #endif assertion( _repositoryState.getAction() == PrototypeRepositoryState::Terminate ); #ifdef Parallel _gridContainer.restart( numberOfGridPoints,domainSize,computationalDomainOffset,neighbourRanks); #else _gridContainer.restart( numberOfGridPoints,domainSize,computationalDomainOffset); #endif _gridWithInitialiseScenario.restart(domainSize,computationalDomainOffset); _gridWithMergeA.restart(domainSize,computationalDomainOffset); _gridWithCalculateF.restart(domainSize,computationalDomainOffset); _gridWithCalculatePPERHS.restart(domainSize,computationalDomainOffset); _gridWithGaussSeidelForEnhancedDivFree.restart(domainSize,computationalDomainOffset); _gridWithUpdateVelocity.restart(domainSize,computationalDomainOffset); _gridWithPlotSolutionVTK.restart(domainSize,computationalDomainOffset); _gridWithPlotRegularSolutionVTK.restart(domainSize,computationalDomainOffset); _gridWithUpdateScenario.restart(domainSize,computationalDomainOffset); logTraceOut( "restart(...)" ); }
void peano::applications::poisson::vhhjacobi::repositories::JacobiBatchJobRepositoryForRegularGridStandardImplementation::restart( const tarch::la::Vector<DIMENSIONS,int>& numberOfGridPoints, const tarch::la::Vector<DIMENSIONS,double>& domainSize, const tarch::la::Vector<DIMENSIONS,double>& computationalDomainOffset, const tarch::la::Vector<TWO_POWER_D_TIMES_TWO_POWER_D,int>& neighbourRanks ) { logTraceInWith3Arguments( "restart(...)", numberOfGridPoints, domainSize, computationalDomainOffset ); #ifdef Parallel assertion( !tarch::parallel::Node::getInstance().isMasterProcess()); #endif assertion( _repositoryState.getAction() == JacobiBatchJobRepositoryState::Terminate ); #ifdef Parallel _gridContainer.restart( numberOfGridPoints,domainSize,computationalDomainOffset,neighbourRanks); #else _gridContainer.restart( numberOfGridPoints,domainSize,computationalDomainOffset); #endif _gridWithSetupExperiment.restart(domainSize,computationalDomainOffset); _gridWithJacobiStep.restart(domainSize,computationalDomainOffset); _gridWithJacobiStepAndPlotSolution.restart(domainSize,computationalDomainOffset); _gridWithPlotSolution.restart(domainSize,computationalDomainOffset); logTraceOut( "restart(...)" ); }
double scenario::diffusionequation::CornerPointField::getPorosityFromDataSet(const tarch::la::Vector<3,double>& x) const { logTraceInWith3Arguments( "getPorosityFromDataSet(vector)", x, _hexahedron.getBoundingBox(), _hexahedron.getOffset() ); const double depth = x(2); const double pillarSizeX = getCornerPointPillarWidth()(0); assertion1( pillarSizeX>0.0, pillarSizeX ); int inArrayX = std::floor( (x(0)-_hexahedron.getOffset()(0)) / pillarSizeX ); if (inArrayX==_pillars(0)) inArrayX--; assertion3( inArrayX>=0, pillarSizeX, inArrayX, _pillars ); assertion3( inArrayX<_pillars(0), pillarSizeX, inArrayX, _pillars ); #if defined(Dim3) const double pillarSizeY = getCornerPointPillarWidth()(1); assertion4( pillarSizeY>0.0, pillarSizeX, pillarSizeY, inArrayX, _pillars ); int inArrayY = std::floor( (x(1)-_hexahedron.getOffset()(1)) / pillarSizeY ); if (inArrayY==_pillars(1)) inArrayY--; assertion5( inArrayY>=0, pillarSizeX, pillarSizeY, inArrayX, inArrayY, _pillars ); assertion5( inArrayY<_pillars(1), pillarSizeX, pillarSizeY, inArrayX, inArrayY, _pillars ); #elif defined(Dim2) const int inArrayY = _pillars(1) / 2; #endif const int entry = inArrayX + inArrayY * _pillars(0); assertion6( entry < static_cast<int>(_entries.size()), pillarSizeX, inArrayX, inArrayY, _pillars, entry, _entries.size() ); double result = _entries[entry].getPermeability(depth); logTraceOutWith1Argument( "getPorosityFromDataSet(vector)", result ); return result; }
void peano::applications::latticeboltzmann::blocklatticeboltzmann::repositories::BlockLatticeBoltzmannBatchJobRepositoryForRegularGridStandardImplementation::restart( const tarch::la::Vector<DIMENSIONS,int>& numberOfGridPoints, const tarch::la::Vector<DIMENSIONS,double>& domainSize, const tarch::la::Vector<DIMENSIONS,double>& computationalDomainOffset, const tarch::la::Vector<TWO_POWER_D_TIMES_TWO_POWER_D,int>& neighbourRanks ) { logTraceInWith3Arguments( "restart(...)", numberOfGridPoints, domainSize, computationalDomainOffset ); #ifdef Parallel assertion( !tarch::parallel::Node::getInstance().isMasterProcess()); #endif assertion( _repositoryState.getAction() == BlockLatticeBoltzmannBatchJobRepositoryState::Terminate ); #ifdef Parallel _gridContainer.restart( numberOfGridPoints,domainSize,computationalDomainOffset,neighbourRanks); #else _gridContainer.restart( numberOfGridPoints,domainSize,computationalDomainOffset); #endif _gridWithRegularBlockSolverAdapter.restart(domainSize,computationalDomainOffset); _gridWithInitialiseSpacetreeGridAdapter.restart(domainSize,computationalDomainOffset); _gridWithBlockCCAOutputAdapter.restart(domainSize,computationalDomainOffset); _gridWithDynamicRefinementForSpacetreeGridAdapter.restart(domainSize,computationalDomainOffset); _gridWithBlockVTKOutputAdapter.restart(domainSize,computationalDomainOffset); _gridWithRegularBlockSolverAndVTKOutputAdapter.restart(domainSize,computationalDomainOffset); logTraceOut( "restart(...)" ); }
void peanoclaw::parallel::MasterWorkerAndForkJoinCommunicator::sendSubgridBetweenMasterAndWorker( Patch& subgrid ) { logTraceInWith3Arguments("sendSubgridBetweenMasterAndWorker", subgrid, _position, _level); _subgridCommunicator.sendSubgrid(subgrid); logTraceOut("sendSubgridBetweenMasterAndWorker"); }
void peano::applications::faxen::lbf::mappings::RegularGrid2ComputeRightHandSide::destroyVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::faxen::lbf::RegularGridBlockVertex& vertex ) { logTraceInWith3Arguments( "destroyVertex()", x, h, vertex ); // @todo Insert your code here logTraceOut( "destroyVertex()" ); }
void peano::applications::heatequation::timestepping::mappings::RegularGrid2ApplyRefineDeleteCriterion::createBoundaryVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::heatequation::timestepping::RegularGridSingleStepVertex& vertex ) { logTraceInWith3Arguments( "createBoundaryVertex()", x, h, vertex ); // @todo Insert your code here logTraceOutWith1Argument( "createBoundaryVertex()", vertex ); }
void peano::applications::puregrid::mappings::RegularGrid2SetupGrid::createBoundaryVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::puregrid::RegularGridVertex& vertex ) { logTraceInWith3Arguments( "createBoundaryVertex()", x, h, vertex ); // @todo Insert your code here logTraceOutWith1Argument( "createBoundaryVertex()", vertex ); }
void peano::applications::faxen::mappings::RegularGrid2Initialize::createBoundaryVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::faxen::RegularGridVertex& vertex ) { logTraceInWith3Arguments( "createBoundaryVertex()", x, h, vertex ); vertex.init(); logTraceOutWith1Argument( "createBoundaryVertex()", vertex ); }
void peano::applications::faxen::mappings::RegularGrid2ComputeVelocities::createInnerVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::faxen::RegularGridVertex& vertex ) { logTraceInWith3Arguments( "createInnerVertex()", x, h, vertex ); // @todo Insert your code here logTraceOutWith1Argument( "createInnerVertex()", vertex ); }
void peano::applications::faxen::lbf::mappings::RegularGrid2BlockVTKOutput::destroyVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::faxen::lbf::RegularGridBlockVertex& vertex ) { logTraceInWith3Arguments( "destroyVertex()", x, h, vertex ); vertex.destroyVertex(); logTraceOut( "destroyVertex()" ); }
void peano::applications::faxen::lbf::mappings::RegularGrid2BlockVTKOutput::createBoundaryVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::faxen::lbf::RegularGridBlockVertex& vertex ) { logTraceInWith3Arguments( "createBoundaryVertex()", x, h, vertex ); vertex.createVertex(x,h); logTraceOutWith1Argument( "createBoundaryVertex()", vertex ); }
void peano::applications::faxen::lbf::mappings::RegularGrid2DynamicRefinementForSpacetreeGrid::destroyVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::faxen::lbf::RegularGridBlockVertex& vertex ) { logTraceInWith3Arguments( "destroyVertex()", x, h, vertex ); // @todo Insert your code here logTraceOut( "destroyVertex()" ); }
void peano::applications::navierstokes::prototype1::mappings::RegularGrid2UpdateVelocity::createBoundaryVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::navierstokes::prototype1::RegularGridFluidVertexEnhancedDivFreeEulerExplicit& vertex ) { logTraceInWith3Arguments( "createBoundaryVertex()", x, h, vertex ); // @todo Insert your code here logTraceOutWith1Argument( "createBoundaryVertex()", vertex ); }
void peano::applications::puregrid::mappings::RegularGrid2PerformOneRefinement::destroyVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::puregrid::RegularGridVertex& vertex ) { logTraceInWith3Arguments( "destroyVertex()", x, h, vertex ); // @todo Insert your code here logTraceOut( "destroyVertex()" ); }
void peano::applications::navierstokes::prototype1::mappings::RegularGrid2InitialiseScenario::destroyVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::navierstokes::prototype1::RegularGridFluidVertexEnhancedDivFreeEulerExplicit& vertex ) { logTraceInWith3Arguments( "destroyVertex()", x, h, vertex ); // @todo Insert your code here logTraceOut( "destroyVertex()" ); }
void peano::applications::heatequation::timestepping::mappings::RegularGrid2RestrictRhs::destroyVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::heatequation::timestepping::RegularGridSingleStepVertex& vertex ) { logTraceInWith3Arguments( "destroyVertex()", x, h, vertex ); // @todo Insert your code here logTraceOut( "destroyVertex()" ); }
void peano::applications::faxen::lbf::mappings::RegularGrid2MoveParticles::createBoundaryVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::faxen::lbf::RegularGridBlockVertex& vertex ) { logTraceInWith3Arguments( "createBoundaryVertex()", x, h, vertex ); // @todo Insert your code here logTraceOutWith1Argument( "createBoundaryVertex()", vertex ); }
void peano::applications::pic::demo2::mappings::RegularGrid2PlotSolution::createBoundaryVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::pic::demo2::RegularGridVertex& vertex ) { logTraceInWith3Arguments( "createBoundaryVertex()", x, h, vertex ); // @todo Insert your code here plotVertex( vertex, x ); logTraceOutWith1Argument( "createBoundaryVertex()", vertex ); }
void peanoclaw::mappings::Cleanup::prepareSendToNeighbour( peanoclaw::Vertex& vertex, int toRank, const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, int level ) { logTraceInWith3Arguments( "prepareSendToNeighbour(...)", vertex, toRank, level ); // @todo Insert your code here logTraceOut( "prepareSendToNeighbour(...)" ); }
void peano::applications::navierstokes::prototype1::mappings::RegularGrid2InitialiseScenario::createBoundaryVertex( const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, peano::applications::navierstokes::prototype1::RegularGridFluidVertexEnhancedDivFreeEulerExplicit& vertex ) { logTraceInWith3Arguments( "createBoundaryVertex()", x, h, vertex ); _scenarioHandler->initialiseBoundaryVertex(x, vertex); logTraceOutWith1Argument( "createBoundaryVertex()", vertex ); }
void peanoclaw::mappings::Cleanup::mergeWithRemoteDataDueToForkOrJoin( peanoclaw::Cell& localCell, const peanoclaw::Cell& masterOrWorkerCell, int fromRank, const tarch::la::Vector<DIMENSIONS,double>& cellCentre, const tarch::la::Vector<DIMENSIONS,double>& cellSize, int level ) { logTraceInWith3Arguments( "mergeWithRemoteDataDueToForkOrJoin(...)", localCell, masterOrWorkerCell, fromRank ); // @todo Insert your code here logTraceOut( "mergeWithRemoteDataDueToForkOrJoin(...)" ); }
void peanoclaw::parallel::MasterWorkerAndForkJoinCommunicator::receivePatch(int localCellDescriptionIndex) { logTraceInWith3Arguments("receivePatch", localCellDescriptionIndex, _position, _level); #ifdef Parallel std::vector<CellDescription> remoteCellDescriptionVector = CellDescriptionHeap::getInstance().receiveData(_remoteRank, _position, _level, _messageType); assertionEquals2(remoteCellDescriptionVector.size(), 1, _position, _level); CellDescription remoteCellDescription = remoteCellDescriptionVector[0]; assertion3(localCellDescriptionIndex >= 0, localCellDescriptionIndex, _position, _level); CellDescription localCellDescription = CellDescriptionHeap::getInstance().getData(localCellDescriptionIndex).at(0); #ifdef Asserts assertionNumericalEquals2(remoteCellDescription.getPosition(), localCellDescription.getPosition(), localCellDescription.toString(), remoteCellDescription.toString()); assertionNumericalEquals2(remoteCellDescription.getSize(), localCellDescription.getSize(), localCellDescription.toString(), remoteCellDescription.toString()); assertionEquals2(remoteCellDescription.getLevel(), localCellDescription.getLevel(), localCellDescription.toString(), remoteCellDescription.toString()); #endif //Load arrays and stores according indices in cell description if(remoteCellDescription.getUIndex() != -1) { remoteCellDescription.setUIndex(_subgridCommunicator.receiveDataArray()); } //Reset undesired values remoteCellDescription.setNumberOfTransfersToBeSkipped(0); //Copy remote cell description to local cell description deleteArraysFromPatch(localCellDescriptionIndex); remoteCellDescription.setCellDescriptionIndex(localCellDescriptionIndex); CellDescriptionHeap::getInstance().getData(localCellDescriptionIndex).at(0) = remoteCellDescription; assertionEquals(CellDescriptionHeap::getInstance().getData(localCellDescriptionIndex).size(), 1); Patch subgrid(localCellDescriptionIndex); subgrid.initializeNonParallelFields(); //TODO unterweg debug // std::cout << "Received cell description on rank " << tarch::parallel::Node::getInstance().getRank() // << " from rank " << _remoteRank << ": " << remoteCellDescription.toString() << std::endl << subgrid.toStringUNew() << std::endl; #if defined(AssertForPositiveValues) && defined(Asserts) if(subgrid.isLeaf() || subgrid.isVirtual()) { assertion4(!subgrid.containsNonPositiveNumberInUnknownInUNew(0), tarch::parallel::Node::getInstance().getRank(), _remoteRank, subgrid, subgrid.toStringUNew()); } #endif assertionEquals(CellDescriptionHeap::getInstance().getData(localCellDescriptionIndex).at(0).getCellDescriptionIndex(), localCellDescriptionIndex); #endif logTraceOut("receivePatch"); }
void peanoclaw::mappings::ValidateGrid::prepareSendToNeighbour( peanoclaw::Vertex& vertex, int toRank, const tarch::la::Vector<DIMENSIONS,double>& x, const tarch::la::Vector<DIMENSIONS,double>& h, int level ) { logTraceInWith3Arguments( "prepareSendToNeighbour(...)", vertex, toRank, level ); //TODO unterweg debug // std::cout << "Sending to neighbor " << tarch::parallel::Node::getInstance().getRank() // << " to " << toRank << " at " << x << " on level " << level << std::endl; logTraceOut( "prepareSendToNeighbour(...)" ); }
peanoclaw::parallel::MasterWorkerAndForkJoinCommunicator::MasterWorkerAndForkJoinCommunicator( int remoteRank, const tarch::la::Vector<DIMENSIONS,double>& position, int level, bool forkOrJoin ) : _subgridCommunicator( remoteRank, position, level, forkOrJoin ? peano::heap::ForkOrJoinCommunication : peano::heap::MasterWorkerCommunication, false, false ), _remoteRank(remoteRank), _position(position), _level(level), _messageType(forkOrJoin ? peano::heap::ForkOrJoinCommunication : peano::heap::MasterWorkerCommunication) { logTraceInWith3Arguments("MasterWorkerAndForkJoinCommunicator", remoteRank, position, level); logTraceOut("MasterWorkerAndForkJoinCommunicator"); }
double peano::toolbox::solver::Multigrid::computeContributionWeightOfInterGridTransfer( const tarch::la::Vector<DIMENSIONS,int>& currentCoarseGridVertex, const tarch::la::Vector<FIVE_POWER_D,double>& currentCoarseGridVertexsRestrictionMatrix, const tarch::la::Vector<DIMENSIONS,int>& fineGridPositionOfVertex ) { logTraceInWith3Arguments( "computeContributionWeightOfInterGridTransfer(...)", currentCoarseGridVertex, currentCoarseGridVertexsRestrictionMatrix, fineGridPositionOfVertex ); double result; tarch::la::Vector<DIMENSIONS,int> positionRelativeToKthCoarseVertex; bool isInfluencedByVertexK; int stencilEntry; getPositionIn5PowDStencilRelativeToKthCoarseVertex( currentCoarseGridVertex, fineGridPositionOfVertex, positionRelativeToKthCoarseVertex, stencilEntry, isInfluencedByVertexK ); if (isInfluencedByVertexK) { int baseOfGridVectorEntry = 1; int coarseGridVectorEntry = 0; for (int d=0; d<DIMENSIONS; d++) { coarseGridVectorEntry += currentCoarseGridVertex(d) * baseOfGridVectorEntry; baseOfGridVectorEntry *= 2; } _numberOfStencilEvaluations++; result = currentCoarseGridVertexsRestrictionMatrix(stencilEntry); } else { result = 0.0; } logTraceOutWith1Argument( "computeContributionWeightOfInterGridTransfer(...)", result ); return result; }
peano::applications::navierstokes::prototype2::repositories::PrototypeRepositoryForRegularGridStandardImplementation::PrototypeRepositoryForRegularGridStandardImplementation( peano::geometry::Geometry& geometry, const tarch::la::Vector<DIMENSIONS,int>& numberOfGridPoints, const tarch::la::Vector<DIMENSIONS,double>& domainSize, const tarch::la::Vector<DIMENSIONS,double>& computationalDomainOffset, const tarch::la::Vector<TWO_POWER_D_TIMES_TWO_POWER_D,int>& neighbourRanks ): #else peano::applications::navierstokes::prototype2::repositories::PrototypeRepositoryForRegularGridStandardImplementation::PrototypeRepositoryForRegularGridStandardImplementation( peano::geometry::Geometry& geometry, const tarch::la::Vector<DIMENSIONS,int>& numberOfGridPoints, const tarch::la::Vector<DIMENSIONS,double>& domainSize, const tarch::la::Vector<DIMENSIONS,double>& computationalDomainOffset ): #endif _geometry(geometry), _gridContainer(), _solverState(), _repositoryState() { logTraceIn( "peano::applications::navierstokes::prototype2::repositories::PrototypeRepositoryForRegularGridStandardImplementation(...)" ); #ifdef Parallel _gridContainer.restart( numberOfGridPoints,domainSize,computationalDomainOffset,neighbourRanks); #else _gridContainer.restart( numberOfGridPoints,domainSize,computationalDomainOffset); #endif _repositoryState.setAction( PrototypeRepositoryState::Terminate ); peano::kernel::datatraversal::autotuning::Oracle::getInstance().setNumberOfOracles(0); logTraceOut( "peano::applications::navierstokes::prototype2::repositories::PrototypeRepositoryForRegularGridStandardImplementation(...)" ); } peano::applications::navierstokes::prototype2::repositories::PrototypeRepositoryForRegularGridStandardImplementation::PrototypeRepositoryForRegularGridStandardImplementation( peano::geometry::Geometry& geometry ): _geometry(geometry), _gridContainer(), _solverState(), _repositoryState() { logTraceIn( "peano::applications::navierstokes::prototype2::repositories::PrototypeRepositoryForRegularGridStandardImplementation(Geometry&)" ); _repositoryState.setAction( PrototypeRepositoryState::Terminate ); peano::kernel::datatraversal::autotuning::Oracle::getInstance().setNumberOfOracles(0); logTraceOut( "peano::applications::navierstokes::prototype2::repositories::PrototypeRepositoryForRegularGridStandardImplementation(Geometry&)" ); } peano::applications::navierstokes::prototype2::repositories::PrototypeRepositoryForRegularGridStandardImplementation::~PrototypeRepositoryForRegularGridStandardImplementation() { assertion( _repositoryState.getAction() == PrototypeRepositoryState::Terminate ); } void peano::applications::navierstokes::prototype2::repositories::PrototypeRepositoryForRegularGridStandardImplementation::restart( const tarch::la::Vector<DIMENSIONS,int>& numberOfGridPoints, const tarch::la::Vector<DIMENSIONS,double>& domainSize, const tarch::la::Vector<DIMENSIONS,double>& computationalDomainOffset, const tarch::la::Vector<TWO_POWER_D_TIMES_TWO_POWER_D,int>& neighbourRanks ) { logTraceInWith3Arguments( "restart(...)", numberOfGridPoints, domainSize, computationalDomainOffset ); #ifdef Parallel assertion( !tarch::parallel::Node::getInstance().isMasterProcess()); #endif assertion( _repositoryState.getAction() == PrototypeRepositoryState::Terminate ); #ifdef Parallel _gridContainer.restart( numberOfGridPoints,domainSize,computationalDomainOffset,neighbourRanks); #else _gridContainer.restart( numberOfGridPoints,domainSize,computationalDomainOffset); #endif logTraceOut( "restart(...)" ); }