12 #ifndef MFEM_BILINEARFORM
13 #define MFEM_BILINEARFORM
15 #include "../config/config.hpp"
16 #include "../linalg/linalg.hpp"
260 virtual double &
Elem(
int i,
int j);
263 virtual const double &
Elem(
int i,
int j)
const;
286 const double a = 1.0)
const
306 virtual void Finalize(
int skip_zeros = 1);
311 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
318 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
329 MFEM_VERIFY(
mat_e,
"mat_e is NULL and can't be dereferenced");
336 MFEM_VERIFY(
mat_e,
"mat_e is NULL and can't be dereferenced");
441 Vector &B,
int copy_interior = 0);
450 template <
typename OpType>
453 int copy_interior = 0)
457 OpType *A_ptr = Ah.
Is<OpType>();
458 MFEM_VERIFY(A_ptr,
"invalid OpType used");
472 template <
typename OpType>
477 OpType *A_ptr = Ah.
Is<OpType>();
478 MFEM_VERIFY(A_ptr,
"invalid OpType used");
709 virtual double &
Elem(
int i,
int j);
712 virtual const double &
Elem(
int i,
int j)
const;
718 const double a = 1.0)
const;
722 const double a = 1.0)
const;
727 virtual void Finalize(
int skip_zeros = 1);
896 template <
typename OpType>
902 OpType *A_ptr = Ah.
Is<OpType>();
903 MFEM_VERIFY(A_ptr,
"invalid OpType used");
927 template <
typename OpType>
935 OpType *A_ptr = Ah.
Is<OpType>();
936 MFEM_VERIFY(A_ptr,
"invalid OpType used");
1021 virtual void Assemble(
int skip_zeros = 1);
AssemblyLevel
Enumeration defining the assembly level for bilinear and nonlinear form classes derived from Operator...
const SparseMatrix * GetConformingProlongation() const
The returned SparseMatrix is owned by the FiniteElementSpace.
virtual const Operator * GetRestrictionTransposeOperator() const
Return an operator that performs the transpose of GetRestrictionOperator.
Pointer to an Operator of a specified type.
Data type dense matrix using column-major storage.
void AddMult(const Vector &x, Vector &y, const double a=1.0) const
y += A * x (default) or y += a * A * x
void AddMultTranspose(const Vector &x, Vector &y, const double a=1.0) const
y += At * x (default) or y += a * At * x
Abstract data type for matrix inverse.
void SetAssemblyLevel(AssemblyLevel assembly_level)
Set the desired assembly level. The default is AssemblyLevel::FULL.
void AddDomainInterpolator(DiscreteInterpolator *di)
Adds a domain interpolator. Assumes ownership of di.
const SparseMatrix * GetConformingRestriction() const
The returned SparseMatrix is owned by the FiniteElementSpace.
OpType * Is() const
Return the Operator pointer dynamically cast to a specified OpType.
double f(const Vector &xvec)
DiscreteLinearOperator(FiniteElementSpace *domain_fes, FiniteElementSpace *range_fes)
Construct a DiscreteLinearOperator on the given FiniteElementSpaces domain_fes and range_fes...
Abstract data type matrix.
virtual const Operator * GetOutputRestrictionTranspose() const
Get the output finite element space restriction matrix in transposed form.
virtual const Operator * GetProlongationMatrix() const
The returned Operator is owned by the FiniteElementSpace.
Set the diagonal value to one.
Dynamic 2D array using row-major layout.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
virtual void Mult(const Vector &x, Vector &y) const
Matrix vector multiplication.
void AddTraceFaceInterpolator(DiscreteInterpolator *di)
Adds a trace face interpolator. Assumes ownership of di.
int height
Dimension of the output / number of rows in the matrix.
FiniteElementSpace * GetTraceFESpace()
Return a pointer to the reduced/trace FE space.
DiagonalPolicy
Defines operator diagonal policy upon elimination of rows and/or columns.
virtual const SparseMatrix * GetRestrictionMatrix() const
The returned SparseMatrix is owned by the FiniteElementSpace.
virtual void Assemble(int skip_zeros=1)
Construct the internal matrix representation of the discrete linear operator.
Rank 3 tensor (array of matrices)
Array< BilinearFormIntegrator * > * GetDI()
Access all interpolators added with AddDomainInterpolator().
double InnerProduct(const Vector &x, const Vector &y) const
Compute y^t A x.