MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::BilinearForm Class Reference

A "square matrix" operator for the associated FE space and BLFIntegrators The sum of all the BLFIntegrators can be used form the matrix M. This class also supports other assembly levels specified via the SetAssemblyLevel() function. More...

#include <bilinearform.hpp>

Inheritance diagram for mfem::BilinearForm:
[legend]
Collaboration diagram for mfem::BilinearForm:
[legend]

Public Member Functions

 BilinearForm (FiniteElementSpace *f)
 Creates bilinear form associated with FE space *f.
 
 BilinearForm (FiniteElementSpace *f, BilinearForm *bf, int ps=0)
 Create a BilinearForm on the FiniteElementSpace f, using the same integrators as the BilinearForm bf.
 
int Size () const
 Get the size of the BilinearForm as a square matrix.
 
void SetAssemblyLevel (AssemblyLevel assembly_level)
 Set the desired assembly level.
 
void EnableSparseMatrixSorting (bool enable_it)
 Force the sparse matrix column indices to be sorted when using AssemblyLevel::FULL.
 
AssemblyLevel GetAssemblyLevel () const
 Returns the assembly level.
 
HybridizationGetHybridization () const
 
void EnableStaticCondensation ()
 Enable the use of static condensation. For details see the description for class StaticCondensation in fem/staticcond.hpp This method should be called before assembly. If the number of unknowns after static condensation is not reduced, it is not enabled.
 
bool StaticCondensationIsEnabled () const
 Check if static condensation was actually enabled by a previous call to EnableStaticCondensation().
 
FiniteElementSpaceSCFESpace () const
 Return the trace FE space associated with static condensation.
 
void EnableHybridization (FiniteElementSpace *constr_space, BilinearFormIntegrator *constr_integ, const Array< int > &ess_tdof_list)
 Enable hybridization.
 
void UsePrecomputedSparsity (int ps=1)
 For scalar FE spaces, precompute the sparsity pattern of the matrix (assuming dense element matrices) based on the types of integrators present in the bilinear form.
 
void UseSparsity (int *I, int *J, bool isSorted)
 Use the given CSR sparsity pattern to allocate the internal SparseMatrix.
 
void UseSparsity (SparseMatrix &A)
 Use the sparsity of A to allocate the internal SparseMatrix.
 
void AllocateMatrix ()
 Pre-allocate the internal SparseMatrix before assembly. If the internal flag precompute_sparsity is set, the matrix is allocated in CSR format (i.e. finalized) and the entries are initialized with zeros.
 
Array< BilinearFormIntegrator * > * GetDBFI ()
 Access all the integrators added with AddDomainIntegrator().
 
Array< Array< int > * > * GetDBFI_Marker ()
 Access all boundary markers added with AddDomainIntegrator(). If no marker was specified when the integrator was added, the corresponding pointer (to Array<int>) will be NULL.
 
Array< BilinearFormIntegrator * > * GetBBFI ()
 Access all the integrators added with AddBoundaryIntegrator().
 
Array< Array< int > * > * GetBBFI_Marker ()
 Access all boundary markers added with AddBoundaryIntegrator(). If no marker was specified when the integrator was added, the corresponding pointer (to Array<int>) will be NULL.
 
Array< BilinearFormIntegrator * > * GetFBFI ()
 Access all integrators added with AddInteriorFaceIntegrator().
 
Array< BilinearFormIntegrator * > * GetBFBFI ()
 Access all integrators added with AddBdrFaceIntegrator().
 
Array< Array< int > * > * GetBFBFI_Marker ()
 Access all boundary markers added with AddBdrFaceIntegrator(). If no marker was specified when the integrator was added, the corresponding pointer (to Array<int>) will be NULL.
 
const real_toperator() (int i, int j)
 Returns a reference to: \( M_{ij} \).
 
virtual real_tElem (int i, int j)
 Returns a reference to: \( M_{ij} \).
 
virtual const real_tElem (int i, int j) const
 Returns constant reference to: \( M_{ij} \).
 
virtual void Mult (const Vector &x, Vector &y) const
 Matrix vector multiplication: \( y = M x \).
 
void FullMult (const Vector &x, Vector &y) const
 Matrix vector multiplication with the original uneliminated matrix. The original matrix is \( M + M_e \) so we have: \( y = M x + M_e x \).
 
virtual void AddMult (const Vector &x, Vector &y, const real_t a=1.0) const
 Add the matrix vector multiple to a vector: \( y += a M x \).
 
void FullAddMult (const Vector &x, Vector &y) const
 Add the original uneliminated matrix vector multiple to a vector. The original matrix is \( M + Me \) so we have: \( y += M x + M_e x \).
 
virtual void AddMultTranspose (const Vector &x, Vector &y, const real_t a=1.0) const
 Add the matrix transpose vector multiplication: \( y += a M^T x \).
 
void FullAddMultTranspose (const Vector &x, Vector &y) const
 Add the original uneliminated matrix transpose vector multiple to a vector. The original matrix is \( M + M_e \) so we have: \( y += M^T x + {M_e}^T x \).
 
virtual void MultTranspose (const Vector &x, Vector &y) const
 Matrix transpose vector multiplication: \( y = M^T x \).
 
real_t InnerProduct (const Vector &x, const Vector &y) const
 Compute \( y^T M x \).
 
virtual MatrixInverseInverse () const
 Returns a pointer to (approximation) of the matrix inverse: \( M^{-1} \) (currently returns NULL)
 
virtual void Finalize (int skip_zeros=1)
 Finalizes the matrix initialization if the AssemblyLevel is AssemblyLevel::LEGACY. THe matrix that gets finalized is different if you are using static condensation or hybridization.
 
const SparseMatrixSpMat () const
 Returns a const reference to the sparse matrix: \( M \).
 
SparseMatrixSpMat ()
 Returns a reference to the sparse matrix: \( M \).
 
bool HasSpMat ()
 Returns true if the sparse matrix is not null, false otherwise.
 
SparseMatrixLoseMat ()
 Nullifies the internal matrix \( M \) and returns a pointer to it. Used for transferring ownership.
 
const SparseMatrixSpMatElim () const
 Returns a const reference to the sparse matrix of eliminated b.c.: \( M_e \).
 
SparseMatrixSpMatElim ()
 Returns a reference to the sparse matrix of eliminated b.c.: \( M_e \).
 
bool HasSpMatElim ()
 Returns true if the sparse matrix of eliminated b.c.s is not null, false otherwise.
 
void AddDomainIntegrator (BilinearFormIntegrator *bfi)
 Adds new Domain Integrator. Assumes ownership of bfi.
 
void AddDomainIntegrator (BilinearFormIntegrator *bfi, Array< int > &elem_marker)
 
void AddBoundaryIntegrator (BilinearFormIntegrator *bfi)
 Adds new Boundary Integrator. Assumes ownership of bfi.
 
void AddBoundaryIntegrator (BilinearFormIntegrator *bfi, Array< int > &bdr_marker)
 Adds new Boundary Integrator, restricted to specific boundary attributes.
 
void AddInteriorFaceIntegrator (BilinearFormIntegrator *bfi)
 Adds new interior Face Integrator. Assumes ownership of bfi.
 
