Commit a78f2abb authored by Marcel Koch's avatar Marcel Koch
Browse files

simplify empty matrix test & reduce clutter output

parent 942466c1
......@@ -435,7 +435,7 @@ class GinkgoCGSolver : public Solver< OperatorType >
{
auto [start, end] = local_range( num_local_dofs, comm_ );
part_ = gko::share( gko::distributed::Partition<>::build_from_local_range( host_exec_, start, end, comm_ ) );
if ( printInfo_ )
if ( printInfo_ && num_local_dofs )
{
WALBERLA_LOG_INFO( "[Ginkgo CG] Rank " << rank << " -> local size: " << num_local_dofs << " local range: " << start
<< "-" << end );
......@@ -508,7 +508,7 @@ class GinkgoCGSolver : public Solver< OperatorType >
host_matrix_->convert_to( gko::lend( matrix_ ) );
x.getStorage()->getTimingTree()->stop( "Ginkgo CG matrix-gather" );
if ( matrix_->get_size()[0] > 0 && matrix_->get_size()[1] > 0 )
if ( matrix_->get_size() )
{
auto old_buffer = std::cout.rdbuf();
std::ofstream dev_null( "/dev/null" );
......@@ -540,7 +540,7 @@ class GinkgoCGSolver : public Solver< OperatorType >
x.getStorage()->getTimingTree()->stop( "Ginkgo CG Solver gather" );
x.getStorage()->getTimingTree()->start( "Ginkgo CG Solver Apply" );
if ( matrix_->get_size()[0] > 0 && matrix_->get_size()[1] > 0 )
if ( matrix_->get_size() )
{
solver_->apply( gko::lend( global_rhs ), gko::lend( global_x0 ) );
}
......
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