12 #ifndef MFEM_BILINEARFORM 13 #define MFEM_BILINEARFORM 15 #include "../config/config.hpp" 16 #include "../linalg/linalg.hpp" 279 virtual double &
Elem(
int i,
int j);
282 virtual const double &
Elem(
int i,
int j)
const;
305 const double a = 1.0)
const 325 virtual void Finalize(
int skip_zeros = 1);
332 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
341 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
350 return mat !=
nullptr;
364 MFEM_VERIFY(
mat_e,
"mat_e is NULL and can't be dereferenced");
374 MFEM_VERIFY(
mat_e,
"mat_e is NULL and can't be dereferenced");
384 return mat_e !=
nullptr;
463 MFEM_ASSERT(
mat,
"SerialRAP requires the SparseMatrix to be assembled.");
496 Vector &B,
int copy_interior = 0);
505 template <
typename OpType>
508 int copy_interior = 0)
512 OpType *A_ptr = Ah.
Is<OpType>();
513 MFEM_VERIFY(A_ptr,
"invalid OpType used");
527 template <
typename OpType>
532 OpType *A_ptr = Ah.
Is<OpType>();
533 MFEM_VERIFY(A_ptr,
"invalid OpType used");
764 virtual double &
Elem(
int i,
int j);
767 virtual const double &
Elem(
int i,
int j)
const;
773 const double a = 1.0)
const;
777 const double a = 1.0)
const;
782 virtual void Finalize(
int skip_zeros = 1);
951 template <
typename OpType>
957 OpType *A_ptr = Ah.
Is<OpType>();
958 MFEM_VERIFY(A_ptr,
"invalid OpType used");
982 template <
typename OpType>
990 OpType *A_ptr = Ah.
Is<OpType>();
991 MFEM_VERIFY(A_ptr,
"invalid OpType used");
1076 virtual void Assemble(
int skip_zeros = 1);
virtual void Mult(const Vector &x, Vector &y) const
Matrix vector multiplication.
AssemblyLevel
Enumeration defining the assembly level for bilinear and nonlinear form classes derived from Operator...
virtual const Operator * GetOutputRestrictionTranspose() const
Get the output finite element space restriction matrix in transposed form.
const SparseMatrix * GetConformingRestriction() const
The returned SparseMatrix is owned by the FiniteElementSpace.
Pointer to an Operator of a specified type.
OpType * Is() const
Return the Operator pointer dynamically cast to a specified OpType.
Data type dense matrix using column-major storage.
Abstract data type for matrix inverse.
virtual void AddMult(const Vector &x, Vector &y, const double a=1.0) const
y += A * x (default) or y += a * A * x
virtual const Operator * GetRestrictionTransposeOperator() const
Return an operator that performs the transpose of GetRestrictionOperator.
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.
double f(const Vector &xvec)
DiscreteLinearOperator(FiniteElementSpace *domain_fes, FiniteElementSpace *range_fes)
Construct a DiscreteLinearOperator on the given FiniteElementSpaces domain_fes and range_fes...
virtual const SparseMatrix * GetRestrictionMatrix() const
The returned SparseMatrix is owned by the FiniteElementSpace.
Abstract data type matrix.
double InnerProduct(const Vector &x, const Vector &y) const
Compute y^t A x.
const SparseMatrix * GetConformingProlongation() const
The returned SparseMatrix 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...
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.
virtual const Operator * GetProlongationMatrix() const
The returned Operator is owned by the FiniteElementSpace.
FiniteElementSpace * GetTraceFESpace()
Return a pointer to the reduced/trace FE space.
DiagonalPolicy
Defines operator diagonal policy upon elimination of rows and/or columns.
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().
virtual void AddMultTranspose(const Vector &x, Vector &y, const double a=1.0) const
y += At * x (default) or y += a * At * x
void Reset(OpType *A, bool own_A=true)
Reset the OperatorHandle to the given OpType pointer, A.