9#include <kernel/global/vector.hpp>
10#include <kernel/global/matrix.hpp>
11#include <kernel/lafem/dense_vector.hpp>
12#include <kernel/lafem/dense_vector_blocked.hpp>
13#include <kernel/lafem/sparse_matrix_csr.hpp>
14#include <kernel/lafem/sparse_matrix_bcsr.hpp>
15#include <kernel/lafem/sparse_matrix_cscr.hpp>
16#include <kernel/util/stop_watch.hpp>
29 template<
typename MatrixB_,
typename MatrixD_>
57 template<
typename DT_,
typename IT_,
int dim_,
typename MirrorV_,
typename MirrorP_>
59 Global::
Matrix<LAFEM::SparseMatrixBCSR<DT_, IT_, dim_, 1>, MirrorV_, MirrorP_>,
60 Global::Matrix<LAFEM::SparseMatrixBCSR<DT_, IT_, 1, dim_>, MirrorP_, MirrorV_>>
64 typedef IT_ IndexType;
65 static constexpr int dim = dim_;
67 typedef MirrorV_ MirrorTypeV;
68 typedef MirrorP_ MirrorTypeP;
100 static constexpr bool is_global =
true;
101 static constexpr bool is_local =
false;
237 _diagonal_a(diagonal_a),
309 watch_init_symbolic.
reset();
310 watch_init_sym_matrix_loc.
reset();
311 watch_init_sym_pres_mirror.
reset();
312 watch_init_sym_reduced_b.
reset();
313 watch_init_sym_data_mirror.
reset();
314 watch_init_sym_neighbor_s.
reset();
315 watch_init_numeric.
reset();
316 watch_init_num_matrix_loc.
reset();
317 watch_init_num_gather_b.
reset();
318 watch_init_num_premult_da.
reset();
319 watch_init_num_neighbor_s.
reset();
321 watch_apply_matrix_loc.
reset();
322 watch_apply_neighbor_s.
reset();
335 static constexpr std::size_t nt = 14;
336 double tsum[nt], tmax[nt], tloc[nt] =
339 watch_init_sym_matrix_loc.
elapsed(),
340 watch_init_sym_pres_mirror.
elapsed(),
341 watch_init_sym_reduced_b.
elapsed(),
342 watch_init_sym_data_mirror.
elapsed(),
343 watch_init_sym_neighbor_s.
elapsed(),
345 watch_init_num_matrix_loc.
elapsed(),
346 watch_init_num_gather_b.
elapsed(),
347 watch_init_num_premult_da.
elapsed(),
348 watch_init_num_neighbor_s.
elapsed(),
350 watch_apply_matrix_loc.
elapsed(),
351 watch_apply_neighbor_s.
elapsed()
354 this->get_comm()->allreduce(tloc, tsum, nt,
Dist::op_sum);
355 this->get_comm()->allreduce(tloc, tmax, nt,
Dist::op_max);
359 const double ds = 1.0 / double(this->get_comm()->size());
360 for(std::size_t i(0); i < nt; ++i)
365 s +=
String(34,
' ') +
"Mean Time Max Time\n";
366 s += _fmt_time(tsum[0], tmax[0],
"Total Symbolic Initialization");
367 s += _fmt_time(tsum[0], tmax[0], tsum[1], tmax[1],
"Local Schur Matrix Structure");
368 s += _fmt_time(tsum[0], tmax[0], tsum[2], tmax[2],
"Pressure Mirror");
369 s += _fmt_time(tsum[0], tmax[0], tsum[3], tmax[3],
"Reduced-B Matrix Structure");
370 s += _fmt_time(tsum[0], tmax[0], tsum[4], tmax[4],
"Reduced-B Data Mirror");
371 s += _fmt_time(tsum[0], tmax[0], tsum[5], tmax[5],
"Neighbor Matrix Structure");
372 double tsym_other_sum = tsum[0] - tsum[1] - tsum[2] - tsum[3] - tsum[4] - tsum[5];
373 double tsym_other_max = tmax[0] - tmax[1] - tmax[2] - tmax[3] - tmax[4] - tmax[5];
374 s += _fmt_time(tsum[0], tmax[0], tsym_other_sum, tsym_other_max,
"Other Symbolic");
376 s += _fmt_time(tsum[6], tmax[6],
"Total Numeric Initialization");
377 s += _fmt_time(tsum[6], tmax[6], tsum[7], tmax[7],
"Local Schur Matrix Values");
378 s += _fmt_time(tsum[6], tmax[6], tsum[8], tmax[8],
"Reduced-B Gather");
379 s += _fmt_time(tsum[6], tmax[6], tsum[9], tmax[9],
"Pre-Multiply D*A");
380 s += _fmt_time(tsum[6], tmax[6], tsum[10], tmax[10],
"Neighbor Matrix Values");
381 double tnum_other_sum = tsum[6] - tsum[7] - tsum[8] - tsum[9] - tsum[10];
382 double tnum_other_max = tmax[6] - tmax[7] - tmax[8] - tmax[9] - tmax[10];
383 s += _fmt_time(tsum[6], tmax[6], tnum_other_sum, tnum_other_max,
"Other Numeric");
385 s += _fmt_time(tsum[11], tmax[11],
"Total Matrix Apply");
386 s += _fmt_time(tsum[11], tmax[11], tsum[12], tmax[12],
"Local Schur Matrix");
387 s += _fmt_time(tsum[11], tmax[11], tsum[13], tmax[13],
"Neighbor Schur Matrix");
388 double tapp_other_sum = tsum[11] - tsum[12] - tsum[13];
389 double tapp_other_max = tmax[11] - tmax[12] - tmax[13];
390 s += _fmt_time(tsum[11], tmax[11], tapp_other_sum, tapp_other_max,
"Other Apply");
425 watch_init_symbolic.
start();
434 XASSERTM(gate_p->
_ranks.empty(),
"pressure space is not discontinuous");
438 watch_init_sym_matrix_loc.
start();
445 watch_init_sym_matrix_loc.
stop();
452 this->_ranks = gate_v->
_ranks;
455 const std::size_t num_neighs = this->_ranks.size();
456 if(num_neighs <= std::size_t(0))
458 watch_init_symbolic.
stop();
466 this->_pres_mirrors.resize(num_neighs);
467 this->_data_mirrors.resize(num_neighs);
468 this->_neighbor_graphs.resize(num_neighs);
469 this->_neighbor_matrices.resize(num_neighs);
472 std::vector<Adjacency::Graph> my_graphs(num_neighs);
475 for(std::size_t i(0); i < num_neighs; ++i)
478 const MirrorTypeV& mirror_v = gate_v->
_mirrors.at(i);
481 watch_init_sym_pres_mirror.
start();
482 MirrorTypeP& mirror_p = this->_pres_mirrors.at(i);
483 this->_asm_pres_mirror(mirror_p, mirror_v, this->_matrix_b.
local());
484 watch_init_sym_pres_mirror.
stop();
487 watch_init_sym_reduced_b.
start();
488 my_graphs.at(i) = this->_asm_reduced_b( mirror_p, mirror_v, this->_matrix_b.
local());
489 watch_init_sym_reduced_b.
stop();
492 watch_init_sym_data_mirror.
start();
493 this->_data_mirrors.at(i) = this->_asm_data_mirror(mirror_p, mirror_v, this->_matrix_b.
local(), my_graphs.at(i));
494 watch_init_sym_data_mirror.
stop();
498 std::vector<std::array<Index,3>> recv_dims(num_neighs), send_dims(num_neighs);
502 for(std::size_t i(0); i < num_neighs; ++i)
504 recv_reqs[i] = comm.
irecv(recv_dims.at(i).data(), std::size_t(3), this->_ranks.at(i));
508 for(std::size_t i(0); i < num_neighs; ++i)
511 auto& sdim = send_dims.at(i);
512 sdim[0] = g.get_num_nodes_domain();
513 sdim[1] = g.get_num_nodes_image();
515 send_reqs[i] = comm.
isend(sdim.data(), std::size_t(3), this->_ranks.at(i));
519 for(std::size_t i(0u); recv_reqs.wait_any(i); )
522 auto& rdim = recv_dims.at(i);
532 for(std::size_t i(0); i < num_neighs; ++i)
534 recv_reqs[i] = comm.
irecv(this->_neighbor_graphs.at(i).get_domain_ptr(),
535 recv_dims.at(i)[0] + std::size_t(1), this->_ranks.at(i));
542 for(std::size_t i(0); i < num_neighs; ++i)
544 send_reqs[i] = comm.
isend(my_graphs.at(i).get_domain_ptr(),
545 send_dims.at(i)[0] + std::size_t(1), this->_ranks.at(i));
549 recv_reqs.wait_all();
552 for(std::size_t i(0); i < num_neighs; ++i)
554 recv_reqs[i] = comm.
irecv(this->_neighbor_graphs.at(i).get_image_idx(),
555 recv_dims.at(i)[2], this->_ranks.at(i));
562 for(std::size_t i(0); i < num_neighs; ++i)
564 send_reqs[i] = comm.
isend(my_graphs.at(i).get_image_idx(), send_dims.at(i)[2], this->_ranks.at(i));
568 recv_reqs.wait_all();
574 for(std::size_t i(0); i < num_neighs; ++i)
576 watch_init_sym_neighbor_s.
start();
587 watch_init_sym_neighbor_s.
stop();
591 watch_init_symbolic.
stop();
607 watch_init_numeric.
start();
610 watch_init_num_matrix_loc.
start();
612 _asm_local_schur_matrix(this->_matrix_s, this->_matrix_d.
local(), this->_diagonal_a.local(), this->_matrix_b.local());
613 watch_init_num_matrix_loc.
stop();
616 const std::size_t num_neighs = this->_ranks.size();
617 if(num_neighs <= std::size_t(0))
619 watch_init_numeric.
stop();
627 std::vector<BufferVectorType> recv_bufs(num_neighs), send_bufs(num_neighs);
629 std::vector<Memory::TypedView<DataType>> recv_views(num_neighs), send_views(num_neighs);
632 for(std::size_t i(0); i < num_neighs; ++i)
635 recv_views[i] = recv_bufs.at(i).elements_view_w();
636 recv_reqs[i] = comm.
irecv(recv_views[i].get_w(), recv_bufs.at(i).size(), this->_ranks.at(i));
640 for(std::size_t i(0); i < num_neighs; ++i)
642 watch_init_num_gather_b.
start();
643 send_bufs.at(i) = _gather_b(this->_data_mirrors.at(i), this->_matrix_b.local());
644 send_views[i] = send_bufs.at(i).elements_view_r();
645 watch_init_num_gather_b.
stop();
646 send_reqs[i] = comm.
isend(send_views[i].get_r(), send_bufs.at(i).size(), this->_ranks.at(i));
650 watch_init_num_premult_da.
start();
651 _premult_da(this->_matrix_da, this->_matrix_d.
local(), this->_diagonal_a.local());
652 watch_init_num_premult_da.
stop();
655 for(std::size_t i(0u); recv_reqs.wait_any(i); )
657 watch_init_num_neighbor_s.
start();
658 recv_views[i].release();
659 this->_neighbor_matrices.at(i).format();
660 _asm_neighbor_schur_matrix(this->_neighbor_matrices.at(i), this->_matrix_da,
661 this->_matrix_b.get_row_gate()->_mirrors.at(i), this->_neighbor_graphs.at(i), recv_bufs.at(i));
662 watch_init_num_neighbor_s.
stop();
667 watch_init_numeric.
stop();
705 Index& owned_dof_count,
Index& owned_num_nzes,
Index& global_num_nzes)
const
708 global_dof_offset =
Index(0);
709 global_dof_count = owned_dof_count = _matrix_s.
num_rows();
712 owned_num_nzes = _matrix_s.
num_nzes();
713 for(
const auto& x : _neighbor_matrices)
714 owned_num_nzes += x.num_nzes();
715 global_num_nzes = owned_num_nzes;
720 this->get_comm()->exscan(&owned_dof_count, &global_dof_offset, std::size_t(1),
Dist::op_sum);
721 this->get_comm()->allreduce(&owned_dof_count, &global_dof_count, std::size_t(1),
Dist::op_sum);
722 this->get_comm()->allreduce(&owned_num_nzes, &global_num_nzes, std::size_t(1),
Dist::op_sum);
745 template<
typename RPT_,
typename CIT_>
749 static constexpr std::uint64_t max_rpt = 1ull << (8*
sizeof(RPT_) - 1);
750 static constexpr std::uint64_t max_cit = 1ull << (8*
sizeof(CIT_) - 1);
765 FEAT_PRAGMA_OMP(parallel
for)
766 for(
Index i = 0; i <= n; ++i)
768 ASSERTM(std::uint64_t(row_ptr_s[i]) < max_rpt,
"row-pointer exceeds RPT_ type range!");
769 row_ptr[i] = RPT_(row_ptr_s[i]);
772 FEAT_PRAGMA_OMP(parallel
for)
773 for(
Index i = 0; i < m; ++i)
775 ASSERTM(std::uint64_t(col_idx_s[i]) < max_cit,
"column-index exceeds CIT_ type range!");
776 col_idx[i] = CIT_(col_idx_s[i]);
785 const std::size_t num_neighs = this->_ranks.size();
794 std::vector<std::vector<IndexType>> recv_dofs(num_neighs), send_dofs(num_neighs);
798 for(std::size_t i(0); i < num_neighs; ++i)
800 recv_dofs.at(i).resize(_neighbor_graphs.at(i).get_num_nodes_image());
801 recv_reqs[i] = comm.
irecv(recv_dofs.at(i).data(), recv_dofs.at(i).size(), this->_ranks.at(i));
805 for(std::size_t i(0); i < num_neighs; ++i)
807 const Index num_idx = _pres_mirrors.at(i).num_indices();
809 send_dofs.at(i).resize(num_idx);
810 IndexType* sidx = send_dofs.at(i).data();
811 for(
Index k(0); k < num_idx; ++k)
812 sidx[k] = global_dof_offset + pidx[k];
813 send_reqs[i] = comm.
isend(send_dofs.at(i).data(), send_dofs.at(i).size(), this->_ranks.at(i));
822 std::vector<IndexType> row_aux(num_rows, IndexType(0));
823 for(
Index i(0); i < num_rows; ++i)
824 row_aux[i] = (row_ptr_s[i+1] - row_ptr_s[i]);
826 for(
const auto& x : _neighbor_matrices)
828 const Index used_rows = x.num_nonzero_rows();
831 for(
Index i(0); i < used_rows; ++i)
832 row_aux[row_idx_x[i]] += (row_ptr_x[i+1] - row_ptr_x[i]);
836 row_ptr[0] = RPT_(0);
837 for(
Index i(0); i < num_rows; ++i)
839 row_ptr[i+1] = row_ptr[i] + row_aux[i];
840 row_aux[i] = IndexType(row_ptr[i]);
851 std::map<int, std::size_t> neigh_map_l, neigh_map_h;
852 for(std::size_t ineigh(0); ineigh < num_neighs; ++ineigh)
854 if(_ranks.at(ineigh) < comm.
rank())
855 neigh_map_l.emplace(_ranks.at(ineigh), ineigh);
857 neigh_map_h.emplace(_ranks.at(ineigh), ineigh);
861 recv_reqs.wait_all();
864 for(
auto it = neigh_map_l.begin(); it != neigh_map_l.end(); ++it)
866 std::size_t ineigh = it->second;
867 const Index used_rows = _neighbor_matrices.at(ineigh).num_nonzero_rows();
871 const IndexType* dof_idx_x = recv_dofs.at(ineigh).data();
872 for(
Index i(0); i < used_rows; ++i)
874 IndexType& k = row_aux[row_idx_x[i]];
875 for(IndexType j(row_ptr_x[i]); j < row_ptr_x[i + 1]; ++j, ++k)
876 col_idx[k] = CIT_(dof_idx_x[col_idx_x[j]]);
881 for(
Index i(0); i < num_rows; ++i)
883 IndexType k = row_aux[i];
884 for(IndexType j(row_ptr_s[i]); j < row_ptr_s[i + 1]; ++j, ++k)
885 col_idx[k] = CIT_(global_dof_offset + col_idx_s[j]);
890 for(
auto it = neigh_map_h.begin(); it != neigh_map_h.end(); ++it)
892 std::size_t ineigh = it->second;
893 const Index used_rows = _neighbor_matrices.at(ineigh).num_nonzero_rows();
897 const IndexType* dof_idx_x = recv_dofs.at(ineigh).data();
898 for(
Index i(0); i < used_rows; ++i)
900 IndexType& k = row_aux[row_idx_x[i]];
901 for(IndexType j(row_ptr_x[i]); j < row_ptr_x[i + 1]; ++j, ++k)
902 col_idx[k] = CIT_(dof_idx_x[col_idx_x[j]]);
911 for(
Index i = 0; i < num_rows; ++i)
913 for(RPT_ j(row_ptr[i]); j + 1 < row_ptr[i + 1]; ++j)
915 ASSERT(col_idx[j] < col_idx[j+1]);
936 template<
typename DTV_,
typename RPT_,
typename CIT_>
945 FEAT_PRAGMA_OMP(parallel
for)
946 for(
Index i = 0; i < num_nzes; ++i)
947 val[i] = DTV_(val_s[i]);
960 std::vector<IndexType> row_aux(num_rows);
963 for(
Index i(0); i < num_rows; ++i)
964 row_aux[i] = IndexType(row_ptr[i]);
967 const int my_rank = this->get_comm()->rank();
970 std::map<int, std::size_t> neigh_map_l, neigh_map_h;
971 for(std::size_t ineigh(0); ineigh < _ranks.size(); ++ineigh)
973 if(_ranks.at(ineigh) < my_rank)
974 neigh_map_l.emplace(_ranks.at(ineigh), ineigh);
976 neigh_map_h.emplace(_ranks.at(ineigh), ineigh);
980 for(
auto it = neigh_map_l.begin(); it != neigh_map_l.end(); ++it)
982 std::size_t ineigh = it->second;
983 const Index used_rows = _neighbor_matrices.at(ineigh).num_nonzero_rows();
987 for(
Index i(0); i < used_rows; ++i)
989 IndexType& k = row_aux[row_idx_x[i]];
990 for(IndexType j(row_ptr_x[i]); j < row_ptr_x[i + 1]; ++j, ++k)
991 val[k] = DTV_(val_x[j]);
996 for(
Index i(0); i < num_rows; ++i)
998 Index k = row_aux[i];
999 for(
Index j(row_ptr_s[i]); j < row_ptr_s[i+1]; ++j, ++k)
1000 val[k] = DTV_(val_s[j]);
1005 for(
auto it = neigh_map_h.begin(); it != neigh_map_h.end(); ++it)
1007 std::size_t ineigh = it->second;
1008 const Index used_rows = _neighbor_matrices.at(ineigh).num_nonzero_rows();
1012 for(
Index i(0); i < used_rows; ++i)
1014 IndexType& k = row_aux[row_idx_x[i]];
1015 for(IndexType j(row_ptr_x[i]); j < row_ptr_x[i + 1]; ++j, ++k)
1016 val[k] = DTV_(val_x[j]);
1022 for(
Index i(0); i < num_rows; ++i)
1024 ASSERT(row_aux[i] == IndexType(row_ptr[i+1]));
1070 const Index num_dof_mir_v = mirror_v.num_indices();
1077 std::set<IndexType> dof_set;
1078 for(
Index i(0); i < num_dof_mir_v; ++i)
1080 const Index irow = velo_idx[i];
1081 for(IndexType j(row_ptr[irow]); j < row_ptr[irow+1]; ++j)
1082 dof_set.insert(col_idx[j]);
1086 mirror_p = MirrorTypeP(matrix_b.
num_cols(),
Index(dof_set.size()));
1088 IndexType* pidx = idx_v.
get_w();
1089 for(
auto it = dof_set.begin(); it != dof_set.end(); ++it, ++pidx)
1111 const Index num_dof_mir_v = mirror_v.num_indices();
1112 const Index num_dof_mir_p = mirror_p.num_indices();
1120 for(
Index i(0); i < num_dof_mir_v; ++i)
1122 const Index irow = velo_idx[i];
1123 num_red_nzes +=
Index(row_ptr[irow+1] - row_ptr[irow]);
1132 dom_ptr[0] =
Index(0);
1133 for(
Index i(0); i < num_dof_mir_v; ++i)
1136 const IndexType irow = velo_idx[i];
1138 for(IndexType j(row_ptr[irow]), k(dom_ptr[i]); j < row_ptr[irow+1]; ++j, ++k)
1141 img_idx[k] = ~IndexType(0);
1144 for(
Index l(0); l < num_dof_mir_p; ++l)
1146 if(col_idx[j] == pres_idx[l])
1153 ASSERT(img_idx[k] != ~IndexType(0));
1156 dom_ptr[i+1] = dom_ptr[i] + (row_ptr[irow+1] - row_ptr[irow]);
1185 const Index num_dof_mir_v = mirror_v.num_indices();
1198 for(
Index i(0); i < num_dof_mir_v; ++i)
1201 const IndexType irow = velo_idx[i];
1204 for(
Index k(dom_ptr[i]); k < dom_ptr[i+1]; ++k)
1207 dat_idx[k] = ~IndexType(0);
1210 const Index jcol = pres_idx[img_idx[k]];
1213 for(IndexType j(row_ptr[irow]); j < row_ptr[irow + 1]; ++j)
1215 if(jcol == col_idx[j])
1222 ASSERT(dat_idx[k] != ~IndexType(0));
1244 const Index num_idx = data_mirror.num_indices();
1251 for(
Index i(0); i < num_idx; ++i)
1253 buf_val[i] = mat_val[idx[i]];
1263 for(
int i(0); i < dim; ++i)
1264 da(0, i) = val_d(0, i) * val_a(i);
1271 DataType s = DataType(0);
1272 for(
int i(0); i < dim; ++i)
1273 s += val_da(0, i) * val_b(i, 0);
1280 for(
int i(0); i < dim; ++i)
1281 val_da(i, 0) = val_d(0, i) * val_a(i);
1287 DataType s = DataType(0);
1288 for(
int i(0); i < dim; ++i)
1289 s += val_da(i, 0) * val_b(i, 0);
1319 std::vector<Index> ptr(num_cols);
1320 for(
Index i(0); i < num_cols; ++i)
1321 ptr[i] = row_ptr_da[i];
1324 for(
Index i(0); i < num_rows; ++i)
1326 for(
Index j(row_ptr[i]); j < row_ptr[i + 1]; ++j)
1328 const Index col = col_idx[j];
1329 _mat_mult_d_a(val_da[ptr[col]++], val_d[j], val_a[col]);
1367 for(IndexType i(0); i < IndexType(s.
num_rows()); ++i)
1370 for(IndexType ik(row_ptr_d[i]); ik < row_ptr_d[i+1]; ++ik)
1373 const IndexType k = col_idx_d[ik];
1376 const ValueTypeD val_da = _mat_mult_d_a(data_d[ik], data_a[k]);
1379 for(IndexType ij(row_ptr_s[i]), kj(row_ptr_b[k]); kj < row_ptr_b[k+1]; ++ij)
1381 ASSERT(ij < row_ptr_s[i+1]);
1382 ASSERT(col_idx_s[ij] <= col_idx_b[kj]);
1383 if(col_idx_s[ij] == col_idx_b[kj])
1385 data_s[ij] += _mat_mult_da_b(val_da, data_b[kj]);
1417 XASSERT(graph_b.get_num_nodes_domain() == mirror_v.num_indices());
1434 const Index num_mir_idx = mirror_v.num_indices();
1442 for(
Index l(0); l < num_mir_idx; ++l)
1445 const Index k = mir_idx[l];
1448 for(
Index ik(col_ptr_da[k]), si(0); (ik < col_ptr_da[k + 1]) && (si < used_rows_s); )
1451 if(row_idx_da[ik] < row_idx_s[si])
1457 if(row_idx_s[si] < row_idx_da[ik])
1465 for(IndexType ij(row_ptr_s[si]), kj(dom_ptr_b[l]); kj < dom_ptr_b[l+1]; ++ij)
1467 ASSERT(ij < row_ptr_s[si+1]);
1468 ASSERT(col_idx_s[ij] <= img_idx_b[kj]);
1469 if(col_idx_s[ij] == img_idx_b[kj])
1471 data_s[ij] += _mat_mult_da_b(data_da[ik], data_b[kj]);
1504 const std::size_t num_neighs = this->_ranks.size();
1507 if(num_neighs <= std::size_t(0))
1510 watch_apply_matrix_loc.
start();
1512 this->_matrix_s.
apply(r, x);
1514 this->_matrix_s.
apply(r, x, y, alpha);
1515 watch_apply_matrix_loc.
stop();
1523 std::vector<BufferVectorType> recv_bufs(num_neighs), send_bufs(num_neighs);
1525 std::vector<Memory::TypedView<DataType>> recv_views(num_neighs), send_views(num_neighs);
1528 for(std::size_t i(0); i < num_neighs; ++i)
1530 recv_bufs.at(i) =
BufferVectorType(this->_neighbor_matrices.at(i).num_cols());
1531 recv_views[i] = recv_bufs.at(i).elements_view_w();
1532 recv_reqs[i] = comm.
irecv(recv_views[i].get_w(), recv_bufs.at(i).size(), this->_ranks.at(i));
1536 for(std::size_t i(0); i < num_neighs; ++i)
1538 send_bufs.at(i) =
BufferVectorType(this->_pres_mirrors.at(i).num_indices());
1539 this->_pres_mirrors.at(i).gather(send_bufs.at(i), x);
1540 send_views[i] = send_bufs.at(i).elements_view_w();
1541 send_reqs[i] = comm.
isend(send_views[i].get_r(), send_bufs.at(i).size(), this->_ranks.at(i));
1545 watch_apply_matrix_loc.
start();
1547 this->_matrix_s.
apply(r, x);
1549 this->_matrix_s.
apply(r, x, y, alpha);
1550 watch_apply_matrix_loc.
stop();
1553 for(std::size_t i(0u); recv_reqs.wait_any(i); )
1555 watch_apply_neighbor_s.
start();
1556 recv_views[i].release();
1557 this->_neighbor_matrices.at(i).apply(r, recv_bufs.at(i), r, (only_Ax ? DataType(1) : alpha));
1558 watch_apply_neighbor_s.
stop();
#define ASSERT(expr)
Debug-Assertion macro definition.
#define ASSERTM(expr, msg)
Debug-Assertion macro definition with custom message.
#define XASSERT(expr)
Assertion macro definition.
#define XASSERTM(expr, msg)
Assertion macro definition with custom message.
Adjacency Graph implementation.
void sort_indices()
Sorts the image indices to non-descending order.
Index * get_domain_ptr()
Returns the domain pointer array.
Index * get_image_idx()
Returns the image node index array.
Index get_num_indices() const
Returns the total number indices.
Request irecv(void *buffer, std::size_t count, const Datatype &datatype, int source, int tag=0) const
Nonblocking Receive.
Request isend(const void *buffer, std::size_t count, const Datatype &datatype, int dest, int tag=0) const
Nonblocking Send.
int rank() const
Returns the rank of this process in this communicator.
Communication Request vector class.
void wait_all()
Blocks until all active requests are fulfilled.
Global gate implementation.
const Dist::Comm * get_comm() const
Returns a const pointer to the underlying communicator.
std::vector< Mirror_ > _mirrors
vector mirrors
std::vector< int > _ranks
communication ranks
Global Matrix wrapper class template.
VectorTypeR create_vector_r() const
Creates and returns a new R-compatible global vector object.
VectorTypeL create_vector_l() const
Creates and returns a new L-compatible global vector object.
const GateRowType * get_row_gate() const
Returns a const pointer to the internal row gate of the matrix.
const Dist::Comm * get_comm() const
Returns a const pointer to the internal communicator of the gates of the matrix.
LocalMatrix_ & local()
Returns a reference to the internal local LAFEM matrix object.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::adp_upload_symbolic void adp_upload_symbolic(RPT_ *row_ptr, CIT_ *col_idx, Index global_dof_offset) const
Assembles the matrix structure of an algebraic DOF partitioned matrix.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_mat_mult_d_a static ValueTypeD _mat_mult_d_a(const ValueTypeD &val_d, const ValueTypeA &val_a)
auxiliary function for _asm_local_schur_matrix: multiply two values D*A
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_neighbor_graphs std::vector< Adjacency::Graph > _neighbor_graphs
Neighbor B-matrix adjacency graphs.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_data_mirror static MirrorTypeP _asm_data_mirror(const MirrorTypeP &mirror_p, const MirrorTypeV &mirror_v, const LocalMatrixTypeB &matrix_b, const Adjacency::Graph &graph)
Auxiliary Function: computes a data mirror from B to B'.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_fmt_time static String _fmt_time(double tsum_total, double tmax_total, double tsum, double tmax, String st)
auxiliary function: format a time line
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_reduced_b static Adjacency::Graph _asm_reduced_b(const MirrorTypeP &mirror_p, const MirrorTypeV &mirror_v, const LocalMatrixTypeB &matrix_b)
Auxiliary Function: reduces the matrix B to B'.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_matrix_d const GlobalMatrixTypeD & _matrix_d
the velocity-divergence matrix D
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::adp_upload_numeric void adp_upload_numeric(DTV_ *val, const RPT_ *row_ptr, const CIT_ *col_idx) const
Uploads the numeric values of the matrix into an ADP matrix.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_data_mirrors std::vector< MirrorTypeP > _data_mirrors
B-matrix data mirrors.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_apply_matrix_loc StopWatch watch_apply_matrix_loc
local Schur-Matrix apply time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_premult_da static void _premult_da(LocalMatrixTypeB &mat_da, const LocalMatrixTypeD &mat_d, const LocalVectorTypeV &mat_a)
Auxiliary Function: Computes the product (D*A) and stores the result in a CSC matrix.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init_numeric void init_numeric()
Performs the numeric initialization of the matrix.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_pres_mirror static void _asm_pres_mirror(MirrorTypeP &mirror_p, const MirrorTypeV &mirror_v, const LocalMatrixTypeB &matrix_b)
Auxiliary function: assembles a pressure mirror from a velocity mirror and the B-matrix.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::~PMDCDSCMatrix virtual ~PMDCDSCMatrix()
virtual destructor
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_matrix_s LocalMatrixTypeS _matrix_s
The local Schur-complement matrix.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::PMDCDSCMatrix PMDCDSCMatrix(const GlobalVectorTypeV &diagonal_a, const GlobalMatrixTypeB &matrix_b, const GlobalMatrixTypeD &matrix_d)
Constructor.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_apply StopWatch watch_apply
total apply time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init_symbolic void init_symbolic()
Performs the symbolic initialization of the matrix.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_matrix_b const GlobalMatrixTypeB & _matrix_b
the pressure-gradient matrix B
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::get_comm const Dist::Comm * get_comm() const
Returns a pointer to the underlying communicator.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_local_schur_matrix static void _asm_local_schur_matrix(LocalMatrixTypeS &s, const LocalMatrixTypeD &d, const LocalVectorTypeV &a, const LocalMatrixTypeB &b)
Assembles the local Schur-Matrix S = (D*A*B)
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_mat_mult_da_b static DataType _mat_mult_da_b(const ValueTypeB &val_da, const ValueTypeB &val_b)
auxiliary function for _asm_neighbor_schur_matrix: multiply two values DA*B with DA in transposed for...
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::apply void apply(VectorTypeL &r, const VectorTypeR &x) const
Calculate .
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::format_timings String format_timings() const
Returns a string that contains the formatted timing statistics.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_mat_mult_da_b static DataType _mat_mult_da_b(const ValueTypeD &val_da, const ValueTypeB &val_b)
auxiliary function for _asm_local_schur_matrix: multiply two values DA*B
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_num_neighbor_s StopWatch watch_init_num_neighbor_s
neighbor Schur-matrix numeric assembly time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_mat_mult_d_a static void _mat_mult_d_a(ValueTypeB &val_da, const ValueTypeD &val_d, const ValueTypeA &val_a)
auxiliary function for _asm_neighbor_schur_matrix: multiply two values D*A and store in transposed fo...
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::create_vector_l VectorTypeL create_vector_l() const
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_sym_neighbor_s StopWatch watch_init_sym_neighbor_s
neighbor Schur-Matrix symbolic assembly time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::GateColType GlobalMatrixTypeB::GateColType GateColType
The column-gate type (used by SFINAE)
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_neighbor_matrices std::vector< NeighMatrixTypeS > _neighbor_matrices
Pre-multiplied neighbor Schur-complement matrices.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_diagonal_a const GlobalVectorTypeV & _diagonal_a
the diagonal matrix a (stored as a vector)
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::get_local_schur_matrix const LocalMatrixTypeS & get_local_schur_matrix() const
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_symbolic StopWatch watch_init_symbolic
total symbolic/numeric init time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_num_gather_b StopWatch watch_init_num_gather_b
reduced-B matrix data gather time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_numeric StopWatch watch_init_numeric
total numeric init time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_sym_data_mirror StopWatch watch_init_sym_data_mirror
reduced B-matrix data mirror assembly time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::extract_diag GlobalVectorTypeP extract_diag() const
Extracts the main diagonal.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_num_premult_da StopWatch watch_init_num_premult_da
pre-multiply D*A time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_neighbor_schur_matrix static void _asm_neighbor_schur_matrix(NeighMatrixTypeS &s, const LocalMatrixTypeB &da, const MirrorTypeV &mirror_v, const Adjacency::Graph &graph_b, const BufferVectorType &buffer_b)
Assembles a neighbor Schur-Matrix S_k = (D*A*M_k^T*B_k)
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init void init()
Performs both symbolic and numeric initialization of the matrix.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::GateRowType GlobalMatrixTypeD::GateRowType GateRowType
The row-gate type (used by SFINAE)
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_apply_neighbor_s StopWatch watch_apply_neighbor_s
neighbor Matrix apply time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::create_vector_r VectorTypeR create_vector_r() const
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_sym_pres_mirror StopWatch watch_init_sym_pres_mirror
pressure mirror assembly time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_num_matrix_loc StopWatch watch_init_num_matrix_loc
local Schur-Matrix numeric assembly time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::apply void apply(VectorTypeL &r, const VectorTypeR &x, const VectorTypeL &y, const DataType alpha=DataType(1)) const
Calculate .
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::adp_compute_counts void adp_compute_counts(Index &global_dof_offset, Index &global_dof_count, Index &owned_dof_count, Index &owned_num_nzes, Index &global_num_nzes) const
Compute the counts required for an algebraic dof partitioning of this matrix.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_sym_reduced_b StopWatch watch_init_sym_reduced_b
reduced B-matrix symbolic assembly time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_matrix_da LocalMatrixTypeB _matrix_da
Pre-Multiplied transposed matrix-product (D*A)^T.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_fmt_time static String _fmt_time(double tsum_total, double tmax_total, String st)
auxiliary function: format a time line
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_pres_mirrors std::vector< MirrorTypeP > _pres_mirrors
Pressure DOF mirrors.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::reset_timings void reset_timings()
Resets the internal stop watches used for collecting timing statistics.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::extract_diag void extract_diag(GlobalVectorTypeP &vec_diag) const
Extracts the main diagonal.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::watch_init_sym_matrix_loc StopWatch watch_init_sym_matrix_loc
local Schur-Matrix symbolic assembly time
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_apply void _apply(LocalVectorTypeP &r, const LocalVectorTypeP &x, const LocalVectorTypeP &y, const DataType alpha, bool only_Ax) const
Applies this matrix onto a vector.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_gather_b static BufferVectorType _gather_b(const MirrorTypeP &data_mirror, const LocalMatrixTypeB &matrix_b)
Auxiliary Function: Gathers the data array from B to B' using the data mirror.
FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_ranks std::vector< int > _ranks
neighbor process ranks
Pre-Multiplied Discontinuous Diagonal Schur-Complement Matrix.
Global vector wrapper class template.
const Dist::Comm * get_comm() const
Returns a const pointer to the internal communicator of the gate of the vector.
LocalVector_ & local()
Returns a reference to the internal local LAFEM vector object.
void format()
Reset all elements of the container to a given value or zero if missing.
Blocked Dense data vector class template.
Index size() const
Returns the size of this vector, i.e. its number of entries.
Dense data vector class template.
CSR based blocked sparse matrix.
Index num_rows() const
Retrieve matrix row count.
Index num_nzes() const
Retrieve non zero element count.
Index num_cols() const
Retrieve matrix column count.
CSCR based sparse matrix.
Index num_cols() const
Retrieve matrix column count.
Index num_rows() const
Retrieve matrix row count.
Index num_nonzero_rows() const
Retrieve used matrix non zero row count.
void extract_diag(VectorTypeL &diag) const
extract main diagonal vector from matrix
Index num_cols() const
Retrieve matrix column count.
Index num_rows() const
Retrieve matrix row count.
Index num_nzes() const
Retrieve non zero element count.
void apply(DenseVector< DT_, IT_ > &r, const DenseVector< DT_, IT_ > &x) const
Calculate .
T_ * get_w()
Returns a typed pointer to the array that grants write (and read) access.
double elapsed() const
Returns the total elapsed time in seconds.
void start()
Starts the stop-watch.
void reset()
Resets the elapsed time.
void stop()
Stops the stop-watch and increments elapsed time.
String class implementation.
String pad_back(size_type len, char c=' ') const
Pads the back of the string up to a desired length.
Tiny Matrix class template.
Tiny Vector class template.
@ injectify_sorted
Render-Injectified mode, sort image indices.
@ injectify_transpose
Render-Injectified-Transpose mode.
const Operation op_max(MPI_MAX)
Operation wrapper for MPI_MAX.
const Operation op_sum(MPI_SUM)
Operation wrapper for MPI_SUM.
T_ abs(T_ x)
Returns the absolute value.
String stringify_fp_fix(DataType_ value, int precision=0, int width=0, bool sign=false)
Prints a floating point value to a string in fixed-point notation.
std::uint64_t Index
Index data type.