void AddBdrFaceIntegrator (BilinearFormIntegrator *bfi)
 Adds new boundary Face Integrator. Assumes ownership of bfi.
 
void AddBdrFaceIntegrator (BilinearFormIntegrator *bfi, Array< int > &bdr_marker)
 Adds new boundary Face Integrator, restricted to specific boundary attributes.
 
void operator= (const real_t a)
 Sets all sparse values of \( M \) and \( M_e \) to 'a'.
 
void Assemble (int skip_zeros=1)
 Assembles the form i.e. sums over all domain/bdr integrators.
 
virtual void AssembleDiagonal (Vector &diag) const
 Assemble the diagonal of the bilinear form into diag. Note that diag is a tdof Vector.
 
virtual const OperatorGetProlongation () const
 Get the finite element space prolongation operator.
 
virtual const OperatorGetRestriction () const
 Get the finite element space restriction operator.
 
virtual const OperatorGetOutputProlongation () const
 Get the output finite element space prolongation matrix.
 
virtual const OperatorGetOutputRestrictionTranspose () const
 Returns the output fe space restriction matrix, transposed.
 
virtual const OperatorGetOutputRestriction () const
 Get the output finite element space restriction matrix.
 
void SerialRAP (OperatorHandle &A)
 Compute serial RAP operator and store it in A as a SparseMatrix.
 
virtual void FormLinearSystem (const Array< int > &ess_tdof_list, Vector &x, Vector &b, OperatorHandle &A, Vector &X, Vector &B, int copy_interior=0)
 Form the linear system A X = B, corresponding to this bilinear form and the linear form b(.).
 
template<typename OpType >
void FormLinearSystem (const Array< int > &ess_tdof_list, Vector &x, Vector &b, OpType &A, Vector &X, Vector &B, int copy_interior=0)
 Form the linear system A X = B, corresponding to this bilinear form and the linear form b(.).
 
virtual void FormSystemMatrix (const Array< int > &ess_tdof_list, OperatorHandle &A)
 Form the linear system matrix A, see FormLinearSystem() for details.
 
template<typename OpType >
void FormSystemMatrix (const Array< int > &ess_tdof_list, OpType &A)
 Form the linear system matrix A, see FormLinearSystem() for details.
 
virtual void RecoverFEMSolution (const Vector &X, const Vector &b, Vector &x)
 Recover the solution of a linear system formed with FormLinearSystem().
 
void ComputeElementMatrices ()
 Compute and store internally all element matrices.
 
void FreeElementMatrices ()
 Free the memory used by the element matrices.
 
void ComputeElementMatrix (int i, DenseMatrix &elmat)
 Compute the element matrix of the given element.
 
void ComputeBdrElementMatrix (int i, DenseMatrix &elmat)
 Compute the boundary element matrix of the given boundary element.
 
void AssembleElementMatrix (int i, const DenseMatrix &elmat, int skip_zeros=1)
 Assemble the given element matrix.
 
void AssembleElementMatrix (int i, const DenseMatrix &elmat, Array< int > &vdofs, int skip_zeros=1)
 Assemble the given element matrix.
 
void AssembleBdrElementMatrix (int i, const DenseMatrix &elmat, int skip_zeros=1)
 Assemble the given boundary element matrix.
 
void AssembleBdrElementMatrix (int i, const DenseMatrix &elmat, Array< int > &vdofs, int skip_zeros=1)
 Assemble the given boundary element matrix.
 
void EliminateEssentialBC (const Array< int > &bdr_attr_is_ess, const Vector &sol, Vector &rhs, DiagonalPolicy dpolicy=DIAG_ONE)
 Eliminate essential boundary DOFs from the system.
 
void EliminateEssentialBC (const Array< int > &bdr_attr_is_ess, DiagonalPolicy dpolicy=DIAG_ONE)
 Eliminate essential boundary DOFs from the system matrix.
 
void EliminateEssentialBCDiag (const Array< int > &bdr_attr_is_ess, real_t value)
 Perform elimination and set the diagonal entry to the given value.
 
void EliminateVDofs (const Array< int > &vdofs, const Vector &sol, Vector &rhs, DiagonalPolicy dpolicy=DIAG_ONE)
 Eliminate the given vdofs. NOTE: here, vdofs is a list of DOFs.
 
void EliminateVDofs (const Array< int > &vdofs, DiagonalPolicy dpolicy=DIAG_ONE)
 Eliminate the given vdofs, storing the eliminated part internally in \( M_e \).
 
void EliminateEssentialBCFromDofs (const Array< int > &ess_dofs, const Vector &sol, Vector &rhs, DiagonalPolicy dpolicy=DIAG_ONE)
 Similar to EliminateVDofs(const Array<int> &, const Vector &, Vector &, DiagonalPolicy) but here ess_dofs is a marker (boolean) array on all vector-dofs (ess_dofs[i] < 0 is true).
 
void EliminateEssentialBCFromDofs (const Array< int > &ess_dofs, DiagonalPolicy dpolicy=DIAG_ONE)
 Similar to EliminateVDofs(const Array<int> &, DiagonalPolicy) but here ess_dofs is a marker (boolean) array on all vector-dofs (ess_dofs[i] < 0 is true).
 
void EliminateEssentialBCFromDofsDiag (const Array< int > &ess_dofs, real_t value)
 Perform elimination and set the diagonal entry to the given value.
 
void EliminateVDofsInRHS (const Array< int > &vdofs, const Vector &x, Vector &b)
 Use the stored eliminated part of the matrix (see EliminateVDofs(const Array<int> &, DiagonalPolicy)) to modify the r.h.s. b; vdofs is a list of DOFs (non-directional, i.e. >= 0).
 
real_t FullInnerProduct (const Vector &x, const Vector &y) const
 Compute inner product for full uneliminated matrix: \( y^T M x + y^T M_e x \).
 
virtual void Update (FiniteElementSpace *nfes=NULL)
 Update the FiniteElementSpace and delete all data associated with the old one.
 
MFEM_DEPRECATED FiniteElementSpaceGetFES ()
 (DEPRECATED) Return the FE space associated with the BilinearForm.
 
FiniteElementSpaceFESpace ()
 Return the FE space associated with the BilinearForm.
 
const FiniteElementSpaceFESpace () const
 Read-only access to the associated FiniteElementSpace.
 
void SetDiagonalPolicy (DiagonalPolicy policy)
 Sets Operator::DiagonalPolicy used upon construction of the linear system. Policies include:
 
void UseExternalIntegrators ()
 Indicate that integrators are not owned by the BilinearForm.
 
virtual ~BilinearForm ()
 Deletes internal matrices, bilinear integrators, and the BilinearFormExtension.
 
- Public Member Functions inherited from mfem::Matrix
 Matrix (int s)
 Creates a square matrix of size s.
 
 Matrix (int h, int w)
 Creates a matrix of the given height and width.
 
bool IsSquare () const
 Returns whether the matrix is a square matrix.
 
virtual void Print (std::ostream &out=mfem::out, int width_=4) const
 Prints matrix to stream out.
 
virtual ~Matrix ()
 Destroys matrix.
 
