12#ifndef MFEM_HYBRIDIZATION
13#define MFEM_HYBRIDIZATION
69 std::unique_ptr<class HybridizationExtension>
ext;
71 std::unique_ptr<BilinearFormIntegrator>
c_bfi;
80 std::unique_ptr<SparseMatrix>
Ct;
82 std::unique_ptr<SparseMatrix>
H;
90 std::unique_ptr<HypreParMatrix>
pC,
P_pc;
132 {
c_bfi.reset(c_integ); }
Data type dense matrix using column-major storage.
Rank 3 tensor (array of matrices)
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Extension class supporting Hybridization on device (GPU).
Auxiliary class Hybridization, used to implement BilinearForm hybridization.
void Reset()
Destroy the current hybridization matrix while preserving the computed constraint matrix and the set ...
void AssembleElementMatrices(const class DenseTensor &el_mats)
Assemble all of the element matrices given in the form of a DenseTensor.
~Hybridization()
Destructor.
void Init(const Array< int > &ess_tdof_list)
Prepare the Hybridization object for assembly.
std::unique_ptr< HypreParMatrix > pC
SparseMatrix & GetMatrix()
Return the serial hybridized matrix.
void UseExternalBdrConstraintIntegrators()
Indicate that boundary constraint integrators are not owned.
void EnableDeviceExecution()
Turns on device execution.
FiniteElementSpace & c_fes
std::vector< BilinearFormIntegrator * > boundary_constraint_integs
The constraint boundary face integrators.
void AssembleBdrMatrix(int bdr_el, const DenseMatrix &A)
Assemble the boundary element matrix A into the hybridized system matrix.
Array< int > * GetBdrConstraintIntegratorMarker(int i)
Access all boundary markers added with AddBdrConstraintIntegrator().
bool extern_bdr_constr_integs
Indicates if the boundary_constraint_integs integrators are owned externally.
void SetOperatorType(Operator::Type tid)
Set the operator type id for the parallel hybridized matrix/operator.
std::unique_ptr< SparseMatrix > Ct
The constraint matrix.
void AssembleMatrix(int el, const DenseMatrix &A)
Assemble the element matrix A into the hybridized system matrix.
void MultAfInv(const Vector &b, const Vector &lambda, Vector &bf, int mode) const
std::unique_ptr< HypreParMatrix > P_pc
std::unique_ptr< SparseMatrix > H
The Schur complement system for the Lagrange multiplier.
void GetIBDofs(int el, Array< int > &i_dofs, Array< int > &b_dofs) const
Returns the local indices of the i-dofs and b-dofs of element el.
BilinearFormIntegrator & GetBdrConstraintIntegrator(int i)
Access all integrators added with AddBdrConstraintIntegrator().
void AddBdrConstraintIntegrator(BilinearFormIntegrator *c_integ)
void ComputeH()
Construct the Schur complement system.
std::unique_ptr< class HybridizationExtension > ext
Extension for device execution.
Array< int > hat_dofs_marker
void ComputeSolution(const Vector &b, const Vector &sol_r, Vector &sol) const
Reconstruct the solution of the original system sol from solution of the hybridized system sol_r and ...
Array< int > Af_f_offsets
FiniteElementSpace & fes
The finite element space.
void Finalize()
Finalize the construction of the hybridized matrix.
void AddBdrConstraintIntegrator(BilinearFormIntegrator *c_integ, Array< int > &bdr_marker)
Hybridization(FiniteElementSpace *fespace, FiniteElementSpace *c_fespace)
Constructor.
HypreParMatrix & GetParallelMatrix()
Return the parallel hybridized matrix.
std::vector< Array< int > * > boundary_constraint_integs_marker
Boundary markers for constraint face integrators.
void GetParallelMatrix(OperatorHandle &H_h) const
Return the parallel hybridized matrix in the format specified by SetOperatorType().
void GetBDofs(int el, int &num_idofs, Array< int > &b_dofs) const
Returns global indices of the b-dofs of element el.
void ConstructC()
Construct the constraint matrix.
std::unique_ptr< BilinearFormIntegrator > c_bfi
The constraint integrator.
void ReduceRHS(const Vector &b, Vector &b_r) const
Perform the reduction of the given right-hand side b to a right-hand side vector b_r for the hybridiz...
void SetConstraintIntegrator(BilinearFormIntegrator *c_integ)
Set the integrator that will be used to construct the constraint matrix C.
Wrapper for hypre's ParCSR matrix class.
Pointer to an Operator of a specified type.
void SetType(Operator::Type tid)
Invoke Clear() and set a new type id.
OpType * Is() const
Return the Operator pointer dynamically cast to a specified OpType.
Type
Enumeration defining IDs for some classes derived from Operator.