49 for (
unsigned i_matrix = 0; i_matrix <
Added_matrix_pt.size(); i_matrix++)
63 std::map<unsigned, unsigned>::const_iterator it;
68 for (it =
Col_map_pt[i_matrix]->main_to_added_mapping_pt()->begin();
69 it !=
Col_map_pt[i_matrix]->main_to_added_mapping_pt()->end();
72 temp_x[it->second] = x[it->first];
80 for (it =
Row_map_pt[i_matrix]->main_to_added_mapping_pt()->begin();
81 it !=
Row_map_pt[i_matrix]->main_to_added_mapping_pt()->end();
84 soln[it->first] += temp_soln[it->second];
virtual void multiply(const DoubleVector &x, DoubleVector &soln) const =0
Multiply the matrix by the vector x: soln=Ax.
A vector in the mathematical sense, initially developed for linear algebra type applications....
Describes the distribution of a distributable linear algebra type object. Typically this is a contain...
void build(const OomphCommunicator *const comm_pt, const unsigned &first_row, const unsigned &nrow_local, const unsigned &nrow=0)
Sets the distribution. Takes first_row, nrow_local and nrow as arguments. If nrow is not provided or ...
An oomph-lib wrapper to the MPI_Comm communicator object. Just contains an MPI_Comm object (which is ...
DoubleMatrixBase * added_matrix_pt(const unsigned &i) const
Access function for ith added matrix (main matrix not included in numbering).
unsigned long nrow() const
Return the number of rows of the main matrix.
Vector< DoubleMatrixBase * > Added_matrix_pt
List of pointers to the matrices that are added to the main matrix.
Vector< const AddedMainNumberingLookup * > Col_map_pt
List of maps between col numbers of the main matrix and the added matrices.
Vector< const AddedMainNumberingLookup * > Row_map_pt
List of maps between row numbers of the main matrix and the added matrices.
unsigned long ncol() const
Return the number of columns of the main matrix.
void multiply(const DoubleVector &x, DoubleVector &soln) const
Multiply: just call multiply on each of the matrices and add up the results (with appropriate bookeep...
DoubleMatrixBase * Main_matrix_pt
Pointer to the matrix which we are adding the others to.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...