68 std::map<unsigned, unsigned>::const_iterator it;
73 for(it =
Col_map_pt[i_matrix]->main_to_added_mapping_pt()->begin();
74 it !=
Col_map_pt[i_matrix]->main_to_added_mapping_pt()->end();
77 temp_x[it->second] = x[it->first];
85 for(it =
Row_map_pt[i_matrix]->main_to_added_mapping_pt()->begin();
86 it !=
Row_map_pt[i_matrix]->main_to_added_mapping_pt()->end();
89 soln[it->first] += temp_soln[it->second];
Vector< DoubleMatrixBase * > Added_matrix_pt
List of pointers to the matrices that are added to the main matrix.
virtual void multiply(const DoubleVector &x, DoubleVector &soln) const =0
Multiply the matrix by the vector x: soln=Ax.
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 ...
unsigned long nrow() const
Return the number of rows of the main matrix.
Describes the distribution of a distributable linear algebra type object. Typically this is a contain...
DoubleMatrixBase * added_matrix_pt(const unsigned &i) const
Vector< const AddedMainNumberingLookup *> Row_map_pt
List of maps between row numbers of the main matrix and the added matrices.
DoubleMatrixBase * Main_matrix_pt
Pointer to the matrix which we are adding the others to.
Vector< const AddedMainNumberingLookup *> Col_map_pt
List of maps between col numbers of the main matrix and the added matrices.
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...
A vector in the mathematical sense, initially developed for linear algebra type applications. If MPI then this vector can be distributed - its distribution is described by the LinearAlgebraDistribution object at Distribution_pt. Data is stored in a C-style pointer vector (double*)
unsigned long ncol() const
Return the number of columns of the main matrix.
An oomph-lib wrapper to the MPI_Comm communicator object. Just contains an MPI_Comm object (which is ...