NGSolve  4.9
Public Member Functions | Protected Attributes
ngcomp::BilinearForm Class Reference

A bilinear-form. More...

#include <bilinearform.hpp>

Inheritance diagram for ngcomp::BilinearForm:
ngcomp::NGS_Object ngcomp::S_BilinearForm< SCAL > ngcomp::S_BilinearForm< mat_traits< TM >::TSCAL > ngcomp::ElementByElement_BilinearForm< SCAL > ngcomp::T_BilinearForm< TM, TV > ngcomp::T_BilinearFormDiagonal< TM > ngcomp::T_BilinearFormSymmetric< TM, TV >

List of all members.

Public Member Functions

 BilinearForm (const FESpace &afespace, const string &aname, const Flags &flags)
 generate a bilinear-form
 BilinearForm (const FESpace &afespace, const FESpace &afespace2, const string &aname, const Flags &flags)
 generate a bilinear-form
virtual ~BilinearForm ()
 deletes integrators (if deletable)
void AddIntegrator (BilinearFormIntegrator *bfi, bool deletable=true)
int NumIntegrators () const
BilinearFormIntegratorGetIntegrator (int i) const
 the i-th integrator
void SetLinearForm (LinearForm *alf)
 for static condensation of internal bubbles
void SetPreconditioner (Preconditioner *pre)
 preconditioner gets element-matrix
virtual MatrixGraphGetGraph (int level, bool symmetric)
 generates matrix graph
void Assemble (LocalHeap &lh)
 assembles the matrix
void ReAssemble (LocalHeap &lh, bool reallocate=0)
 re-assembles the matrix.
virtual void AssembleLinearization (const BaseVector &lin, LocalHeap &lh, bool reallocate=0)=0
 assembles matrix at linearization point given by lin needed for Newton's method
void ApplyMatrix (const BaseVector &x, BaseVector &y) const
 applies the matrix without assembling
virtual void AddMatrix (double val, const BaseVector &x, BaseVector &y) const =0
 y += val * Mat * x
virtual void AddMatrix (Complex val, const BaseVector &x, BaseVector &y) const =0
 y += val * Mat * x
virtual void ApplyLinearizedMatrixAdd (double val, const BaseVector &lin, const BaseVector &x, BaseVector &y) const =0
 y += val * lin.mat * x
virtual void ApplyLinearizedMatrixAdd (Complex val, const BaseVector &lin, const BaseVector &x, BaseVector &y) const =0
 y += val * lin.mat * x
virtual double Energy (const BaseVector &x) const =0
 evaulates internal energy (usually 1/2 x^T A x)
BaseMatrixGetMatrix () const
 returns the assembled matrix
BaseMatrixGetMatrix (int level) const
 returns the assembled matrix on a given level
virtual BaseMatrixGetHarmonicExtension () const =0
 reconstruct internal dofs from static condensation
virtual BaseMatrixGetHarmonicExtensionTrans () const =0
 modify rhs doue to static condensation.
virtual BaseMatrixGetInnerSolve () const =0
 returns inverse of A_ii
virtual BaseMatrixGetInnerMatrix () const =0
 returns A_ii
bool HasLowOrderBilinearForm () const
 is there a low-order biform ?
BilinearFormGetLowOrderBilinearForm () const
 returns the low-order biform
bool UsesEliminateInternal () const
 use static condensation ?
bool UsesKeepInternal () const
 stores the matrices for reconstructing internal dofs ?
bool UsesStoreInner () const
 does it store Aii ?
const FESpaceGetFESpace () const
 the finite element space
bool MixedSpaces () const
 uses mixed spaces (non operational)
const FESpaceGetFESpace2 () const
 returns the second space (form mixed spaces)
int GetNLevels () const
bool IsSymmetric (void) const
 is the form symmetric ?
void SetNonAssemble (bool na=true)
 don't assemble the matrix
void SetGalerkin (bool agalerkin=true)
void SetDiagonal (bool adiagonal=true)
void SetSymmetric (bool asymmetric=true)
void SetHermitean (bool ahermitean=true)
void SetMultiLevel (bool amultilevel=1)
void SetTiming (bool at)
void SetEliminateInternal (bool eliminate)
void SetKeepInternal (bool keep)
void SetStoreInner (bool storei)
void SetPrint (bool ap)
void SetPrintElmat (bool ap)
void SetElmatEigenValues (bool ee)
void GalerkinProjection ()
 computes low-order matrices from fines matrix
virtual void ComputeInternal (BaseVector &u, const BaseVector &f, LocalHeap &lh) const =0
 reconstruct internal dofs
void SetEpsRegularization (double val)
 add eps I to the assembled matrix
void SetUnusedDiag (double val)
 set matrix diagonal for unused dofs to this value
bool UseGalerkin () const
 does it use Galerkin projection ?
virtual string GetClassName () const
 biform object
virtual void PrintReport (ostream &ost)
 prints report to file
virtual void MemoryUsage (Array< MemoryUsageStruct * > &mu) const
virtual BaseVectorCreateVector () const =0
 creates a compatible vector
virtual void CleanUpLevel ()
 frees matrix

Protected Attributes

const FESpacefespace
 Finite element space.
const FESpacefespace2
 Test-space if different from trial-space, otherwise 0 (non operational)
bool nonassemble
 don't assemble matrix
bool diagonal
 store only diagonal of matrix
bool multilevel
 store matrices on mesh hierarchy
bool galerkin
 galerkin projection of coarse grid matrices
bool hermitean
 complex forms are hermitean (non operational)
bool symmetric
 bilinear form is symmetric
double eps_regularization
 add epsilon for regularization
double unuseddiag
 diagonal value for unused dofs
BilinearFormlow_order_bilinear_form
 low order bilinear-form, 0 if not used
LinearFormlinearform
 modify linear form due to static condensation
Array< Preconditioner * > preconditioners
 some preconditioners need element matrices
Array< BaseMatrix * > mats
 matrices (sparse, application, diagonal, ...)
Array< BilinearFormIntegrator * > parts
 bilinearform-integrators
Array< bool > parts_deletable
 is biform responsible for the deallocation ?
bool timing
 does some timing in assemble
bool print
 prints assembled matrix to testout
bool printelmat
 prints element matrices to testout
bool elmat_ev
 calculates eigenvalues of element matrices
bool eliminate_internal
 does static condensation of internal dofs
bool keep_internal
 keeps matrices for reconstruction of internal dofs
bool store_inner
 should A_ii itself be stored?!
bool precompute
 precomputes some data for each element
Array< void * > precomputed_data
 precomputed element-wise data

Detailed Description

A bilinear-form.

A bilinear-form provides the system matrix. It knows about its definition in terms of integrators. In most cases, it is defined on two copies of the same space V, but it can also live on V x W.


Member Function Documentation

virtual BaseMatrix& ngcomp::BilinearForm::GetHarmonicExtension ( ) const [pure virtual]

reconstruct internal dofs from static condensation

-A_ii^{-1} A_ib

Implemented in ngcomp::S_BilinearForm< SCAL >, and ngcomp::S_BilinearForm< mat_traits< TM >::TSCAL >.

modify rhs doue to static condensation.

-A_bi A_ii^{-1} stored only for non-symmetric biforms

Implemented in ngcomp::S_BilinearForm< SCAL >, and ngcomp::S_BilinearForm< mat_traits< TM >::TSCAL >.

void ngcomp::BilinearForm::ReAssemble ( LocalHeap lh,
bool  reallocate = 0 
)

re-assembles the matrix.

if reallocate is false, the existing matrix is reused


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