diff --git a/istl/paamg/aggregates.hh b/istl/paamg/aggregates.hh index 65b05f6a8dd4defebeec9a2a7b9fce37272329ea..b086b5f15f8efb6f7b2800a02204ace7daf827c3 100644 --- a/istl/paamg/aggregates.hh +++ b/istl/paamg/aggregates.hh @@ -6,6 +6,7 @@ #include "graph.hh" #include "properties.hh" +#include <dune/common/stdstreams.hh> #include <dune/common/poolallocator.hh> #include <dune/common/sllist.hh> #include <set> @@ -1543,7 +1544,7 @@ namespace Dune inline bool Aggregator<G>::admissible(const Vertex& vertex, int aggregate, const AggregatesMap<Vertex>& aggregates) const { // Todo - std::cerr<<" Admissible not yet implemented!"<<std::endl; + Dune::dverb<<" Admissible not yet implemented!"<<std::endl; return true; } @@ -1725,8 +1726,8 @@ namespace Dune break; // Debugging output - if(c.debugLevel()==1 && (noAggregates+1)%10000 == 0) - std::cout<<"c"; + if((noAggregates+1)%10000 == 0) + Dune::dverb<<"c"; aggregate_->seed(seed); @@ -1798,17 +1799,14 @@ namespace Dune else conAggregates++; } - std::cout<<"size"<<aggregate_->size()<<" "; unmarkFront(); markFront(aggregates); seedFromFront(stack_, graph.getVertexProperties(seed).isolated()); unmarkFront(); } - if(c.debugLevel()>2) { - std::cout<<"connected aggregates: "<<conAggregates; - std::cout<<" isolated aggregates: "<<isoAggregates<<std::endl; - } + Dune::dinfo<<"connected aggregates: "<<conAggregates; + Dune::dinfo<<" isolated aggregates: "<<isoAggregates<<std::endl; delete aggregate_; return conAggregates+isoAggregates; @@ -1823,8 +1821,8 @@ namespace Dune int count=0; for(Iterator vertex=front_.begin(); vertex != end; ++vertex,++count) stack_.push(*vertex); - if(count==0) - std::cerr<< " no vertices pushed!"<<std::endl; + if(MINIMAL_DEBUG_LEVEL>=4) + Dune::dwarn<< " no vertices pushed!"<<std::endl; } template<class G> @@ -1838,7 +1836,7 @@ namespace Dune template<class G> Aggregator<G>::Stack::~Stack() { - std::cout << "Max stack size was "<<maxSize_<<" filled="<<filled_<<std::endl; + Dune::dvverb << "Max stack size was "<<maxSize_<<" filled="<<filled_<<std::endl; delete[] vals_; } diff --git a/istl/paamg/dependency.hh b/istl/paamg/dependency.hh index 719e397a0ddc49f8086f28000505f29c34e2c0f8..fe72e8825454a39538d64e92817528e430d9dadf 100644 --- a/istl/paamg/dependency.hh +++ b/istl/paamg/dependency.hh @@ -6,7 +6,7 @@ #include <bitset> -#include <iostream> +#include <ostream> #include "graph.hh" #include "properties.hh" diff --git a/istl/paamg/galerkin.hh b/istl/paamg/galerkin.hh index a21ae41d38fa947922861e8849dd31076cc2a294..d6a5a0a355e9c5ac18adc51f0a60f7ecd8eace39 100644 --- a/istl/paamg/galerkin.hh +++ b/istl/paamg/galerkin.hh @@ -413,7 +413,6 @@ namespace Dune // Skip isolated vertices if(aggregates[index->local()] != AggregatesMap<typename G::VertexDescriptor>::ISOLATED) { if(overlap.contains(index->local().attribute())) { - std::cout<<"Overlap"<<std::endl; constructOverlapConnectivity(connected, graph, visitedMap, aggregates, overlapVertices); }else{ constructConnectivity(connected, graph, visitedMap, aggregates, index->local()); @@ -539,9 +538,8 @@ namespace Dune int procs; MPI_Comm_size(MPI_COMM_WORLD, &procs); - if(procs > 1) - std::cerr <<"Process borders should be set to dirichlet borders"<<std::endl; +#warning "Galerkin: Process borders should be set to dirichlet borders" } diff --git a/istl/paamg/graph.hh b/istl/paamg/graph.hh index 1b86cd8ec1661a1d7d4af97a07ba676602b8f8aa..ec7b1076f201008b581f2a38c0fe6fe3c565bedc 100644 --- a/istl/paamg/graph.hh +++ b/istl/paamg/graph.hh @@ -4,7 +4,6 @@ #ifndef DUNE_AMG_GRAPH_HH #define DUNE_AMG_GRAPH_HH -#include <iostream> #include <cstddef> #include <algorithm> #include <vector> diff --git a/istl/paamg/hierarchy.hh b/istl/paamg/hierarchy.hh index f2fd776e391a17dee9c9bd1105ced8b26723ab93..3ff80828a5781a1504055907570a91afb1a7f7d4 100644 --- a/istl/paamg/hierarchy.hh +++ b/istl/paamg/hierarchy.hh @@ -10,6 +10,7 @@ #include "aggregates.hh" #include "graph.hh" #include "galerkin.hh" +#include <dune/common/stdstreams.hh> #include <dune/istl/bvector.hh> #include <dune/istl/indexset.hh> #include <dune/istl/remoteindices.hh> @@ -489,8 +490,7 @@ namespace Dune int noAggregates = aggregatesMap->buildAggregates(mlevel->matrix(), pg, criterion); if(noAggregates < criterion.coarsenTarget() && procs>1) { - std::cerr<<"Accumulation to fewer processes not yet implemented!"<<std::endl; - throw "Not implemented!"; + DUNE_THROW(NotImplemented, "Accumulation to fewer processes not yet implemented!"); } ParallelIndexSet* coarseIndices = new ParallelIndexSet(); @@ -569,7 +569,6 @@ namespace Dune for(Iterator level=matrices_.coarsest(), finest=matrices_.finest(); level != finest; --level, ++amap) { delete *amap; - std::cout<<&(*level)<<std::endl; /* if(level.isRedistributed()){ ParallelMatrix& mat = level.getRedistributed(); @@ -592,12 +591,12 @@ namespace Dune typedef typename ParallelMatrixHierarchy::ConstIterator Iterator; Iterator coarsest = matrices_.coarsest(); int level=0; - std::cout<<"Level "<<level<<" has "<<matrices_.finest()->matrix().N()<<" unknows!"<<std::endl; + Dune::dverb<<"Level "<<level<<" has "<<matrices_.finest()->matrix().N()<<" unknows!"<<std::endl; for(Iterator matrix = matrices_.finest(); matrix != coarsest;) { ++matrix; ++level; - std::cout<<"Level "<<level<<" has "<<matrix->matrix().N()<<" unknows!"<<std::endl; + Dune::dverb<<"Level "<<level<<" has "<<matrix->matrix().N()<<" unknows!"<<std::endl; hierarchy.addCoarser(matrix->matrix().N()); } } @@ -614,7 +613,6 @@ namespace Dune Iterator coarsest = matrices_.coarsest(); int level=0; for(Iterator matrix = matrices_.finest(); matrix != coarsest; ++matrix) { - std::cout<<"level "<<level++<<" "<<&matrix->matrix(); cargs.setMatrix(matrix->matrix()); smoothers.addCoarser(cargs); } diff --git a/istl/paamg/smoother.hh b/istl/paamg/smoother.hh index 338bb6058d58b820cdc9afebc1db20da5b7cf9a6..e187d95309378362ef88047c0ba6c4729a4a6144 100644 --- a/istl/paamg/smoother.hh +++ b/istl/paamg/smoother.hh @@ -3,7 +3,6 @@ #ifndef DUNE_AMGSMOOTHER_HH #define DUNE_AMGSMOOTHER_HH -#include <iostream> #include <dune/istl/paamg/construction.hh> #include <dune/istl/preconditioners.hh> namespace Dune @@ -77,9 +76,7 @@ namespace Dune public: void setMatrix(const Matrix& matrix) { - std::cout<<"Setting matrix "<<&matrix<<" size="<<matrix.N()<<std::endl; matrix_=&matrix; - std::cout<<"Matrix "<<matrix_<<" size="<<matrix_->N()<<std::endl; } void setArgs(const DefaultSmootherArgs<T>& args)