12 #ifndef MFEM_BILINEARFORM 13 #define MFEM_BILINEARFORM 15 #include "../config/config.hpp" 16 #include "../linalg/linalg.hpp" 285 virtual double &
Elem(
int i,
int j);
288 virtual const double &
Elem(
int i,
int j)
const;
311 const double a = 1.0)
const 331 virtual void Finalize(
int skip_zeros = 1);
338 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
347 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
356 return mat !=
nullptr;
370 MFEM_VERIFY(
mat_e,
"mat_e is NULL and can't be dereferenced");
380 MFEM_VERIFY(
mat_e,
"mat_e is NULL and can't be dereferenced");
390 return mat_e !=
nullptr;
469 MFEM_ASSERT(
mat,
"SerialRAP requires the SparseMatrix to be assembled.");
502 Vector &B,
int copy_interior = 0);
511 template <
typename OpType>
514 int copy_interior = 0)
518 OpType *A_ptr = Ah.
Is<OpType>();
519 MFEM_VERIFY(A_ptr,
"invalid OpType used");
533 template <
typename OpType>
538 OpType *A_ptr = Ah.
Is<OpType>();
539 MFEM_VERIFY(A_ptr,
"invalid OpType used");
770 virtual double &
Elem(
int i,
int j);
773 virtual const double &
Elem(
int i,
int j)
const;
779 const double a = 1.0)
const;
783 const double a = 1.0)
const;
788 virtual void Finalize(
int skip_zeros = 1);
957 template <
typename OpType>
963 OpType *A_ptr = Ah.
Is<OpType>();
964 MFEM_VERIFY(A_ptr,
"invalid OpType used");
988 template <
typename OpType>
996 OpType *A_ptr = Ah.
Is<OpType>();
997 MFEM_VERIFY(A_ptr,
"invalid OpType used");
1082 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.
const Operator * GetRestrictionTransposeOperator() const
Return an operator that performs the transpose of GetRestrictionOperator.
virtual void AddMult(const Vector &x, Vector &y, const double a=1.0) const
y += A * x (default) or y += a * A * x
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.
std::function< double(const Vector &)> f(double mass_coeff)
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.