- Public Member Functions inherited from mfem::Operator
void InitTVectors (const Operator *Po, const Operator *Ri, const Operator *Pi, Vector &x, Vector &b, Vector &X, Vector &B) const
 Initializes memory for true vectors of linear system.
 
 Operator (int s=0)
 Construct a square Operator with given size s (default 0).
 
 Operator (int h, int w)
 Construct an Operator with the given height (output size) and width (input size).
 
int Height () const
 Get the height (size of output) of the Operator. Synonym with NumRows().
 
int NumRows () const
 Get the number of rows (size of output) of the Operator. Synonym with Height().
 
int Width () const
 Get the width (size of input) of the Operator. Synonym with NumCols().
 
int NumCols () const
 Get the number of columns (size of input) of the Operator. Synonym with Width().
 
virtual MemoryClass GetMemoryClass () const
 Return the MemoryClass preferred by the Operator.
 
virtual void ArrayMult (const Array< const Vector * > &X, Array< Vector * > &Y) const
 Operator application on a matrix: Y=A(X).
 
virtual void ArrayMultTranspose (const Array< const Vector * > &X, Array< Vector * > &Y) const
 Action of the transpose operator on a matrix: Y=A^t(X).
 
virtual void ArrayAddMult (const Array< const Vector * > &X, Array< Vector * > &Y, const real_t a=1.0) const
 Operator application on a matrix: Y+=A(X) (default) or Y+=a*A(X).
 
virtual void ArrayAddMultTranspose (const Array< const Vector * > &X, Array< Vector * > &Y, const real_t a=1.0) const
 Operator transpose application on a matrix: Y+=A^t(X) (default) or Y+=a*A^t(X).
 
virtual OperatorGetGradient (const Vector &x) const
 Evaluate the gradient operator at the point x. The default behavior in class Operator is to generate an error.
 
void FormLinearSystem (const Array< int > &ess_tdof_list, Vector &x, Vector &b, Operator *&A, Vector &X, Vector &B, int copy_interior=0)
 Form a constrained linear system using a matrix-free approach.
 
void FormRectangularLinearSystem (const Array< int > &trial_tdof_list, const Array< int > &test_tdof_list, Vector &x, Vector &b, Operator *&A, Vector &X, Vector &B)
 Form a column-constrained linear system using a matrix-free approach.
 
void FormSystemOperator (const Array< int > &ess_tdof_list, Operator *&A)
 Return in A a parallel (on truedofs) version of this square operator.
 
void FormRectangularSystemOperator (const Array< int > &trial_tdof_list, const Array< int > &test_tdof_list, Operator *&A)
 Return in A a parallel (on truedofs) version of this rectangular operator (including constraints).
 
void FormDiscreteOperator (Operator *&A)
 Return in A a parallel (on truedofs) version of this rectangular operator.
 
void PrintMatlab (std::ostream &out, int n, int m=0) const
 Prints operator with input size n and output size m in Matlab format.
 
virtual void PrintMatlab (std::ostream &out) const
 Prints operator in Matlab format.
 
virtual ~Operator ()
 Virtual destructor.
 
Type GetType () const
 Return the type ID of the Operator class.
 

Protected Member Functions

void AllocMat ()
 Allocate appropriate SparseMatrix and assign it to mat.
 
void ConformingAssemble ()
 For partially conforming trial and/or test FE spaces, complete the assembly process by performing \( P^t A P \) where \( A \) is the internal sparse matrix and \( P \) is the conforming prolongation matrix of the trial/test FE space. After this call the BilinearForm becomes an operator on the conforming FE space.
 
 BilinearForm ()
 may be used in the construction of derived classes
 
- Protected Member Functions inherited from mfem::Operator
void FormConstrainedSystemOperator (const Array< int > &ess_tdof_list, ConstrainedOperator *&Aout)
 see FormSystemOperator()
 
void FormRectangularConstrainedSystemOperator (const Array< int > &trial_tdof_list, const Array< int > &test_tdof_list, RectangularConstrainedOperator *&Aout)
 see FormRectangularSystemOperator()
 
OperatorSetupRAP (const Operator *Pi, const Operator *Po)
 Returns RAP Operator of this, using input/output Prolongation matrices Pi corresponds to "P", Po corresponds to "Rt".
 

Protected Attributes

SparseMatrixmat
 Sparse matrix \( M \) to be associated with the form. Owned.
 
SparseMatrixmat_e
 Sparse Matrix \( M_e \) used to store the eliminations from the b.c. Owned. \( M + M_e = M_{original} \).
 
FiniteElementSpacefes
 FE space on which the form lives. Not owned.
 
AssemblyLevel assembly
 The AssemblyLevel of the form (AssemblyLevel::LEGACY, AssemblyLevel::FULL, AssemblyLevel::ELEMENT, AssemblyLevel::PARTIAL)
 
int batch
 Element batch size used in the form action (1, 8, num_elems, etc.)
 
BilinearFormExtensionext
 Extension for supporting Full Assembly (FA), Element Assembly (EA),Partial Assembly (PA), or Matrix Free assembly (MF).
 
bool sort_sparse_matrix = false
 
long sequence
 Indicates the Mesh::sequence corresponding to the current state of the BilinearForm.
 
int extern_bfs
 Indicates the BilinearFormIntegrators stored in domain_integs, boundary_integs, interior_face_integs, and boundary_face_integs are owned by another BilinearForm.
 
Array< BilinearFormIntegrator * > domain_integs
 Set of Domain Integrators to be applied.
 
Array< Array< int > * > domain_integs_marker
 Entries are not owned.
 
Array< BilinearFormIntegrator * > boundary_integs
 Set of Boundary Integrators to be applied.
 
Array< Array< int > * > boundary_integs_marker
 Entries are not owned.
 
Array< BilinearFormIntegrator * > interior_face_integs
 Set of interior face Integrators to be applied.
 
Array< BilinearFormIntegrator * > boundary_face_integs
 Set of boundary face Integrators to be applied.
 
Array< Array< int > * > boundary_face_integs_marker
 Entries are not owned.
 
DenseMatrix elemmat
 
Array< int > vdofs
 
DenseTensorelement_matrices
 Owned.
 
StaticCondensationstatic_cond
 Owned.
 
Hybridizationhybridization
 Owned.
 
DiagonalPolicy diag_policy
 This data member allows one to specify what should be done to the diagonal matrix entries and corresponding RHS values upon elimination of the constrained DoFs.
 
int precompute_sparsity
 
- Protected Attributes inherited from mfem::Operator
int height
 Dimension of the output / number of rows in the matrix.
 
int width
 Dimension of the input / number of columns in the matrix.
 

Additional Inherited Members

- Public Types inherited from mfem::Operator
enum  DiagonalPolicy { DIAG_ZERO , DIAG_ONE , DIAG_KEEP }
 Defines operator diagonal policy upon elimination of rows and/or columns. More...
 
enum  Type {
  ANY_TYPE , MFEM_SPARSEMAT , Hypre_ParCSR , PETSC_MATAIJ ,
  PETSC_MATIS , PETSC_MATSHELL , PETSC_MATNEST , PETSC_MATHYPRE ,
  PETSC_MATGENERIC , Complex_Operator , MFEM_ComplexSparseMat , Complex_Hypre_ParCSR ,
  Complex_DenseMat , MFEM_Block_Matrix , MFEM_Block_Operator
}
 Enumeration defining IDs for some classes derived from Operator. More...
 

