PreconditionerArray - NOTE - first implementation, a number of assumptions / simplifications were made: More...
#include <preconditioner_array.h>
Public Member Functions | |
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 the vector matrix_pt. The number of preconditioners in the array is taken to be the length of prec_pt. More... | |
void | solve_preconditioners (const Vector< DoubleVector > &r, Vector< DoubleVector > &z) |
Applies each preconditioner to the corresponding vector in r and z. More... | |
PreconditionerArray () | |
Constructor (empty) More... | |
PreconditionerArray (const PreconditionerArray &)=delete | |
Broken copy constructor. More... | |
void | operator= (const PreconditionerArray &)=delete |
Broken assignment operator. More... | |
~PreconditionerArray () | |
Destructor (empty) More... | |
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 the vector matrix_pt. The number of preconditioners in the array is taken to be the length of prec_pt The preconditioners that are not used on this processor are deleted. More... | |
void | solve_preconditioners (const Vector< DoubleVector > &r, Vector< DoubleVector > &z) |
Applies each preconditioner to the corresponding vector in r and z. More... | |
void | clean_up_memory () |
Clean up memory. More... | |
unsigned & | method () |
Private Member Functions | |
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 More... | |
Private Attributes | |
unsigned | Nprec |
the number of preconditioner in the array More... | |
Preconditioner * | Preconditioner_pt |
The pointer to the local preconditioner on this processor. More... | |
Vector< unsigned > | First_proc_for_prec |
The first_row component of the distribution of the processors over the preconditioners. More... | |
Vector< unsigned > | Nproc_for_prec |
The nrow_local component of the distribution of the processors over the preconditioners. More... | |
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 preconditioner i. More... | |
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 preconditioner i. More... | |
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 for preconditioner i. More... | |
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 for preconditioner i. More... | |
unsigned | Color |
the Color of this processor (or the preconditioner number) More... | |
OomphCommunicator * | Global_communicator_pt |
pointer to the global communicator for this preconditioner array More... | |
OomphCommunicator * | Local_communicator_pt |
Vector of communicators for the preconditioners. More... | |
Vector< LinearAlgebraDistribution * > | Distribution_pt |
unsigned | Method |
the communication method in the setup_preconditioners(...) method More... | |
PreconditionerArray - NOTE - first implementation, a number of assumptions / simplifications were made:
Definition at line 49 of file preconditioner_array.h.
|
inline |
Constructor (empty)
Definition at line 105 of file preconditioner_array.h.
|
delete |
Broken copy constructor.
|
inline |
Destructor (empty)
Definition at line 121 of file preconditioner_array.h.
References clean_up_memory().
|
inline |
Clean up memory.
Definition at line 141 of file preconditioner_array.h.
References Color, Distribution_pt, First_proc_for_prec, First_row_for_proc, First_row_from_proc, Global_communicator_pt, i, Local_communicator_pt, Nprec, Nproc_for_prec, Nrow_local_for_proc, Nrow_local_from_proc, and Preconditioner_pt.
Referenced by ~PreconditionerArray().
|
inlineprivate |
helper method for computing the MPI_Isend and MPI_Irecv tags
Definition at line 182 of file preconditioner_array.h.
|
inline |
Definition at line 175 of file preconditioner_array.h.
References Method.
|
delete |
Broken assignment operator.
|
inline |
Setup the preconditioners. Sets up each preconditioner in the array for the corresponding matrix in the vector matrix_pt. The number of preconditioners in the array is taken to be the length of prec_pt.
////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
Definition at line 52 of file preconditioner_array.h.
void oomph::PreconditionerArray::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 the vector matrix_pt. The number of preconditioners in the array is taken to be the length of prec_pt The preconditioners that are not used on this processor are deleted.
|
inline |
Applies each preconditioner to the corresponding vector in r and z.
Definition at line 61 of file preconditioner_array.h.
void oomph::PreconditionerArray::solve_preconditioners | ( | const Vector< DoubleVector > & | r, |
Vector< DoubleVector > & | z | ||
) |
Applies each preconditioner to the corresponding vector in r and z.
|
private |
the Color of this processor (or the preconditioner number)
Definition at line 221 of file preconditioner_array.h.
Referenced by clean_up_memory().
|
private |
Definition at line 231 of file preconditioner_array.h.
Referenced by clean_up_memory().
|
private |
The first_row component of the distribution of the processors over the preconditioners.
Definition at line 198 of file preconditioner_array.h.
Referenced by clean_up_memory().
Storage (indexed [i][j]) for the first row that will be sent from this processor to processor j for preconditioner i.
Definition at line 206 of file preconditioner_array.h.
Referenced by clean_up_memory().
Storage (indexed [i][j]) for the first row that will be received by this processor from processor j for preconditioner i.
Definition at line 214 of file preconditioner_array.h.
Referenced by clean_up_memory().
|
private |
pointer to the global communicator for this preconditioner array
Definition at line 224 of file preconditioner_array.h.
Referenced by clean_up_memory().
|
private |
Vector of communicators for the preconditioners.
Definition at line 227 of file preconditioner_array.h.
Referenced by clean_up_memory().
|
private |
the communication method in the setup_preconditioners(...) method
Definition at line 237 of file preconditioner_array.h.
Referenced by method(), and PreconditionerArray().
|
private |
the number of preconditioner in the array
Definition at line 191 of file preconditioner_array.h.
Referenced by clean_up_memory(), and PreconditionerArray().
|
private |
The nrow_local component of the distribution of the processors over the preconditioners.
Definition at line 202 of file preconditioner_array.h.
Referenced by clean_up_memory().
Storage (indexed [i][j]) for the nrow_local that will be sent from this processor to processor j for preconditioner i.
Definition at line 210 of file preconditioner_array.h.
Referenced by clean_up_memory().
Storage (indexed [i][j]) for the nrow_local that will be received by this processor from processor j for preconditioner i.
Definition at line 218 of file preconditioner_array.h.
Referenced by clean_up_memory().
|
private |
The pointer to the local preconditioner on this processor.
Definition at line 194 of file preconditioner_array.h.
Referenced by clean_up_memory().