54 std::ostringstream error_message;
55 error_message <<
"The solid mesh pointer must be set.\n"
56 <<
"Use method set_solid_mesh(...)";
141 oomph_info <<
"Time to assemble inverse mass matrix [sec]: "
260 oomph_info <<
"Time to build E (BFBt) matrix vector operator E [sec]: "
294 oomph_info <<
"Time to assemble Q (inverse diagonal "
349 oomph_info <<
"Time to build QBt matrix vector operator [sec]: "
374 oomph_info <<
"Time to build F Matrix Vector Operator [sec]: "
410 oomph_info <<
"Time to build Bt Matrix Vector Operator [sec]: "
501 std::ostringstream error_message;
502 error_message <<
"setup must be called before using preconditioner_solve";
508 if (z.
nrow() !=
r.nrow())
510 std::ostringstream error_message;
511 error_message <<
"The vectors z and r must have the same number of "
527 z.
build(
r.distribution_pt(), 0.0);
546 oomph_info <<
"LSC prec solve: Time for get block vector: "
558 std::ostringstream error_message;
559 error_message <<
"P_preconditioner_pt has not been set.";
572 oomph_info <<
"LSC prec solve: First P solve [nrow="
600 oomph_info <<
"LSC prec solve: E matrix vector product: "
615 oomph_info <<
"LSC prec solve: Second P solve [nrow="
646 oomph_info <<
"LSC prec solve: G matrix vector product: "
669 std::ostringstream error_message;
670 error_message <<
"F_preconditioner_pt has not been set.";
692 oomph_info <<
"LSC prec solve: F solve [nrow="
777 for (
unsigned e = 0;
e < n_el;
e++)
799 std::ostringstream error_message;
800 error_message <<
"Failed cast to "
801 <<
"SolidElementWithDiagonalMassMatrix*\n"
802 <<
"Element is of type: "
808 "PressureBasedSolidLSCPreconditioner::assemble_"
809 "mass_matrix_diagonal()",
834 for (
unsigned p = 0;
p <
nproc;
p++)
889 for (
unsigned p = 0;
p <
nproc;
p++)
922 for (
unsigned p = 0;
p <
nproc;
p++)
1086 for (
unsigned p = 0;
p <
nproc;
p++)
1115 for (
unsigned p = 0;
p <
nproc;
p++)
1273 for (
unsigned e = 0;
e <
n_el;
e++)
1294 std::ostringstream error_message;
1295 error_message <<
"Failed cast to "
1296 <<
"SolidElementWithDiagonalMassMatrix*\n"
1297 <<
"Element is of type: "
1303 "PressureBasedSolidLSCPreconditioner::assemble_mass_"
1304 "matrix_diagonal()",
void return_block_vector(const unsigned &n, const DoubleVector &b, DoubleVector &v) const
Takes the n-th block ordered vector, b, and copies its entries to the appropriate entries in the natu...
unsigned ndof_types_in_mesh(const unsigned &i) const
Return the number of DOF types in mesh i. WARNING: This should only be used by the upper-most master ...
const LinearAlgebraDistribution * master_distribution_pt() const
Access function to the distribution of the master preconditioner. If this preconditioner does not hav...
bool any_mesh_distributed() const
Check if any of the meshes are distributed. This is equivalent to problem.distributed() and is used a...
void get_block(const unsigned &i, const unsigned &j, CRDoubleMatrix &output_matrix, const bool &ignore_replacement_block=false) const
Put block (i,j) into output_matrix. This block accounts for any coarsening of dof types and any repla...
int index_in_block(const unsigned &i_dof) const
Given a global dof number, returns the index in the block it belongs to. This is the overall index,...
void get_block_vector(const unsigned &n, const DoubleVector &v, DoubleVector &b) const
Takes the naturally ordered vector, v and returns the n-th block vector, b. Here n is the block numbe...
int block_number(const unsigned &i_dof) const
Return the block number corresponding to a global index i_dof.
bool is_subsidiary_block_preconditioner() const
Return true if this preconditioner is a subsidiary preconditioner.
unsigned ndof_types() const
Return the total number of DOF types.
void setup_matrix_vector_product(MatrixVectorProduct *matvec_prod_pt, CRDoubleMatrix *block_pt, const Vector< unsigned > &block_col_indices)
Setup a matrix vector product. matvec_prod_pt is a pointer to the MatrixVectorProduct,...
CRDoubleMatrix * matrix_pt() const
Access function to matrix_pt. If this is the master then cast the matrix pointer to MATRIX*,...
const LinearAlgebraDistribution * block_distribution_pt(const unsigned &b) const
Access function to the block distributions (const version).
virtual void block_setup()
Determine the size of the matrix blocks and setup the lookup schemes relating the global degrees of f...
void set_mesh(const unsigned &i, const Mesh *const mesh_pt, const bool &allow_multiple_element_type_in_mesh=false)
Set the i-th mesh for this block preconditioner. Note: The method set_nmesh(...) must be called befor...
A class for compressed row matrices. This is a distributable object.
void build_without_copy(const unsigned &ncol, const unsigned &nnz, double *value, int *column_index, int *row_start)
keeps the existing distribution and just matrix that is stored without copying the matrix data
bool distributed() const
distribution is serial or distributed
unsigned nrow() const
access function to the number of global rows.
unsigned nrow_local() const
access function for the num of local rows on this processor.
unsigned first_row() const
access function for the first row on this processor
A vector in the mathematical sense, initially developed for linear algebra type applications....
void build(const DoubleVector &old_vector)
Just copys the argument DoubleVector.
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
bool is_halo() const
Is this element a halo?
unsigned ndof() const
Return the number of equations/dofs in the element.
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number.
Describes the distribution of a distributable linear algebra type object. Typically this is a contain...
Matrix vector product helper class - primarily a wrapper to Trilinos's Epetra matrix vector product m...
void multiply_transpose(const DoubleVector &x, DoubleVector &y) const
Apply the transpose of the operator to the vector x and return the result in the vector y.
void multiply(const DoubleVector &x, DoubleVector &y) const
Apply the operator to the vector x and return the result in the vector y.
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
unsigned long nelement() const
Return number of elements in the mesh.
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
virtual const OomphCommunicator * comm_pt() const
Get function for comm pointer.
virtual void setup(DoubleMatrixBase *matrix_pt)
Setup the preconditioner: store the matrix pointer and the communicator pointer then call preconditio...
virtual void preconditioner_solve(const DoubleVector &r, DoubleVector &z)=0
Apply the preconditioner. Pure virtual generic interface function. This method should apply the preco...
MatrixVectorProduct * QBt_mat_vec_pt
MatrixVectorProduct operator for QBt if BFBt is not to be formed.
bool Form_BFBt_product
indicates whether BFBt should be formed or the component matrices should be retained....
CRDoubleMatrix * assemble_mass_matrix_diagonal()
Helper function to assemble the diagonal of the mass matrix from the elemental contributions defined ...
bool Preconditioner_has_been_setup
Control flag is true if the preconditioner has been setup (used so we can wipe the data when the prec...
Preconditioner * F_preconditioner_pt
Pointer to the 'preconditioner' for the F matrix.
MatrixVectorProduct * E_mat_vec_pt
MatrixVectorProduct operator for E (BFBt) if BFBt is to be formed.
bool Doc_time
Set Doc_time to true for outputting results of timings.
Mesh * Solid_mesh_pt
the pointer to the mesh of block preconditionable solid elements.
bool F_preconditioner_is_block_preconditioner
Boolean indicating whether the momentum system preconditioner is a block preconditioner.
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply preconditioner to Vector r.
void setup()
Broken assignment operator.
MatrixVectorProduct * Bt_mat_vec_pt
MatrixVectorProduct operator for Bt;.
bool Using_default_p_preconditioner
flag indicating whether the default P preconditioner is used
MatrixVectorProduct * F_mat_vec_pt
MatrixVectorProduct operator for F if BFBt is not to be formed.
void clean_up_memory()
Helper function to delete preconditioner data.
bool Using_default_f_preconditioner
flag indicating whether the default F preconditioner is used
Preconditioner * P_preconditioner_pt
Pointer to the 'preconditioner' for the pressure matrix.
bool P_matrix_using_scaling
Control flag is true if mass matrix diagonal scaling is used in the Schur complement approximation.
Pure virtual base class for elements that can be used with PressureBasedSolidLSCPreconditioner.
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
Preconditioner * create_exact_preconditioner()
Factory function to create suitable exact preconditioner.
double timer()
returns the time in seconds after some point in past
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...