Detailed Description

A "square matrix" operator for the associated FE space and BLFIntegrators The sum of all the BLFIntegrators can be used form the matrix M. This class also supports other assembly levels specified via the SetAssemblyLevel() function.

Definition at line 60 of file bilinearform.hpp.

Constructor & Destructor Documentation

◆ BilinearForm() [1/3]

mfem::BilinearForm::BilinearForm ( )
inlineprotected

may be used in the construction of derived classes

Definition at line 148 of file bilinearform.hpp.

◆ BilinearForm() [2/3]

mfem::BilinearForm::BilinearForm ( FiniteElementSpace * f)

Creates bilinear form associated with FE space *f.

The pointer f is not owned by the newly constructed object.

Definition at line 67 of file bilinearform.cpp.

◆ BilinearForm() [3/3]

mfem::BilinearForm::BilinearForm ( FiniteElementSpace * f,
BilinearForm * bf,
int ps = 0 )

Create a BilinearForm on the FiniteElementSpace f, using the same integrators as the BilinearForm bf.

The pointer f is not owned by the newly constructed object.

The integrators in bf are copied as pointers and they are not owned by the newly constructed BilinearForm.

The optional parameter ps is used to initialize the internal flag precompute_sparsity, see UsePrecomputedSparsity() for details.

Definition at line 85 of file bilinearform.cpp.

◆ ~BilinearForm()

mfem::BilinearForm::~BilinearForm ( )
virtual

Deletes internal matrices, bilinear integrators, and the BilinearFormExtension.

Definition at line 1182 of file bilinearform.cpp.

Member Function Documentation

◆ AddBdrFaceIntegrator() [1/2]

void mfem::BilinearForm::AddBdrFaceIntegrator ( BilinearFormIntegrator * bfi)

Adds new boundary Face Integrator. Assumes ownership of bfi.

Definition at line 269 of file bilinearform.cpp.

◆ AddBdrFaceIntegrator() [2/2]

void mfem::BilinearForm::AddBdrFaceIntegrator ( BilinearFormIntegrator * bfi,
Array< int > & bdr_marker )

Adds new boundary Face Integrator, restricted to specific boundary attributes.

Assumes ownership of bfi. The array bdr_marker is stored internally as a pointer to the given Array<int> object.

Definition at line 276 of file bilinearform.cpp.

◆ AddBoundaryIntegrator() [1/2]

void mfem::BilinearForm::AddBoundaryIntegrator ( BilinearFormIntegrator * bfi)

Adds new Boundary Integrator. Assumes ownership of bfi.

Definition at line 251 of file bilinearform.cpp.

◆ AddBoundaryIntegrator() [2/2]

void mfem::BilinearForm::AddBoundaryIntegrator ( BilinearFormIntegrator * bfi,
Array< int > & bdr_marker )

Adds new Boundary Integrator, restricted to specific boundary attributes.

Assumes ownership of bfi. The array bdr_marker is stored internally as a pointer to the given Array<int> object.

Definition at line 257 of file bilinearform.cpp.

◆ AddDomainIntegrator() [1/2]

void mfem::BilinearForm::AddDomainIntegrator ( BilinearFormIntegrator * bfi)

Adds new Domain Integrator. Assumes ownership of bfi.

Definition at line 238 of file bilinearform.cpp.

◆ AddDomainIntegrator() [2/2]

void mfem::BilinearForm::AddDomainIntegrator ( BilinearFormIntegrator * bfi,
Array< int > & elem_marker )

Adds new Domain Integrator restricted to certain elements specified by the elem_attr_marker.

Definition at line 244 of file bilinearform.cpp.

◆ AddInteriorFaceIntegrator()

void mfem::BilinearForm::AddInteriorFaceIntegrator ( BilinearFormIntegrator * bfi)

Adds new interior Face Integrator. Assumes ownership of bfi.

Definition at line 264 of file bilinearform.cpp.

◆ AddMult()

virtual void mfem::BilinearForm::AddMult ( const Vector & x,
Vector & y,
const real_t a = 1.0 ) const
inlinevirtual

Add the matrix vector multiple to a vector: \( y += a M x \).

Reimplemented from mfem::Operator.

Definition at line 312 of file bilinearform.hpp.

◆ AddMultTranspose()

virtual void mfem::BilinearForm::AddMultTranspose ( const Vector & x,
Vector & y,
const real_t a = 1.0 ) const
inlinevirtual

Add the matrix transpose vector multiplication: \( y += a M^T x \).

Reimplemented from mfem::Operator.

Definition at line 322 of file bilinearform.hpp.

◆ AllocateMatrix()

void mfem::BilinearForm::AllocateMatrix ( )
inline

Pre-allocate the internal SparseMatrix before assembly. If the internal flag precompute_sparsity is set, the matrix is allocated in CSR format (i.e. finalized) and the entries are initialized with zeros.

Definition at line 264 of file bilinearform.hpp.

◆ AllocMat()

void mfem::BilinearForm::AllocMat ( )
protected

Allocate appropriate SparseMatrix and assign it to mat.

Definition at line 22 of file bilinearform.cpp.

◆ Assemble()

void mfem::BilinearForm::Assemble ( int skip_zeros = 1)

Assembles the form i.e. sums over all domain/bdr integrators.

Definition at line 388 of file bilinearform.cpp.

◆ AssembleBdrElementMatrix() [1/2]

void mfem::BilinearForm::AssembleBdrElementMatrix ( int i,
const DenseMatrix & elmat,
Array< int > & vdofs,
int skip_zeros = 1 )

Assemble the given boundary element matrix.

The boundary element matrix elmat is assembled for the boundary element i, i.e. added to the system matrix. The vdofs of the element are returned in vdofs. The flag skip_zeros skips the zero elements of the matrix, unless they are breaking the symmetry of the system matrix.

Definition at line 366 of file bilinearform.cpp.

◆ AssembleBdrElementMatrix() [2/2]

void mfem::BilinearForm::AssembleBdrElementMatrix ( int i,
const DenseMatrix & elmat,
int skip_zeros = 1 )

Assemble the given boundary element matrix.

The boundary element matrix elmat is assembled for the boundary element i, i.e. added to the system matrix. The flag skip_zeros skips the zero elements of the matrix, unless they are breaking the symmetry of the system matrix.

Definition at line 360 of file bilinearform.cpp.

◆ AssembleDiagonal()

void mfem::BilinearForm::AssembleDiagonal ( Vector & diag) const
virtual

Assemble the diagonal of the bilinear form into diag. Note that diag is a tdof Vector.

When the AssemblyLevel is not LEGACY, and the mesh has hanging nodes, this method returns |P^T| d_l, where d_l is the diagonal of the form before applying conforming assembly, P^T is the transpose of the conforming prolongation, and |.| denotes the entry-wise absolute value. In general, this is just an approximation of the exact diagonal for this case.

Reimplemented from mfem::Operator.

Reimplemented in mfem::ParBilinearForm.

Definition at line 727 of file bilinearform.cpp.

◆ AssembleElementMatrix() [1/2]

