12#ifndef MFEM_STATIC_CONDENSATION
13#define MFEM_STATIC_CONDENSATION
78 bool Parallel()
const {
return (tr_pfes != NULL); }
80 bool Parallel()
const {
return false; }
106 void Init(
bool symmetric,
bool block_diagonal);
147 return S_e || pS_e.
Ptr();
193 int copy_interior = 0)
const;
Data type dense matrix using column-major storage.
Collection of finite elements from the same family in multiple dimensions. This class is used to matc...
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
virtual int GetTrueVSize() const
Return the number of vector true (conforming) dofs.
static void ListToMarker(const Array< int > &list, int marker_size, Array< int > &marker, int mark_val=-1)
Convert an array of indices (list) to a Boolean marker array where all indices in the list are marked...
static void MarkerToList(const Array< int > &marker, Array< int > &list)
Convert a Boolean marker array to a list containing all marked indices.
int GetVSize() const
Return the number of vector dofs, i.e. GetNDofs() x GetVDim().
Wrapper for hypre's ParCSR matrix class.
Class used by MFEM to store pointers to host and/or device memory.
Pointer to an Operator of a specified type.
void SetType(Operator::Type tid)
Invoke Clear() and set a new type id.
Operator * Ptr() const
Access the underlying Operator pointer.
OpType * Is() const
Return the Operator pointer dynamically cast to a specified OpType.
DiagonalPolicy
Defines operator diagonal policy upon elimination of rows and/or columns.
Type
Enumeration defining IDs for some classes derived from Operator.
Abstract parallel finite element space.
HypreParMatrix & GetParallelMatrixElim()
Return the eliminated part of the parallel Schur complement matrix.
void AssembleMatrix(int el, const DenseMatrix &elmat)
int GetNPrDofs() const
Return the number of vector private dofs.
StaticCondensation(FiniteElementSpace *fespace)
Construct a StaticCondensation object.
void SetOperatorType(Operator::Type tid)
Set the operator type id for the parallel reduced matrix/operator.
void AssembleBdrMatrix(int el, const DenseMatrix &elmat)
void Finalize()
Finalize the construction of the Schur complement matrix.
void EliminateReducedTrueDofs(Matrix::DiagonalPolicy dpolicy)
Eliminate the internal reduced true dofs (set using SetEssentialTrueDofs()) from the Schur complement...
SparseMatrix & GetMatrix()
Return the serial Schur complement matrix.
void ConvertMarkerToReducedTrueDofs(const Array< int > &ess_tdof_marker, Array< int > &ess_rtdof_marker) const
void EliminateReducedTrueDofs(const Array< int > &ess_rtdof_list, Matrix::DiagonalPolicy dpolicy)
Eliminate the given reduced true dofs from the Schur complement matrix S.
bool ReducesTrueVSize() const
void Init(bool symmetric, bool block_diagonal)
void SetEssentialTrueDofs(const Array< int > &ess_tdof_list)
Determine and save internally essential reduced true dofs.
FiniteElementSpace * GetTraceFESpace()
Return a pointer to the reduced/trace FE space.
void ReduceSystem(Vector &x, Vector &b, 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 GetParallelMatrix(OperatorHandle &S_h) const
Return the parallel Schur complement matrix in the format specified by SetOperatorType().
void ComputeSolution(const Vector &b, const Vector &sc_sol, Vector &sol) const
HypreParMatrix & GetParallelMatrix()
Return the parallel Schur complement matrix.
void GetParallelMatrixElim(OperatorHandle &S_e_h) const
Return the eliminated part of the parallel Schur complement matrix in the format specified by SetOper...
ParFiniteElementSpace * GetParTraceFESpace()
Return a pointer to the parallel reduced/trace FE space.
SparseMatrix & GetMatrixElim()
Return the eliminated part of the serial Schur complement matrix.
void ReduceRHS(const Vector &b, Vector &sc_b) const
~StaticCondensation()
Destroy a StaticCondensation object.
void ConvertListToReducedTrueDofs(const Array< int > &ess_tdof_list_, Array< int > &ess_rtdof_list_) const
bool HasEliminatedBC() const
Return true if essential boundary conditions have been eliminated from the Schur complement matrix.
void ReduceSolution(const Vector &sol, Vector &sc_sol) const
int GetNExDofs() const
Return the number of vector exposed/reduced dofs.