mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Be verbose only when compiled with -DDEBUG
This commit is contained in:
parent
e1e289dc1e
commit
5333a2430f
@ -23,6 +23,17 @@ void test_milu0(M& A)
|
|||||||
diagonal.reset(new std::vector<typename M::block_type>());
|
diagonal.reset(new std::vector<typename M::block_type>());
|
||||||
|
|
||||||
Opm::detail::milu0_decomposition(ILU, diagonal.get());
|
Opm::detail::milu0_decomposition(ILU, diagonal.get());
|
||||||
|
#ifdef DEBUG
|
||||||
|
if ( A.N() < 11)
|
||||||
|
{
|
||||||
|
Dune::printmatrix(std::cout, ILU, "ILU", "row");
|
||||||
|
std::cout << "Diagonal: ";
|
||||||
|
|
||||||
|
for (const auto& d : *diagonal)
|
||||||
|
std::cout << d << " ";
|
||||||
|
std::cout<<std::endl;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
Dune::BlockVector<Dune::FieldVector<typename M::field_type, M::block_type::rows>> e(A.N()), x1(A.N()), x2(A.N()), t(A.N());
|
Dune::BlockVector<Dune::FieldVector<typename M::field_type, M::block_type::rows>> e(A.N()), x1(A.N()), x2(A.N()), t(A.N());
|
||||||
e = 1;
|
e = 1;
|
||||||
A.mv(e, x1);
|
A.mv(e, x1);
|
||||||
@ -143,7 +154,9 @@ void test()
|
|||||||
Dune::BCRSMatrix<Dune::FieldMatrix<double, bsize, bsize> > A;
|
Dune::BCRSMatrix<Dune::FieldMatrix<double, bsize, bsize> > A;
|
||||||
setupLaplacian(A, N);
|
setupLaplacian(A, N);
|
||||||
test_milu0(A);
|
test_milu0(A);
|
||||||
|
#ifdef DEBUG
|
||||||
std::cout<< "Tested block size "<< bsize<<std::endl;
|
std::cout<< "Tested block size "<< bsize<<std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(MILULaplace1)
|
BOOST_AUTO_TEST_CASE(MILULaplace1)
|
||||||
|
Loading…
Reference in New Issue
Block a user