void mfem::BilinearForm::AssembleElementMatrix ( int i,
const DenseMatrix & elmat,
Array< int > & vdofs,
int skip_zeros = 1 )

Assemble the given element matrix.

The element matrix elmat is assembled for the element i, i.e. added to the system matrix. The vdofs of the element are returned in vdofs. The flag skip_zeros skips the zero elements of the matrix, unless they are breaking the symmetry of the system matrix.

Definition at line 338 of file bilinearform.cpp.

◆ AssembleElementMatrix() [2/2]

void mfem::BilinearForm::AssembleElementMatrix ( int i,
const DenseMatrix & elmat,
int skip_zeros = 1 )

Assemble the given element matrix.

The element matrix elmat is assembled for the element i, i.e. added to the system matrix. The flag skip_zeros skips the zero elements of the matrix, unless they are breaking the symmetry of the system matrix.

Definition at line 332 of file bilinearform.cpp.

◆ ComputeBdrElementMatrix()

void mfem::BilinearForm::ComputeBdrElementMatrix ( int i,
DenseMatrix & elmat )

Compute the boundary element matrix of the given boundary element.

Definition at line 311 of file bilinearform.cpp.

◆ ComputeElementMatrices()

void mfem::BilinearForm::ComputeElementMatrices ( )

Compute and store internally all element matrices.

Definition at line 926 of file bilinearform.cpp.

◆ ComputeElementMatrix()

void mfem::BilinearForm::ComputeElementMatrix ( int i,
DenseMatrix & elmat )

Compute the element matrix of the given element.

The element matrix is computed by calling the domain integrators or the one stored internally by a prior call of ComputeElementMatrices() is returned when available.

Definition at line 283 of file bilinearform.cpp.

◆ ConformingAssemble()

void mfem::BilinearForm::ConformingAssemble ( )
protected

For partially conforming trial and/or test FE spaces, complete the assembly process by performing \( P^t A P \) where \( A \) is the internal sparse matrix and \( P \) is the conforming prolongation matrix of the trial/test FE space. After this call the BilinearForm becomes an operator on the conforming FE space.

Definition at line 692 of file bilinearform.cpp.

◆ Elem() [1/2]

real_t & mfem::BilinearForm::Elem ( int i,
int j )
virtual

Returns a reference to: \( M_{ij} \).

Implements mfem::Matrix.

Definition at line 212 of file bilinearform.cpp.

◆ Elem() [2/2]

const real_t & mfem::BilinearForm::Elem ( int i,
int j ) const
virtual

Returns constant reference to: \( M_{ij} \).

Implements mfem::Matrix.

Definition at line 217 of file bilinearform.cpp.

◆ EliminateEssentialBC() [1/2]

void mfem::BilinearForm::EliminateEssentialBC ( const Array< int > & bdr_attr_is_ess,
const Vector & sol,
Vector & rhs,
DiagonalPolicy dpolicy = DIAG_ONE )

Eliminate essential boundary DOFs from the system.

The array bdr_attr_is_ess marks boundary attributes that constitute the essential part of the boundary. By default, the diagonal at the essential DOFs is set to 1.0. This behavior is controlled by the argument dpolicy.

Definition at line 968 of file bilinearform.cpp.

◆ EliminateEssentialBC() [2/2]

void mfem::BilinearForm::EliminateEssentialBC ( const Array< int > & bdr_attr_is_ess,
DiagonalPolicy dpolicy = DIAG_ONE )

Eliminate essential boundary DOFs from the system matrix.

Definition at line 986 of file bilinearform.cpp.

◆ EliminateEssentialBCDiag()

void mfem::BilinearForm::EliminateEssentialBCDiag ( const Array< int > & bdr_attr_is_ess,
real_t value )

Perform elimination and set the diagonal entry to the given value.

Definition at line 1003 of file bilinearform.cpp.

◆ EliminateEssentialBCFromDofs() [1/2]

void mfem::BilinearForm::EliminateEssentialBCFromDofs ( const Array< int > & ess_dofs,
const Vector & sol,
Vector & rhs,
DiagonalPolicy dpolicy = DIAG_ONE )

Similar to EliminateVDofs(const Array<int> &, const Vector &, Vector &, DiagonalPolicy) but here ess_dofs is a marker (boolean) array on all vector-dofs (ess_dofs[i] < 0 is true).

Definition at line 1062 of file bilinearform.cpp.

◆ EliminateEssentialBCFromDofs() [2/2]

void mfem::BilinearForm::EliminateEssentialBCFromDofs ( const Array< int > & ess_dofs,
DiagonalPolicy dpolicy = DIAG_ONE )

Similar to EliminateVDofs(const Array<int> &, DiagonalPolicy) but here ess_dofs is a marker (boolean) array on all vector-dofs (ess_dofs[i] < 0 is true).

Definition at line 1077 of file bilinearform.cpp.

◆ EliminateEssentialBCFromDofsDiag()

void mfem::BilinearForm::EliminateEssentialBCFromDofsDiag ( const Array< int > & ess_dofs,
real_t value )

Perform elimination and set the diagonal entry to the given value.

Definition at line 1090 of file bilinearform.cpp.

◆ EliminateVDofs() [1/2]

void mfem::BilinearForm::EliminateVDofs ( const Array< int > & vdofs,
const Vector & sol,
Vector & rhs,
DiagonalPolicy dpolicy = DIAG_ONE )

Eliminate the given vdofs. NOTE: here, vdofs is a list of DOFs.

In this case the eliminations are applied to the internal \( M \) and rhs without storing the elimination matrix \( M_e \).

Definition at line 1020 of file bilinearform.cpp.

◆ EliminateVDofs() [2/2]

void mfem::BilinearForm::EliminateVDofs ( const Array< int > & vdofs,
DiagonalPolicy dpolicy = DIAG_ONE )

Eliminate the given vdofs, storing the eliminated part internally in \( M_e \).

This method works in conjunction with EliminateVDofsInRHS() and allows elimination of boundary conditions in multiple right-hand sides. In this method, vdofs is a list of DOFs.

Definition at line 1039 of file bilinearform.cpp.

◆ EliminateVDofsInRHS()

void mfem::BilinearForm::EliminateVDofsInRHS ( const Array< int > & vdofs,
const Vector & x,
Vector & b )

Use the stored eliminated part of the matrix (see EliminateVDofs(const Array<int> &, DiagonalPolicy)) to modify the r.h.s. b; vdofs is a list of DOFs (non-directional, i.e. >= 0).

Definition at line 1103 of file bilinearform.cpp.

◆ EnableHybridization()

void mfem::BilinearForm::EnableHybridization ( FiniteElementSpace * constr_space,
BilinearFormIntegrator * constr_integ,
const Array< int > & ess_tdof_list )

Enable hybridization.

For details see the description for class Hybridization in fem/hybridization.hpp. This method should be called before assembly.

Definition at line 169 of file bilinearform.cpp.

◆ EnableSparseMatrixSorting()

void mfem::BilinearForm::EnableSparseMatrixSorting ( bool enable_it)
inline

Force the sparse matrix column indices to be sorted when using AssemblyLevel::FULL.

