Skip to content

Commit ab79a98

Browse files
committed
Add RS-coarsening tests
1 parent 037b9ef commit ab79a98

3 files changed

Lines changed: 174 additions & 371 deletions

File tree

core/multigrid/rs.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ void Rs<ValueType, IndexType>::generate()
115115
exec->run(rs::make_fill_seq_array(restrict_op->get_row_ptrs(),
116116
coarse_dim_size + 1));
117117

118-
auto prolong_op = gko::as<csr_type>(share(restrict_op->transpose()));
118+
auto prolong_op = gko::as<csr_type>(
119+
share(restrict_op->transpose())); // is that correct? or should we use
120+
// some interpolation to compute the
121+
// prolongation operator?
119122

120123
//
121124
auto coarse_matrix = share(

reference/multigrid/rs_kernels.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ void compute_soc_row_ptrs(std::shared_ptr<const ReferenceExecutor> exec,
5252
for (IndexType jj = a_row_ptrs[i]; jj < a_row_ptrs[i + 1]; ++jj) {
5353
const auto j = a_col_idxs[jj];
5454
if (j != i) {
55+
// assuming an M-matrix
5556
max_offdiag = std::max(max_offdiag, -real(a_vals[jj]));
5657
}
5758
}

0 commit comments

Comments
 (0)