int peano::applications::shallowwater::runners::ShallowWaterBatchJobRunnerForRegularGrid::runAsMaster(peano::applications::shallowwater::repositories::ShallowWaterBatchJobRepositoryForRegularGrid& repository) { UserInterface userInterface; userInterface.writeHeader(); // @todo Insert your code here // Start of dummy implementation repository.switchToSetupExperiment(); repository.iterate(); repository.switchToPlotSolution(); repository.iterate(); repository.switchToGodunovMethod(); for(int i = 1; i <= scenario::shallowwater::ShallowWaterScenarioService::getInstance().getScenario().getNumberOfTimeSteps(); i++) { repository.iterate(); if( scenario::shallowwater::ShallowWaterScenarioService::getInstance().getScenario().getOutputTimeDistance() > 0 && i % scenario::shallowwater::ShallowWaterScenarioService::getInstance().getScenario().getOutputTimeDistance() == 0 ) { repository.switchToPlotSolution(); repository.iterate(); repository.switchToGodunovMethod(); } } repository.logIterationStatistics(); repository.terminate(); // End of dummy implementation return 0; }
int peano::applications::navierstokes::prototype1::runners::PrototypeRunnerForRegularGrid::runAsMaster( peano::applications::navierstokes::prototype1::repositories::PrototypeRepositoryForRegularGrid& repository, peano::geometry::Geometry& geometry, const peano::applications::navierstokes::prototype1::configurations::PrototypeConfigurationForRegularGrid& configuration) { UserInterface userInterface; userInterface.writeHeader(); //fill up state repository.getState().setLGSMaxIterations( configuration.getMaximumLGSIterations()); repository.getState().setPlotterPlotDebugInfo(true); repository.getState().setScenarioRe(1.0); repository.getState().setScenarioEta(1.0); repository.getState().setScenarioRho(1.0); repository.getState().setScenarioCharacteristicLength(1.0); repository.getState().setOdeTimestepnumber(0); // repository.getState().setElementType(DivergenceFree); repository.getState().setElementType(Dlinear); //Instanz. FluidSimulation const bool useDivergenceCorrection = false; const double rTol = 1e-7; FluidSimulation fluidSim(useDivergenceCorrection, rTol, configuration.plotVTKFiles(), repository); //Zeitschleife (spaeter: ode instanz) int numberOfTimeSteps = configuration.getNumberOfTimesteps(); double tau = 0.00001; double time = 0.0; const bool hasVariableTimeStepSize = false; //in state??? const double elapsedCPUTimePerStep = tarch::la::PI; const bool shallOutputBePlotted = true; //in state??? // const std::string outputPath = "./"; // geht nicht in state wegen string nicht in dastgen! const double dummyValue = -1.0; fluidSim.implementSetInitialValue(hasVariableTimeStepSize, time, dummyValue, dummyValue); for (int i = 1; i <= numberOfTimeSteps; i++) { repository.getState().setOdeTimestepnumber(i); repository.getState().setOdeTime(time); repository.getState().setOdeTau(tau); fluidSim.implementBeginTimeStep(); fluidSim.implementDerivativeAndUpdate(); time += tau; std::ostringstream msg; msg << "./testVtk." << i << ".vtk"; std::string timeStepNumberWithLeadingZeros = msg.str(); fluidSim.implementEndTimeStep(hasVariableTimeStepSize, elapsedCPUTimePerStep, shallOutputBePlotted, timeStepNumberWithLeadingZeros); } userInterface.writeDatatypeStatistics< RegularGridFluidVertexEnhancedDivFreeEulerExplicit, RegularGridFluidCellEnhancedDivFreeEulerExplicit, RegularGridFluidStateEnhancedDivFreeEulerExplicit> (); repository.logIterationStatistics(); repository.terminate(); return 0; }
int peano::applications::poisson::vhhjacobi::runners::JacobiBatchJobRunnerForRegularGrid::runAsMaster(peano::applications::poisson::vhhjacobi::repositories::JacobiBatchJobRepositoryForRegularGrid& repository) { UserInterface userInterface; userInterface.writeHeader(); repository.switchToSetupExperiment(); repository.iterate(); repository.switchToJacobiStepAndPlotSolution(); for (int i=0; i<20; i++) { repository.iterate(); } repository.logIterationStatistics(); repository.terminate(); return 0; }
int peano::applications::pic::demo2::runners::PICBatchJobRunnerForRegularGrid::runAsMaster(peano::applications::pic::demo2::repositories::PICBatchJobRepositoryForRegularGrid& repository) { UserInterface userInterface; userInterface.writeHeader(); // @todo Insert your code here // Start of dummy implementation repository.switchToSetupExperimentAndPlot(); repository.iterate(); repository.logIterationStatistics(); repository.terminate(); // End of dummy implementation return 0; }
int peano::applications::faxen::lbf::runners::LBFBatchJobRunnerForSpacetreeGrid::runAsMaster(peano::applications::faxen::lbf::repositories::LBFBatchJobRepositoryForSpacetreeGrid& repository) { UserInterface userInterface; userInterface.writeHeader(); // @todo Insert your code here // Start of dummy implementation repository.switchToInitialize(); repository.iterate(); repository.switchToInitializeAndSetBoundary(); repository.iterate(); repository.switchToPlotGrid(); repository.iterate(); repository.switchToControlTimeStep(); repository.iterate(); repository.switchToSetVelocitiesBoundary(); repository.iterate(); repository.switchToSetScenarioBoundary(); repository.iterate(); repository.switchToComputeVelocitiesDerivatives(); repository.iterate(); repository.switchToComputeRightHandSide(); repository.iterate(); repository.switchToSetZeroPressureBoundary(); repository.iterate(); repository.switchToSetPressureBoundary(); repository.iterate(); repository.switchToSORStep(); repository.iterate(); repository.switchToComputeResidualNorm(); repository.iterate(); repository.switchToComputeVelocities(); repository.iterate(); repository.switchToPlotSolution(); repository.iterate(); repository.switchToRegularBlockSolverAdapter(); repository.iterate(); repository.switchToInitialiseSpacetreeGridAdapter(); repository.iterate(); repository.switchToBlockCCAOutputAdapter(); repository.iterate(); repository.switchToDynamicRefinementForSpacetreeGridAdapter(); repository.iterate(); repository.switchToBlockVTKOutputAdapter(); repository.iterate(); repository.switchToRegularBlockSolverAndVTKOutputAdapter(); repository.iterate(); repository.logIterationStatistics(); repository.terminate(); // End of dummy implementation return 0; }