|
| std::string | to_sci (double x) |
| | Scientific notation for messages (std::to_string prints 0.000000 for 1e-7).
|
| Vector< Triplet > | exchange_triplets (Vector< Triplet > &&trips, Vector< Long > const &rank_offset, MPI_Comm comm) |
| | Send each triplet to the rank owning its row (rank p owns rows [rank_offset[p], rank_offset[p+1])) and return the triplets received by this rank, including its own.
|
| void | triplets_to_spmatrix (Gpu::DeviceVector< Long > &rows, Gpu::DeviceVector< Long > &cols, Gpu::DeviceVector< Real > &vals, Long row_begin, Long nrows, Vector< Long > const &rank_offset, MPI_Comm comm, SpMatrix< Real > &mat) |
| | Build an SpMatrix of this rank's rows [row_begin, row_begin+nrows) from (row, column, value) triplets in device memory, without copying them to the host: the device counterpart of exchange_triplets, OwnedCSR::define and OwnedCSR::toSpMatrix.
|
| std::map< std::string, int > & | dump_counters () |
| | Dumps written so far per dump prefix, over all solver objects of the run.
|
| bool | dump_pending (std::string const &prefix, int max) |
| | Whether a dump with this prefix is still pending (fewer than max written).
|
| int | next_dump_index (std::string const &prefix, int max) |
| | Index of the next dump for this prefix, or -1 once max have been written.
|
| template<typename T> |
| Vector< T > | gather_on_root (Vector< T > const &v, MPI_Comm comm) |
| | Gather the chunks of a distributed array on rank 0 (ranks in order); other ranks return an empty vector. The total must fit in int.
|
| bool | dump_single_file (Long total, Long gather_max, MPI_Comm comm) |
| | Whether a dump of total values goes to one file written by rank 0 (always on one rank). Above gather_max, or above what MPI's int counts can address, every rank writes its own part to <file>.<rank>.
|
| std::ofstream | open_dump (std::string const &name) |
| | Open a dump file for writing, aborting on failure.
|
| void | check_dump (std::ofstream const &ofs, std::string const &name) |
| | Abort if writing a dump file failed.
|
| void | write_row_map (std::string const &file, std::string const &title, Vector< std::array< Long, 4 > > const &info, Vector< Real > const &scaling, Long row_begin, MPI_Comm comm, Long gather_max) |
| | Write the row map of a composite system: one line per row with the 1-based row, AMR level, index (i j k) and the unknown's scaling. info holds (level,i,j,k) of this rank's rows, which start at the global row row_begin. Gathered on rank 0 or one file per rank, see dump_single_file.
|
| void | algmg_parse_options (AlgMG< Real > &mg, std::string const &prefix, AlgMGKrylovSolver krylov) |
| | Configure an AlgMG solver from <prefix>.algmg.*: verbose, krylov (none|bicgstab|gmres|pcg; default krylov), smoother (jacobi|l1_jacobi|chebyshev|l1_gauss_seidel), interp_type (direct|mm_ext|mm_ext_i), bottom_solver (jacobi|bicgstab|gmres|direct), strong_threshold, max_levels, max_coarse_size, agg_num_levels, pmax_elmts, trunc_factor, pre_smooth, post_smooth, cheby_degree.
|
| void | write_matrix_market (std::string const &file, OwnedCSR const &csr, Long nglobal, MPI_Comm comm, Long gather_max) |
| | Write a distributed matrix in Matrix Market coordinate format (1-based indices, "general"), gathered on rank 0 or one file per rank (see dump_single_file). A per-rank file holds this rank's rows with the global dimensions; concatenating the entry lines gives the matrix.
|
| void | write_vector_market (std::string const &file, Vector< Real > const &v, Long nglobal, Long row_begin, MPI_Comm comm, Long gather_max) |
| | Write a distributed vector (this rank's rows start at the global row row_begin) as a Matrix Market dense array, gathered on rank 0 or one file per rank (see dump_single_file); a per-rank file gives its global row range in a comment.
|