12#ifndef MFEM_BILINEARFORM
13#define MFEM_BILINEARFORM
86 std::unique_ptr<BilinearFormExtension>
ext;
298 const real_t &
Elem(
int i,
int j)
const override;
321 const real_t a = 1.0)
const override
345 void Finalize(
int skip_zeros = 1)
override;
352 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
361 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
370 return mat !=
nullptr;
384 MFEM_VERIFY(
mat_e,
"mat_e is NULL and can't be dereferenced");
394 MFEM_VERIFY(
mat_e,
"mat_e is NULL and can't be dereferenced");
404 return mat_e !=
nullptr;
488 MFEM_ASSERT(
mat,
"SerialRAP requires the SparseMatrix to be assembled.");
521 Vector &B,
int copy_interior = 0);
530 template <
typename OpType>
533 int copy_interior = 0)
537 OpType *A_ptr = Ah.
Is<OpType>();
538 MFEM_VERIFY(A_ptr,
"invalid OpType used");
552 template <
typename OpType>
557 OpType *A_ptr = Ah.
Is<OpType>();
558 MFEM_VERIFY(A_ptr,
"invalid OpType used");
717 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
769 std::unique_ptr<MixedBilinearFormExtension>
ext;
839 const real_t &
Elem(
int i,
int j)
const override;
846 const real_t a = 1.0)
const override;
853 const real_t a = 1.0)
const override;
861 void Finalize(
int skip_zeros = 1)
override;
874 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
881 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
892 MFEM_VERIFY(
mat_e,
"mat_e is NULL and can't be dereferenced");
899 MFEM_VERIFY(
mat_e,
"mat_e is NULL and can't be dereferenced");
1046 int skip_zeros = 1);
1057 int skip_zeros = 1);
1066 int skip_zeros = 1);
1077 int skip_zeros = 1);
1150 template <
typename OpType>
1156 OpType *A_ptr = Ah.
Is<OpType>();
1157 MFEM_VERIFY(A_ptr,
"invalid OpType used");
1181 template <
typename OpType>
1190 OpType *A_ptr = Ah.
Is<OpType>();
1191 MFEM_VERIFY(A_ptr,
"invalid OpType used");
1213 MFEM_VERIFY(
mat,
"mat is NULL and can't be dereferenced");
1292 virtual void Assemble(
int skip_zeros = 1);
Dynamic 2D array using row-major layout.
Data type dense matrix using column-major storage.
Rank 3 tensor (array of matrices)
void AddDomainInterpolator(DiscreteInterpolator *di, Array< int > &elem_marker)
void AddDomainInterpolator(DiscreteInterpolator *di)
Adds a domain interpolator. Assumes ownership of di.
void AddTraceFaceInterpolator(DiscreteInterpolator *di)
Adds a trace face interpolator. Assumes ownership of di.
virtual void Assemble(int skip_zeros=1)
Construct the internal matrix representation of the discrete linear operator.
Array< Array< int > * > * GetDI_Marker()
DiscreteLinearOperator(FiniteElementSpace *domain_fes, FiniteElementSpace *range_fes)
Construct a DiscreteLinearOperator on the given FiniteElementSpaces domain_fes and range_fes.
Array< BilinearFormIntegrator * > * GetDI()
Access all interpolators added with AddDomainInterpolator().
const Operator * GetOutputRestrictionTranspose() const override
Get the output finite element space restriction matrix in transposed form.
void SetAssemblyLevel(AssemblyLevel assembly_level)
Set the desired assembly level. The default is AssemblyLevel::FULL.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
const SparseMatrix * GetConformingRestriction() const
The returned SparseMatrix is owned by the FiniteElementSpace.
virtual const SparseMatrix * GetRestrictionMatrix() const
The returned SparseMatrix is owned by the FiniteElementSpace.
virtual const Operator * GetProlongationMatrix() const
const Operator * GetRestrictionTransposeOperator() const
Return an operator that performs the transpose of GetRestrictionOperator.
const SparseMatrix * GetConformingProlongation() const
Auxiliary class Hybridization, used to implement BilinearForm hybridization.
Abstract data type for matrix inverse.
Abstract data type matrix.
Pointer to an Operator of a specified type.
void Reset(OpType *A, bool own_A=true)
Reset the OperatorHandle to the given OpType pointer, A.
OpType * Is() const
Return the Operator pointer dynamically cast to a specified OpType.
int height
Dimension of the output / number of rows in the matrix.
DiagonalPolicy
Defines operator diagonal policy upon elimination of rows and/or columns.
@ DIAG_ONE
Set the diagonal value to one.
@ DIAG_KEEP
Keep the diagonal value.
void Print(std::ostream &out=mfem::out, int width_=4) const override
Prints matrix to stream out.
real_t InnerProduct(const Vector &x, const Vector &y) const
Compute y^t A x.
void AddMultTranspose(const Vector &x, Vector &y, const real_t a=1.0) const override
y += At * x (default) or y += a * At * x
void AddMult(const Vector &x, Vector &y, const real_t a=1.0) const override
y += A * x (default) or y += a * A * x
void Mult(const Vector &x, Vector &y) const override
Matrix vector multiplication.
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
AssemblyLevel
Enumeration defining the assembly level for bilinear and nonlinear form classes derived from Operator...
std::function< real_t(const Vector &)> f(real_t mass_coeff)