Skip to content
Snippets Groups Projects

Some small modernizations

Merged oliver.sander_at_tu-dresden.de requested to merge some-small-modernizations into master
2 files
+ 18
19
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -62,7 +62,6 @@ setup(const typename BasisType::GridView::Grid& grid,
baseTolerance_ = baseTolerance;
damping_ = damping;
int numLevels = grid_->maxLevel()+1;
const auto dim = VectorType::value_type::dimension;
#if HAVE_DUNE_PARMG
@@ -289,6 +288,8 @@ setup(const typename BasisType::GridView::Grid& grid,
isP1Basis = std::is_same<Basis,Dune::Functions::LagrangeBasis<typename Basis::GridView, 1> >::value;
}
int numLevels = grid_->maxLevel()+1;
using TransferOperatorType = typename TruncatedCompressedMGTransfer<CorrectionType>::TransferOperatorType;
std::vector<std::shared_ptr<TruncatedCompressedMGTransfer<CorrectionType>>> transferOperators(isP1Basis ? numLevels-1 : numLevels);
@@ -550,16 +551,12 @@ void TrustRegionSolver<BasisType,VectorType>::solve()
if (correctionInfinityNorm < this->tolerance_) {
if (this->verbosity_ == NumProc::FULL and rank==0)
std::cout << "CORRECTION IS SMALL ENOUGH" << std::endl;
if (this->verbosity_ != NumProc::QUIET and rank==0)
std::cout << i+1 << " trust-region steps were taken." << std::endl;
break;
}
if (trustRegion.radius() < this->tolerance_) {
if (this->verbosity_ == NumProc::FULL and rank==0)
std::cout << "TRUST REGION RADIUS IS TOO SMALL, SMALLER THAN TOLERANCE, STOPPING NOW" << std::endl;
{
if (correctionInfinityNorm < trustRegion.radius())
std::cout << "CORRECTION IS SMALL ENOUGH" << std::endl;
else
std::cout << "TRUST-REGION UNDERFLOW!" << std::endl;
}
if (this->verbosity_ != NumProc::QUIET and rank==0)
std::cout << i+1 << " trust-region steps were taken." << std::endl;
Loading