23 for (
int i = 0; i < ess_tdof_list.
Size(); i++)
25 int tdof = ess_tdof_list[i];
56 for (
int i = 0; i <
nblocks; i++)
85 PtAP_r =
RAP(Pi,A_r,Pj);
93 PtAP_i =
RAP(Pi,A_i,Pj);
112 for (
int i = 0; i <
nblocks; i++)
117 R->
SetBlock(i, i, const_cast<SparseMatrix*>(R_));
164 for (
int j = 0; j <
nblocks; j++)
167 for (
int i = 0; i <
ess_tdofs[j]->Size(); i++)
171 B_r(gdof) = X_r(gdof);
172 B_i(gdof) = X_i(gdof);
201 const int remove_zeros = 0;
233 Vector X_r(const_cast<Vector&>(X), 0, m);
234 Vector X_i(const_cast<Vector&>(X), m, m);
254 for (
int i = 0; i <
nblocks; i++)
277 for (
int i = 0; i <
nblocks; i++)
void SetEssentialTrueDofs(const Array< int > &ess_tdof_list)
Determine and save internally essential reduced true dofs.
void EliminateRowsCols(const Array< int > &rows_cols, const HypreParVector &X, HypreParVector &B)
int owns_blocks
If owns_blocks the SparseMatrix objects Aij will be deallocated.
void SetSize(int s)
Resize the vector to size s.
Mimic the action of a complex operator using two real operators.
Pointer to an Operator of a specified type.
int Width() const
Get the width (size of input) of the Operator. Synonym with NumCols().
int Size() const
Returns the size of the vector.
bool HasEliminatedBC() const
Operator & GetBlock(int i, int j)
Return a reference to block i,j.
void SetBlock(int i, int j, SparseMatrix *mat)
Set A(i,j) = mat.
void ReduceSystem(Vector &x, Vector &X, Vector &B, int copy_interior=0) const
Set the reduced solution X and r.h.s B vectors from the full linear system solution x and r...
void RAP(const DenseMatrix &A, const DenseMatrix &P, DenseMatrix &RAP)
void SetSubVectorComplement(const Array< int > &dofs, const double val)
Set all vector entries NOT in the dofs Array to the given val.
virtual void MultTranspose(const Vector &x, Vector &y) const
Action of the transpose operator.
HypreParMatrix * EliminateCols(const Array< int > &cols)
void ComputeSolution(const Vector &sc_sol, Vector &sol) const
virtual void Mult(const Vector &x, Vector &y) const
Operator application.
virtual void Mult(const Vector &x, Vector &y) const
Matrix-Vector Multiplication y = A*x.
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
void EliminateRows(const Array< int > &rows)
Eliminate rows from the diagonal and off-diagonal blocks of the matrix.
ComplexOperator & GetSchurComplexOperator()
SparseMatrix & GetBlock(int i, int j)
Return a reference to block (i,j). Reference may be invalid if Aij(i,j) == NULL.
int Size() const
Return the logical size of the array.
void FormSystemMatrix(Operator::DiagonalPolicy diag_policy)
Wrapper for hypre's ParCSR matrix class.
A class to handle Block systems in a matrix-free implementation.
void SetBlock(int iRow, int iCol, Operator *op, double c=1.0)
Add a block op in the block-entry (iblock, jblock).
int IsZeroBlock(int i, int j) const
Check if block (i,j) is a zero block.
void Reset(OpType *A, bool own_A=true)
Reset the OperatorHandle to the given OpType pointer, A.