When assembling on device the assembly algorithm uses atomic operations to insert values in the sparse matrix, which can result in different column index orderings across runs. Calling this method with enable_it set to true forces a sorting algorithm to be called at the end of the assembly procedure to ensure sorted column indices (and therefore deterministic results).

Definition at line 209 of file bilinearform.hpp.

◆ EnableStaticCondensation()

void mfem::BilinearForm::EnableStaticCondensation ( )

Enable the use of static condensation. For details see the description for class StaticCondensation in fem/staticcond.hpp This method should be called before assembly. If the number of unknowns after static condensation is not reduced, it is not enabled.

Definition at line 146 of file bilinearform.cpp.

◆ FESpace() [1/2]

FiniteElementSpace * mfem::BilinearForm::FESpace ( )
inline

Return the FE space associated with the BilinearForm.

Definition at line 694 of file bilinearform.hpp.

◆ FESpace() [2/2]

const FiniteElementSpace * mfem::BilinearForm::FESpace ( ) const
inline

Read-only access to the associated FiniteElementSpace.

Definition at line 697 of file bilinearform.hpp.

◆ Finalize()

void mfem::BilinearForm::Finalize ( int skip_zeros = 1)
virtual

Finalizes the matrix initialization if the AssemblyLevel is AssemblyLevel::LEGACY. THe matrix that gets finalized is different if you are using static condensation or hybridization.

Reimplemented from mfem::Matrix.

Definition at line 227 of file bilinearform.cpp.

◆ FormLinearSystem() [1/2]

void mfem::BilinearForm::FormLinearSystem ( const Array< int > & ess_tdof_list,
Vector & x,
Vector & b,
OperatorHandle & A,
Vector & X,
Vector & B,
int copy_interior = 0 )
virtual

Form the linear system A X = B, corresponding to this bilinear form and the linear form b(.).

This method applies any necessary transformations to the linear system such as: eliminating boundary conditions; applying conforming constraints for non-conforming AMR; parallel assembly; static condensation; hybridization.

The GridFunction-size vector x must contain the essential b.c. The BilinearForm and the LinearForm-size vector b must be assembled.

The vector X is initialized with a suitable initial guess: when using hybridization, the vector X is set to zero; otherwise, the essential entries of X are set to the corresponding b.c. and all other entries are set to zero (copy_interior == 0) or copied from x (copy_interior != 0).

This method can be called multiple times (with the same ess_tdof_list array) to initialize different right-hand sides and boundary condition values.

After solving the linear system, the finite element solution x can be recovered by calling RecoverFEMSolution() (with the same vectors X, b, and x).

NOTE: If there are no transformations, X simply reuses the data of x.

Reimplemented in mfem::ParBilinearForm.

Definition at line 756 of file bilinearform.cpp.

◆ FormLinearSystem() [2/2]

template<typename OpType >
void mfem::BilinearForm::FormLinearSystem ( const Array< int > & ess_tdof_list,
Vector & x,
Vector & b,
OpType & A,
Vector & X,
Vector & B,
int copy_interior = 0 )
inline

Form the linear system A X = B, corresponding to this bilinear form and the linear form b(.).

Version of the method FormLinearSystem() where the system matrix is returned in the variable A, of type OpType, holding a reference to the system matrix (created with the method OpType::MakeRef()). The reference will be invalidated when SetOperatorType(), Update(), or the destructor is called.

Definition at line 533 of file bilinearform.hpp.

◆ FormSystemMatrix() [1/2]

void mfem::BilinearForm::FormSystemMatrix ( const Array< int > & ess_tdof_list,
OperatorHandle & A )
virtual

Form the linear system matrix A, see FormLinearSystem() for details.

Reimplemented in mfem::ParBilinearForm.

Definition at line 825 of file bilinearform.cpp.

◆ FormSystemMatrix() [2/2]

template<typename OpType >
void mfem::BilinearForm::FormSystemMatrix ( const Array< int > & ess_tdof_list,
OpType & A )
inline

Form the linear system matrix A, see FormLinearSystem() for details.

Version of the method FormSystemMatrix() where the system matrix is returned in the variable A, of type OpType, holding a reference to the system matrix (created with the method OpType::MakeRef()). The reference will be invalidated when SetOperatorType(), Update(), or the destructor is called.

Definition at line 555 of file bilinearform.hpp.

◆ FreeElementMatrices()

void mfem::BilinearForm::FreeElementMatrices ( )
inline

Free the memory used by the element matrices.

Definition at line 575 of file bilinearform.hpp.

◆ FullAddMult()

void mfem::BilinearForm::FullAddMult ( const Vector & x,
Vector & y ) const
inline

Add the original uneliminated matrix vector multiple to a vector. The original matrix is \( M + Me \) so we have: \( y += M x + M_e x \).

Definition at line 318 of file bilinearform.hpp.

◆ FullAddMultTranspose()

void mfem::BilinearForm::FullAddMultTranspose ( const Vector & x,
Vector & y ) const
inline

Add the original uneliminated matrix transpose vector multiple to a vector. The original matrix is \( M + M_e \) so we have: \( y += M^T x + {M_e}^T x \).

Definition at line 329 of file bilinearform.hpp.

◆ FullInnerProduct()

real_t mfem::BilinearForm::FullInnerProduct ( const Vector & x,
const Vector & y ) const
inline

Compute inner product for full uneliminated matrix: \( y^T M x + y^T M_e x \).

Definition at line 682 of file bilinearform.hpp.

◆ FullMult()

void mfem::BilinearForm::FullMult ( const Vector & x,
Vector & y ) const
inline

Matrix vector multiplication with the original uneliminated matrix. The original matrix is \( M + M_e \) so we have: \( y = M x + M_e x \).

Definition at line 308 of file bilinearform.hpp.

◆ GetAssemblyLevel()

AssemblyLevel mfem::BilinearForm::GetAssemblyLevel ( ) const
inline

Returns the assembly level.

Definition at line 215 of file bilinearform.hpp.

◆ GetBBFI()

Array< BilinearFormIntegrator * > * mfem::BilinearForm::GetBBFI ( )
inline

Access all the integrators added with AddBoundaryIntegrator().

Definition at line 275 of file bilinearform.hpp.

◆ GetBBFI_Marker()

Array< Array< int > * > * mfem::BilinearForm::GetBBFI_Marker ( )
inline

Access all boundary markers added with AddBoundaryIntegrator(). If no marker was specified when the integrator was added, the corresponding pointer (to Array<int>) will be NULL.

Definition at line 279 of file bilinearform.hpp.

◆ GetBFBFI()

Array< BilinearFormIntegrator * > * mfem::BilinearForm::GetBFBFI ( )
inline

Access all integrators added with AddBdrFaceIntegrator().

Definition at line 285 of file bilinearform.hpp.

◆ GetBFBFI_Marker()

Array< Array< int > * > * mfem::BilinearForm::GetBFBFI_Marker ( )
inline

Access all boundary markers added with AddBdrFaceIntegrator(). If no marker was specified when the integrator was added, the corresponding pointer (to Array<int>) will be NULL.

Definition at line 290 of file bilinearform.hpp.

◆ GetDBFI()

Array< BilinearFormIntegrator * > * mfem::BilinearForm::GetDBFI ( )
inline

Access all the integrators added with AddDomainIntegrator().

