31 #ifndef OOMPH_PRECONDITION_ARRAY_HEADER 32 #define OOMPH_PRECONDITION_ARRAY_HEADER 36 #include <oomph-lib-config.h> 61 OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
68 OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
189 int compute_tag(
const int& nproc,
const int& source,
const int& dest,
192 return source + (nproc * dest) + (nproc * nproc * type);
PreconditionerArray(const PreconditionerArray &)
Broken copy constructor.
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
unsigned Method
the communication method in the setup_preconditioners(...) method
Vector< unsigned > Nproc_for_prec
The nrow_local component of the distribution of the processors over the preconditioners.
unsigned Color
the Color of this processor (or the preconditioner number)
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
Preconditioner * Preconditioner_pt
The pointer to the local preconditioner on this processor.
PreconditionerArray - NOTE - first implementation, a number of assumptions / simplifications were mad...
void setup_preconditioners(Vector< CRDoubleMatrix *> matrix_pt, Vector< Preconditioner *> prec_pt, const OomphCommunicator *comm_pt)
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...
OomphCommunicator * Local_communicator_pt
Vector of communicators for the preconditioners.
Vector< LinearAlgebraDistribution * > Distribution_pt
PreconditionerArray()
Constructor (empty)
Vector< unsigned > First_proc_for_prec
The first_row component of the distribution of the processors over the preconditioners.
OomphCommunicator * Global_communicator_pt
pointer to the global communicator for this preconditioner array
void clean_up_memory()
Clean up memory.
~PreconditionerArray()
Destructor (empty)
void operator=(const PreconditionerArray &)
Broken assignment operator.
Preconditioner base class. Gives an interface to call all other preconditioners through and stores th...
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...
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
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 ...
void solve_preconditioners(const Vector< DoubleVector > &r, Vector< DoubleVector > &z)
Applies each preconditioner to the corresponding vector in r and z.
unsigned Nprec
the number of preconditioner in the array
An oomph-lib wrapper to the MPI_Comm communicator object. Just contains an MPI_Comm object (which is ...