本文整理汇总了C++中UserInterface::writeHeader方法的典型用法代码示例。如果您正苦于以下问题:C++ UserInterface::writeHeader方法的具体用法?C++ UserInterface::writeHeader怎么用?C++ UserInterface::writeHeader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserInterface
的用法示例。
在下文中一共展示了UserInterface::writeHeader方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
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;
}
示例2: fluidSim
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;
}
示例3:
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;
}
示例4:
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;
}
示例5:
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;
}