27 #ifndef OOMPH_PRECONDITION_ARRAY_HEADER
28 #define OOMPH_PRECONDITION_ARRAY_HEADER
32 #include <oomph-lib-config.h>
57 OOMPH_CURRENT_FUNCTION,
58 OOMPH_EXCEPTION_LOCATION);
65 OOMPH_CURRENT_FUNCTION,
66 OOMPH_EXCEPTION_LOCATION);
101 class PreconditionerArray
166 for (
unsigned i = 0;
i <
Nprec;
i++)
187 return source + (nproc * dest) + (nproc * nproc * type);
An oomph-lib wrapper to the MPI_Comm communicator object. Just contains an MPI_Comm object (which is ...
An OomphLibError object which should be thrown when an run-time error is encountered....
PreconditionerArray - NOTE - first implementation, a number of assumptions / simplifications were mad...
void solve_preconditioners(const Vector< DoubleVector > &r, Vector< DoubleVector > &z)
Applies each preconditioner to the corresponding vector in r and z.
unsigned Method
the communication method in the setup_preconditioners(...) method
Vector< Vector< unsigned > > First_row_for_proc
Storage (indexed [i][j]) for the first row that will be sent from this processor to processor j for p...
Vector< unsigned > First_proc_for_prec
The first_row component of the distribution of the processors over the preconditioners.
unsigned Color
the Color of this processor (or the preconditioner number)
Vector< Vector< unsigned > > Nrow_local_for_proc
Storage (indexed [i][j]) for the nrow_local that will be sent from this processor to processor j for ...
Vector< Vector< unsigned > > First_row_from_proc
Storage (indexed [i][j]) for the first row that will be received by this processor from processor j f...
int compute_tag(const int &nproc, const int &source, const int &dest, const int &type)
helper method for computing the MPI_Isend and MPI_Irecv tags
OomphCommunicator * Global_communicator_pt
pointer to the global communicator for this preconditioner array
void setup_preconditioners(Vector< CRDoubleMatrix * > matrix_pt, Vector< Preconditioner * > prec_pt, const OomphCommunicator *comm_pt)
Setup the preconditioners. Sets up each preconditioner in the array for the corresponding matrix in t...
PreconditionerArray(const PreconditionerArray &)=delete
Broken copy constructor.
OomphCommunicator * Local_communicator_pt
Vector of communicators for the preconditioners.
Preconditioner * Preconditioner_pt
The pointer to the local preconditioner on this processor.
void clean_up_memory()
Clean up memory.
unsigned Nprec
the number of preconditioner in the array
~PreconditionerArray()
Destructor (empty)
Vector< Vector< unsigned > > Nrow_local_from_proc
Storage (indexed [i][j]) for the nrow_local that will be received by this processor from processor j ...
Vector< LinearAlgebraDistribution * > Distribution_pt
Vector< unsigned > Nproc_for_prec
The nrow_local component of the distribution of the processors over the preconditioners.
void operator=(const PreconditionerArray &)=delete
Broken assignment operator.
PreconditionerArray()
Constructor (empty)
Preconditioner base class. Gives an interface to call all other preconditioners through and stores th...
A slight extension to the standard template vector class so that we can include "graceful" array rang...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...