[Dune] Code parts in comments in dune/istl/paamg/test/anisotropic.hh

Christoph GrĂ¼ninger christoph.grueninger at iws.uni-stuttgart.de
Thu Apr 19 09:18:42 CEST 2012


Hi,
in dune/istl/paamg/test/anisotropic.hh in the lines 140f and 165 (see 
code excerpt below) some code is hidden in a comment and replaced by 0. 
I think this was not intended because it makes the functions more or 
less useless. Activating the code did not break the test for me.
The comments were added in commit r866 by Markus, the commit message 
states that he was syncing his current code with trunk. Maybe this two 
changes slipped in unintended?
Can I uncomment the code and remove the zeros?

Greets
Christoph


template<int BS, class T, class G, class L, int s>
void setBoundary(Dune::BlockVector<Dune::FieldVector<T,BS> >& lhs,
		 Dune::BlockVector<Dune::FieldVector<T,BS> >& rhs,
		 const G& n, Dune::ParallelIndexSet<G,L,s>& indices)
{
   typedef typename Dune::ParallelIndexSet<G,L,s>::const_iterator Iter;
   for(Iter i=indices.begin(); i != indices.end(); ++i){
     G x = i->global()/n;
     G y = i->global()%n;

     if(x==0 || y ==0 || x==n-1 || y==n-1){
       //double h = 1.0 / ((double) (n-1));
       lhs[i->local()]=rhs[i->local()]=0;//((double)x)*((double)y)*h*h;
     }
   }
}

template<int BS, class T, class G>
void setBoundary(Dune::BlockVector<Dune::FieldVector<T,BS> >& lhs,
		 Dune::BlockVector<Dune::FieldVector<T,BS> >& rhs,
		 const G& N)
{
   for(int j=0; j < N; ++j)
     for(int i=0; i < N; i++)
     if(i==0 || j ==0 || i==N-1 || j==N-1){
       T h = 1.0 / ((double) (N-1));
       T x, y;
       if(i==N-1)
	x=1;
       else
	x = ((T) i)*h;
       if(j==N-1)
	y = 1;
       else
	y = ((T) j)*h;

       lhs[j*N+i]=rhs[j*N+i]=0;//x*y;
     }
}




More information about the Dune mailing list