Commit 23d94ffb authored by Christoph Grüninger's avatar Christoph Grüninger

[tests] Catch Dune exceptions to ease identifying problems.

parent 0ec96232
......@@ -165,8 +165,8 @@ void testAMG(int N, int coarsenTarget, int ml)
int main(int argc, char** argv)
try
{
int N=100;
int coarsenTarget=1200;
int ml=10;
......@@ -182,5 +182,10 @@ int main(int argc, char** argv)
testAMG<1>(N, coarsenTarget, ml);
testAMG<2>(N, coarsenTarget, ml);
}
catch (Dune::Exception &e)
{
std::cerr << "Dune reported error: " << e << std::endl;
}
catch (...)
{}
......@@ -29,10 +29,8 @@ void randomize(const M& mat, V& b)
template <int BS>
void testAMG(int N, int coarsenTarget, int ml)
{
std::cout<<"N="<<N<<" coarsenTarget="<<coarsenTarget<<" maxlevel="<<ml<<std::endl;
typedef Dune::ParallelIndexSet<int,LocalIndex,512> ParallelIndexSet;
ParallelIndexSet indices;
......@@ -110,8 +108,8 @@ void testAMG(int N, int coarsenTarget, int ml)
int main(int argc, char** argv)
try
{
int N=100;
int coarsenTarget=1200;
int ml=10;
......@@ -127,5 +125,10 @@ int main(int argc, char** argv)
testAMG<1>(N, coarsenTarget, ml);
testAMG<2>(N, coarsenTarget, ml);
}
catch (Dune::Exception &e)
{
std::cerr << "Dune reported error: " << e << std::endl;
}
catch (...)
{}
......@@ -35,6 +35,7 @@ typedef std::complex<double> FIELD_TYPE;
#endif
int main(int argc, char** argv)
try
{
const int BS=1;
std::size_t N=100;
......@@ -80,3 +81,9 @@ int main(int argc, char** argv)
solver1.apply(x,b, res);
solver1.apply(reinterpret_cast<FIELD_TYPE*>(&x[0]), reinterpret_cast<FIELD_TYPE*>(&b[0]));
}
catch (Dune::Exception &e)
{
std::cerr << "Dune reported error: " << e << std::endl;
}
catch (...)
{}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment