![]() |
|
#include "generic.h"Functions | |
| template<typename myType > | |
| void | construct_vector (myType given_array[], unsigned given_arraysize, Vector< myType > &result_vector) |
| template<typename myType > | |
| void | output_vector (Vector< myType > &given_vector) |
| void | fill_in_mat_info (unsigned const nblock_row, unsigned const nblock_col, unsigned dimarray[], Vector< Vector< Vector< unsigned > > > &mat_info_vec) |
| void | create_matrix_ascend_col_row (unsigned const nrow, unsigned const ncol, const OomphCommunicator *const comm_pt, bool const distributed, CRDoubleMatrix &block) |
| void | fill_in_sub_matrices (const OomphCommunicator *const comm_pt, const bool distributed, Vector< Vector< Vector< unsigned > > > &mat_info, DenseMatrix< CRDoubleMatrix * > &mat_pt) |
| void | create_matrices_to_cat (unsigned dimarray[], const OomphCommunicator *const comm_pt, DenseMatrix< CRDoubleMatrix * > &mat_pt) |
| int | main (int argc, char *argv[]) |
| void construct_vector | ( | myType | given_array[], |
| unsigned | given_arraysize, | ||
| Vector< myType > & | result_vector | ||
| ) |
| void create_matrices_to_cat | ( | unsigned | dimarray[], |
| const OomphCommunicator *const | comm_pt, | ||
| DenseMatrix< CRDoubleMatrix * > & | mat_pt | ||
| ) |
References fill_in_mat_info(), fill_in_sub_matrices(), oomph::DenseMatrix< T >::ncol(), and oomph::DenseMatrix< T >::nrow().
Referenced by main().
| void create_matrix_ascend_col_row | ( | unsigned const | nrow, |
| unsigned const | ncol, | ||
| const OomphCommunicator *const | comm_pt, | ||
| bool const | distributed, | ||
| CRDoubleMatrix & | block | ||
| ) |
References block(), oomph::LinearAlgebraDistribution::first_row(), and oomph::LinearAlgebraDistribution::nrow_local().
Referenced by fill_in_sub_matrices().
| void fill_in_mat_info | ( | unsigned const | nblock_row, |
| unsigned const | nblock_col, | ||
| unsigned | dimarray[], | ||
| Vector< Vector< Vector< unsigned > > > & | mat_info_vec | ||
| ) |
References construct_vector().
Referenced by create_matrices_to_cat().
| void fill_in_sub_matrices | ( | const OomphCommunicator *const | comm_pt, |
| const bool | distributed, | ||
| Vector< Vector< Vector< unsigned > > > & | mat_info, | ||
| DenseMatrix< CRDoubleMatrix * > & | mat_pt | ||
| ) |
References create_matrix_ascend_col_row(), oomph::DenseMatrix< T >::ncol(), and oomph::DenseMatrix< T >::nrow().
Referenced by create_matrices_to_cat().
Driver code: Testing CRDoubleMatrixHelpers::concatenate_without_communication(...) We concatenate uniformly distributed matrices.
Let (x,y) be a matrix with x rows and y columns, with entries increasing along the columns, then along the rows. For example, (3,3) is [1 2 3 4 5 6 7 8 9].
We concatenate the following matrices: (7,7)(7,5)(7,3) (5,7)(5,5)(5,3) (3,7)(3,5)(3,3)
(7,7)(7,5) (5,7)(5,5) (3,7)(3,5)
(7,7)(7,5)(7,3) (5,7)(5,5)(5,3)
Communication between processors is NOT required, but the block structure of the sub blocks are NOT preserved in the result matrix. Please see self_test/mpi/vector_concatenation_without_communication/ for more detail.
The script validate.sh should run this self test on 1, 2, 3 and 4 cores.
References oomph::CRDoubleMatrix::clear(), oomph::MPI_Helpers::communicator_pt(), oomph::CRDoubleMatrixHelpers::concatenate_without_communication(), create_matrices_to_cat(), oomph::MPI_Helpers::finalize(), oomph::MPI_Helpers::init(), oomph::OomphCommunicator::my_rank(), oomph::OomphCommunicator::nproc(), and oomph::Matrix< T, MATRIX_TYPE >::sparse_indexed_output().
| void output_vector | ( | Vector< myType > & | given_vector | ) |
References oomph::oomph_info.