Definition at line 267 of file bilinearform.hpp.

◆ GetDBFI_Marker()

Array< Array< int > * > * mfem::BilinearForm::GetDBFI_Marker ( )
inline

Access all boundary markers added with AddDomainIntegrator(). If no marker was specified when the integrator was added, the corresponding pointer (to Array<int>) will be NULL.

Definition at line 272 of file bilinearform.hpp.

◆ GetFBFI()

Array< BilinearFormIntegrator * > * mfem::BilinearForm::GetFBFI ( )
inline

Access all integrators added with AddInteriorFaceIntegrator().

Definition at line 282 of file bilinearform.hpp.

◆ GetFES()

MFEM_DEPRECATED FiniteElementSpace * mfem::BilinearForm::GetFES ( )
inline

(DEPRECATED) Return the FE space associated with the BilinearForm.

Deprecated
Use FESpace() instead.

Definition at line 691 of file bilinearform.hpp.

◆ GetHybridization()

Hybridization * mfem::BilinearForm::GetHybridization ( ) const
inline

Definition at line 217 of file bilinearform.hpp.

◆ GetOutputProlongation()

virtual const Operator * mfem::BilinearForm::GetOutputProlongation ( ) const
inlinevirtual

Get the output finite element space prolongation matrix.

Reimplemented from mfem::Operator.

Definition at line 472 of file bilinearform.hpp.

◆ GetOutputRestriction()

virtual const Operator * mfem::BilinearForm::GetOutputRestriction ( ) const
inlinevirtual

Get the output finite element space restriction matrix.

Reimplemented from mfem::Operator.

Definition at line 484 of file bilinearform.hpp.

◆ GetOutputRestrictionTranspose()

virtual const Operator * mfem::BilinearForm::GetOutputRestrictionTranspose ( ) const
inlinevirtual

Returns the output fe space restriction matrix, transposed.

Logically, this is the transpose of GetOutputRestriction, but in practice it is convenient to have it in transposed form for construction of RAP operators in matrix-free methods.

Reimplemented from mfem::Operator.

Definition at line 480 of file bilinearform.hpp.

◆ GetProlongation()

virtual const Operator * mfem::BilinearForm::GetProlongation ( ) const
inlinevirtual

Get the finite element space prolongation operator.

Reimplemented from mfem::Operator.

Reimplemented in mfem::ParBilinearForm.

Definition at line 464 of file bilinearform.hpp.

◆ GetRestriction()

virtual const Operator * mfem::BilinearForm::GetRestriction ( ) const
inlinevirtual

Get the finite element space restriction operator.

Reimplemented from mfem::Operator.

Reimplemented in mfem::ParBilinearForm.

Definition at line 468 of file bilinearform.hpp.

◆ HasSpMat()

bool mfem::BilinearForm::HasSpMat ( )
inline

Returns true if the sparse matrix is not null, false otherwise.

See also
SpMat().

Definition at line 370 of file bilinearform.hpp.

◆ HasSpMatElim()

bool mfem::BilinearForm::HasSpMatElim ( )
inline

Returns true if the sparse matrix of eliminated b.c.s is not null, false otherwise.

See also
SpMatElim().

Definition at line 404 of file bilinearform.hpp.

◆ InnerProduct()

real_t mfem::BilinearForm::InnerProduct ( const Vector & x,
const Vector & y ) const
inline

Compute \( y^T M x \).

Definition at line 336 of file bilinearform.hpp.

◆ Inverse()

MatrixInverse * mfem::BilinearForm::Inverse ( ) const
virtual

Returns a pointer to (approximation) of the matrix inverse: \( M^{-1} \) (currently returns NULL)

Implements mfem::Matrix.

Definition at line 222 of file bilinearform.cpp.

◆ LoseMat()

SparseMatrix * mfem::BilinearForm::LoseMat ( )
inline

Nullifies the internal matrix \( M \) and returns a pointer to it. Used for transferring ownership.

Definition at line 378 of file bilinearform.hpp.

◆ Mult()

void mfem::BilinearForm::Mult ( const Vector & x,
Vector & y ) const
virtual

Matrix vector multiplication: \( y = M x \).

Implements mfem::Operator.

Definition at line 1110 of file bilinearform.cpp.

◆ MultTranspose()

void mfem::BilinearForm::MultTranspose ( const Vector & x,
Vector & y ) const
virtual

Matrix transpose vector multiplication: \( y = M^T x \).

Reimplemented from mfem::Operator.

Definition at line 1122 of file bilinearform.cpp.

◆ operator()()

const real_t & mfem::BilinearForm::operator() ( int i,
int j )
inline

Returns a reference to: \( M_{ij} \).

Definition at line 294 of file bilinearform.hpp.

◆ operator=()

void mfem::BilinearForm::operator= ( const real_t a)
inline

Sets all sparse values of \( M \) and \( M_e \) to 'a'.

Definition at line 443 of file bilinearform.hpp.

◆ RecoverFEMSolution()

void mfem::BilinearForm::RecoverFEMSolution ( const Vector & X,
const Vector & b,
Vector & x )
virtual

Recover the solution of a linear system formed with FormLinearSystem().

Call this method after solving a linear system constructed using the FormLinearSystem() method to recover the solution as a GridFunction-size vector in x. Use the same arguments as in the FormLinearSystem() call.

Reimplemented from mfem::Operator.

Reimplemented in mfem::ParBilinearForm.

Definition at line 868 of file bilinearform.cpp.

◆ SCFESpace()

FiniteElementSpace * mfem::BilinearForm::SCFESpace ( ) const
inline

Return the trace FE space associated with static condensation.

Definition at line 230 of file bilinearform.hpp.

◆ SerialRAP()

void mfem::BilinearForm::SerialRAP ( OperatorHandle & A)
inline

Compute serial RAP operator and store it in A as a SparseMatrix.

Definition at line 488 of file bilinearform.hpp.

◆ SetAssemblyLevel()

void mfem::BilinearForm::SetAssemblyLevel ( AssemblyLevel assembly_level)

Set the desired assembly level.

Valid choices are:

If used, this method must be called before assembly.

Definition at line 117 of file bilinearform.cpp.

◆ SetDiagonalPolicy()

void mfem::BilinearForm::SetDiagonalPolicy ( DiagonalPolicy policy)

Sets Operator::DiagonalPolicy used upon construction of the linear system. Policies include:

  • DIAG_ZERO (Set the diagonal values to zero)
  • DIAG_ONE (Set the diagonal values to one)
  • DIAG_KEEP (Keep the diagonal values)

Definition at line 1177 of file bilinearform.cpp.

◆ Size()

int mfem::BilinearForm::Size ( ) const
inline

Get the size of the BilinearForm as a square matrix.

Definition at line 185 of file bilinearform.hpp.

◆ SpMat() [1/2]

SparseMatrix & mfem::BilinearForm::SpMat ( )
inline

Returns a reference to the sparse matrix: \( M \).

This will fail if HasSpMat() is false.

Definition at line 361 of file bilinearform.hpp.

◆ SpMat() [2/2]

const SparseMatrix & mfem::BilinearForm::SpMat ( ) const
inline

Returns a const reference to the sparse matrix: \( M \).

