46#ifndef MFEM_BP_SOLVER_HPP
47#define MFEM_BP_SOLVER_HPP
84 {
if (
Mpi::Root()) { MFEM_WARNING(
"SetPreconditioner has no effect on BPCGSolver.\n"); } }
124 mutable bool use_bpcg;
125 std::unique_ptr<IterativeSolver> solver_;
131 std::unique_ptr<HypreParMatrix> M_;
132 std::unique_ptr<HypreParMatrix> B_;
133 std::unique_ptr<HypreParMatrix> Q_;
void Copy(Array ©) const
Create a copy of the internal array to the provided copy.
A class to handle Block diagonal preconditioners in a matrix-free implementation.
A class to handle Block systems in a matrix-free implementation.
Wrapper for hypre's ParCSR matrix class.
A class to initialize the size of a Tensor.
Abstract base class for iterative solver.
virtual void SetOperator(const Operator &op) override
Also calls SetOperator for the preconditioner if there is one.
static bool Root()
Return true if the rank in MPI_COMM_WORLD is zero.
Pointer to an Operator of a specified type.
General product operator: x -> (A*B)(x) = A(B(x)).
General linear combination operator: x -> a A(x) + b B(x).
Bramble-Pasciak Conjugate Gradient.
virtual void SetOperator(const Operator &op)
Also calls SetOperator for the preconditioner if there is one.
virtual void SetParticularPreconditioner(const Operator &ppc)
BPCGSolver(MPI_Comm comm_, const Operator &ipc, const Operator &ppc)
virtual void SetPreconditioner(Solver &pc)
This should be called before SetOperator.
BPCGSolver(const Operator &ipc, const Operator &ppc)
virtual void SetIncompletePreconditioner(const Operator &ipc)
void UpdateVectors()
Bramble-Pasciak CG.
virtual void Mult(const Vector &b, Vector &x) const
Operator application: y=A(x).
Bramble-Pasciak Solver for Darcy equation.
virtual void SetOperator(const Operator &op)
Set/update the solver for the given operator.
static HypreParMatrix * ConstructMassPreconditioner(ParBilinearForm &mVarf, real_t alpha=0.5)
Assemble a preconditioner for the mass matrix.
BramblePasciakSolver(ParBilinearForm *mVarf, ParMixedBilinearForm *bVarf, const BPSParameters ¶m)
System and mass preconditioner are constructed from bilinear forms.
void SetEssZeroDofs(const Array< int > &dofs)
virtual int GetNumIterations() const
virtual void Mult(const Vector &x, Vector &y) const
Operator application: y=A(x).
Abstract solver class for Darcy's flow.
Parameters for the BramblePasciakSolver method.