#pragma once #include "ProblemInstat.hpp" #include #include #include namespace AMDiS { template void ProblemInstat::transferInitialSolution(AdaptInfo& adaptInfo) { AMDIS_FUNCNAME("ProblemInstat::transferInitialSolution()"); test_exit(adaptInfo.time() == adaptInfo.startTime(), "after initial solution: time != start time"); problemStat_->writeFiles(adaptInfo, true); } template void ProblemInstat::closeTimestep(AdaptInfo& adaptInfo) { bool force = (adaptInfo.time() >= adaptInfo.endTime()); problemStat_->writeFiles(adaptInfo, force); } template void ProblemInstat::initialize(Flag initFlag) { // create vector for old solution if (initFlag.isSet(INIT_UH_OLD)) createUhOld(); } template void ProblemInstat::createUhOld() { AMDIS_FUNCNAME("ProblemInstat::createUhOld()"); if (oldSolution_) warning("oldSolution already created\n"); else // create oldSolution oldSolution_.reset(new SystemVector(*problemStat_->globalBasis(), INTERPOLATE)); } template void ProblemInstat::initTimestep(AdaptInfo&) { if (oldSolution_) *oldSolution_ = *problemStat_->solutionVector(); } } // end namespace AMDiS