This will fail if HasSpMat() is false.

Definition at line 352 of file bilinearform.hpp.

◆ SpMatElim() [1/2]

SparseMatrix & mfem::BilinearForm::SpMatElim ( )
inline

Returns a reference to the sparse matrix of eliminated b.c.: \( M_e \).

This will fail if HasSpMatElim() is false.

Definition at line 394 of file bilinearform.hpp.

◆ SpMatElim() [2/2]

const SparseMatrix & mfem::BilinearForm::SpMatElim ( ) const
inline

Returns a const reference to the sparse matrix of eliminated b.c.: \( M_e \).

This will fail if HasSpMatElim() is false.

Definition at line 384 of file bilinearform.hpp.

◆ StaticCondensationIsEnabled()

bool mfem::BilinearForm::StaticCondensationIsEnabled ( ) const
inline

Check if static condensation was actually enabled by a previous call to EnableStaticCondensation().

Definition at line 227 of file bilinearform.hpp.

◆ Update()

void mfem::BilinearForm::Update ( FiniteElementSpace * nfes = NULL)
virtual

Update the FiniteElementSpace and delete all data associated with the old one.

Reimplemented in mfem::ParBilinearForm.

Definition at line 1135 of file bilinearform.cpp.

◆ UseExternalIntegrators()

void mfem::BilinearForm::UseExternalIntegrators ( )
inline

Indicate that integrators are not owned by the BilinearForm.

Definition at line 710 of file bilinearform.hpp.

◆ UsePrecomputedSparsity()

void mfem::BilinearForm::UsePrecomputedSparsity ( int ps = 1)
inline

For scalar FE spaces, precompute the sparsity pattern of the matrix (assuming dense element matrices) based on the types of integrators present in the bilinear form.

Definition at line 244 of file bilinearform.hpp.

◆ UseSparsity() [1/2]

void mfem::BilinearForm::UseSparsity ( int * I,
int * J,
bool isSorted )

Use the given CSR sparsity pattern to allocate the internal SparseMatrix.

  • The I and J arrays must define a square graph with size equal to GetVSize() of the associated FiniteElementSpace.
  • This method should be called after enabling static condensation or hybridization, if used.
  • In the case of static condensation, I and J are not used.
  • The ownership of the arrays I and J remains with the caller.

Definition at line 186 of file bilinearform.cpp.

◆ UseSparsity() [2/2]

void mfem::BilinearForm::UseSparsity ( SparseMatrix & A)

Use the sparsity of A to allocate the internal SparseMatrix.

Definition at line 202 of file bilinearform.cpp.

Member Data Documentation

◆ assembly

AssemblyLevel mfem::BilinearForm::assembly
protected

◆ batch

int mfem::BilinearForm::batch
protected

Element batch size used in the form action (1, 8, num_elems, etc.)

Definition at line 81 of file bilinearform.hpp.

◆ boundary_face_integs

Array<BilinearFormIntegrator*> mfem::BilinearForm::boundary_face_integs
protected

Set of boundary face Integrators to be applied.

Definition at line 119 of file bilinearform.hpp.

◆ boundary_face_integs_marker

Array<Array<int>*> mfem::BilinearForm::boundary_face_integs_marker
protected

Entries are not owned.

Definition at line 120 of file bilinearform.hpp.

◆ boundary_integs

Array<BilinearFormIntegrator*> mfem::BilinearForm::boundary_integs
protected

Set of Boundary Integrators to be applied.

Definition at line 112 of file bilinearform.hpp.

◆ boundary_integs_marker

Array<Array<int>*> mfem::BilinearForm::boundary_integs_marker
protected

Entries are not owned.

Definition at line 113 of file bilinearform.hpp.

◆ diag_policy

DiagonalPolicy mfem::BilinearForm::diag_policy
protected

This data member allows one to specify what should be done to the diagonal matrix entries and corresponding RHS values upon elimination of the constrained DoFs.

Definition at line 133 of file bilinearform.hpp.

◆ domain_integs

Array<BilinearFormIntegrator*> mfem::BilinearForm::domain_integs
protected

Set of Domain Integrators to be applied.

Definition at line 102 of file bilinearform.hpp.

◆ domain_integs_marker

Array<Array<int>*> mfem::BilinearForm::domain_integs_marker
protected

Entries are not owned.

Element attribute marker (should be of length mesh->attributes.Max() or 0 if mesh->attributes is empty) Includes all by default. 0 - ignore attribute 1 - include attribute

Definition at line 109 of file bilinearform.hpp.

◆ element_matrices

DenseTensor* mfem::BilinearForm::element_matrices
protected

Owned.

Definition at line 125 of file bilinearform.hpp.

◆ elemmat

DenseMatrix mfem::BilinearForm::elemmat
protected

Definition at line 122 of file bilinearform.hpp.

◆ ext

BilinearFormExtension* mfem::BilinearForm::ext
protected

Extension for supporting Full Assembly (FA), Element Assembly (EA),Partial Assembly (PA), or Matrix Free assembly (MF).

Definition at line 86 of file bilinearform.hpp.

◆ extern_bfs

int mfem::BilinearForm::extern_bfs
protected

Indicates the BilinearFormIntegrators stored in domain_integs, boundary_integs, interior_face_integs, and boundary_face_integs are owned by another BilinearForm.

Definition at line 99 of file bilinearform.hpp.

◆ fes

FiniteElementSpace* mfem::BilinearForm::fes
protected

FE space on which the form lives. Not owned.

Definition at line 74 of file bilinearform.hpp.

◆ hybridization

Hybridization* mfem::BilinearForm::hybridization
protected

Owned.

Definition at line 128 of file bilinearform.hpp.

◆ interior_face_integs

Array<BilinearFormIntegrator*> mfem::BilinearForm::interior_face_integs
protected

Set of interior face Integrators to be applied.

Definition at line 116 of file bilinearform.hpp.

◆ mat

SparseMatrix* mfem::BilinearForm::mat
protected

Sparse matrix \( M \) to be associated with the form. Owned.

Definition at line 66 of file bilinearform.hpp.

◆ mat_e

SparseMatrix* mfem::BilinearForm::mat_e
protected

Sparse Matrix \( M_e \) used to store the eliminations from the b.c. Owned. \( M + M_e = M_{original} \).

Definition at line 71 of file bilinearform.hpp.

◆ precompute_sparsity

int mfem::BilinearForm::precompute_sparsity
protected

Definition at line 135 of file bilinearform.hpp.

◆ sequence

long mfem::BilinearForm::sequence
protected

Indicates the Mesh::sequence corresponding to the current state of the BilinearForm.

Definition at line 94 of file bilinearform.hpp.

◆ sort_sparse_matrix

bool mfem::BilinearForm::sort_sparse_matrix = false
protected

Indicates if the sparse matrix is sorted after assembly when using Full Assembly (FA).

Definition at line 90 of file bilinearform.hpp.

◆ static_cond

StaticCondensation* mfem::BilinearForm::static_cond
protected

Owned.

Definition at line 127 of file bilinearform.hpp.

◆ vdofs

Array<int> mfem::BilinearForm::vdofs
protected

Definition at line 123 of file bilinearform.hpp.


The documentation for this class was generated from the following files: