MFEM v4.10.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::MixedSesquilinearForm Class Reference

#include <complex_fem.hpp>

Public Member Functions

 MixedSesquilinearForm (FiniteElementSpace *trial_fes, FiniteElementSpace *test_fes, ComplexOperator::Convention convention=ComplexOperator::HERMITIAN)
 
 MixedSesquilinearForm (FiniteElementSpace *trial_fes, FiniteElementSpace *test_fes, MixedBilinearForm *bfr, MixedBilinearForm *bfi, ComplexOperator::Convention convention=ComplexOperator::HERMITIAN)
 Create a MixedSesquilinearForm on the given trial and test FiniteElementSpaces, using the same integrators as the MixedBilinearForms bfr and bfi.
 
ComplexOperator::Convention GetConvention () const
 
void SetConvention (const ComplexOperator::Convention &convention)
 
void SetAssemblyLevel (AssemblyLevel assembly_level)
 Set the desired assembly level.
 
MixedBilinearFormreal ()
 
MixedBilinearFormimag ()
 
const MixedBilinearFormreal () const
 
const MixedBilinearFormimag () const
 
void AddDomainIntegrator (BilinearFormIntegrator *bfi_real, BilinearFormIntegrator *bfi_imag)
 Adds new Domain Integrator.
 
void AddDomainIntegrator (BilinearFormIntegrator *bfi_real, BilinearFormIntegrator *bfi_imag, Array< int > &elem_marker)
 Adds new Domain Integrator, restricted to specific attributes.
 
void AddBoundaryIntegrator (BilinearFormIntegrator *bfi_real, BilinearFormIntegrator *bfi_imag)
 Adds new Boundary Integrator.
 
void AddBoundaryIntegrator (BilinearFormIntegrator *bfi_real, BilinearFormIntegrator *bfi_imag, Array< int > &bdr_marker)
 Adds new boundary Integrator, restricted to specific boundary attributes.
 
void AddInteriorFaceIntegrator (BilinearFormIntegrator *bfi_real, BilinearFormIntegrator *bfi_imag)
 Adds new interior Face Integrator. Assumes ownership of bfi.
 
void AddBdrFaceIntegrator (BilinearFormIntegrator *bfi_real, BilinearFormIntegrator *bfi_imag)
 Adds new boundary Face Integrator. Assumes ownership of bfi.
 
void AddBdrFaceIntegrator (BilinearFormIntegrator *bfi_real, BilinearFormIntegrator *bfi_imag, Array< int > &bdr_marker)
 Adds new boundary Face Integrator, restricted to specific boundary attributes.
 
void AddTraceFaceIntegrator (BilinearFormIntegrator *bfi_real, BilinearFormIntegrator *bfi_imag)
 Add a trace face integrator. Assumes ownership of bfi.
 
void AddBdrTraceFaceIntegrator (BilinearFormIntegrator *bfi_real, BilinearFormIntegrator *bfi_imag)
 Adds a boundary trace face integrator. Assumes ownership of bfi.
 
void AddBdrTraceFaceIntegrator (BilinearFormIntegrator *bfi_real, BilinearFormIntegrator *bfi_imag, Array< int > &bdr_marker)
 Adds a boundary trace face integrator. Assumes ownership of bfi.
 
void Assemble (int skip_zeros=1)
 Assemble the local matrix.
 
void Finalize (int skip_zeros=1)
 Finalizes the matrix initialization.
 
virtual void Update ()
 Updates the internal mixed forms with the new finite element space.
 
ComplexSparseMatrixAssembleComplexSparseMatrix ()
 Return a ComplexSparseMatrix wrapping the local (L-dof) real and imaginary matrices of the form.
 
FiniteElementSpaceTrialFESpace ()
 Return the trial FE space associated with the MixedSesquilinearForm.
 
const FiniteElementSpaceTrialFESpace () const
 Read-only access to the associated trial FiniteElementSpace.
 
FiniteElementSpaceTestFESpace ()
 Return the test FE space associated with the MixedSesquilinearForm.
 
const FiniteElementSpaceTestFESpace () const
 Read-only access to the associated test FiniteElementSpace.
 
void FormRectangularLinearSystem (const Array< int > &ess_trial_tdof_list, const Array< int > &ess_test_tdof_list, Vector &x, Vector &b, OperatorHandle &A, Vector &X, Vector &B)
 
void FormRectangularSystemMatrix (const Array< int > &ess_trial_tdof_list, const Array< int > &ess_test_tdof_list, OperatorHandle &A)
 
virtual ~MixedSesquilinearForm ()
 

Detailed Description

Class for a mixed sesquilinear form

A mixed sesquilinear form is a generalization of a mixed bilinear form to complex-valued fields. Mixed sesquilinear forms are linear in the second argument but the first argument involves a complex conjugate in the sense that:

        a(alpha u, beta v) = conj(alpha) beta a(u, v)

The convention argument in the class's constructor is documented in the mfem::ComplexOperator class found in linalg/complex_operator.hpp.

When supplying integrators to the MixedSesquilinearForm either the real or imaginary integrator can be NULL. This indicates that the corresponding portion of the complex-valued material coefficient is equal to zero.

Definition at line 527 of file complex_fem.hpp.

Constructor & Destructor Documentation

◆ MixedSesquilinearForm() [1/2]

mfem::MixedSesquilinearForm::MixedSesquilinearForm ( FiniteElementSpace * trial_fes,
FiniteElementSpace * test_fes,
ComplexOperator::Convention convention = ComplexOperator::HERMITIAN )

Definition at line 848 of file complex_fem.cpp.

◆ MixedSesquilinearForm() [2/2]

mfem::MixedSesquilinearForm::MixedSesquilinearForm ( FiniteElementSpace * trial_fes,
FiniteElementSpace * test_fes,
MixedBilinearForm * bfr,
MixedBilinearForm * bfi,
ComplexOperator::Convention convention = ComplexOperator::HERMITIAN )

Create a MixedSesquilinearForm on the given trial and test FiniteElementSpaces, using the same integrators as the MixedBilinearForms bfr and bfi.

The FiniteElementSpace pointers are not owned by the newly constructed object.

The integrators are copied as pointers and they are not owned by the newly constructed MixedSesquilinearForm.

Definition at line 857 of file complex_fem.cpp.

◆ ~MixedSesquilinearForm()

mfem::MixedSesquilinearForm::~MixedSesquilinearForm ( )
virtual

Definition at line 868 of file complex_fem.cpp.

Member Function Documentation

◆ AddBdrFaceIntegrator() [1/2]

void mfem::MixedSesquilinearForm::AddBdrFaceIntegrator ( BilinearFormIntegrator * bfi_real,
BilinearFormIntegrator * bfi_imag )

Adds new boundary Face Integrator. Assumes ownership of bfi.

Definition at line 948 of file complex_fem.cpp.

◆ AddBdrFaceIntegrator() [2/2]

void mfem::MixedSesquilinearForm::AddBdrFaceIntegrator ( BilinearFormIntegrator * bfi_real,
BilinearFormIntegrator * bfi_imag,
Array< int > & bdr_marker )

Adds new boundary Face Integrator, restricted to specific boundary attributes.

Assumes ownership of bfi.

The mfem::array bdr_marker is stored internally as a pointer to the given mfem::Array<int> object.

Definition at line 962 of file complex_fem.cpp.

◆ AddBdrTraceFaceIntegrator() [1/2]

void mfem::MixedSesquilinearForm::AddBdrTraceFaceIntegrator ( BilinearFormIntegrator * bfi_real,
BilinearFormIntegrator * bfi_imag )

Adds a boundary trace face integrator. Assumes ownership of bfi.

Definition at line 990 of file complex_fem.cpp.

◆ AddBdrTraceFaceIntegrator() [2/2]

void mfem::MixedSesquilinearForm::AddBdrTraceFaceIntegrator ( BilinearFormIntegrator * bfi_real,
BilinearFormIntegrator * bfi_imag,
Array< int > & bdr_marker )

Adds a boundary trace face integrator. Assumes ownership of bfi.

Definition at line 1004 of file complex_fem.cpp.

◆ AddBoundaryIntegrator() [1/2]

void mfem::MixedSesquilinearForm::AddBoundaryIntegrator ( BilinearFormIntegrator * bfi_real,
BilinearFormIntegrator * bfi_imag )

Adds new Boundary Integrator.

Definition at line 904 of file complex_fem.cpp.

◆ AddBoundaryIntegrator() [2/2]

void mfem::MixedSesquilinearForm::AddBoundaryIntegrator ( BilinearFormIntegrator * bfi_real,
BilinearFormIntegrator * bfi_imag,
Array< int > & bdr_marker )

Adds new boundary Integrator, restricted to specific boundary attributes.

Assumes ownership of bfi.

The mfem::array bdr_marker is stored internally as a pointer to the given mfem::Array<int> object.

Definition at line 918 of file complex_fem.cpp.

◆ AddDomainIntegrator() [1/2]

void mfem::MixedSesquilinearForm::AddDomainIntegrator ( BilinearFormIntegrator * bfi_real,
BilinearFormIntegrator * bfi_imag )

Adds new Domain Integrator.

Definition at line 875 of file complex_fem.cpp.

◆ AddDomainIntegrator() [2/2]

void mfem::MixedSesquilinearForm::AddDomainIntegrator ( BilinearFormIntegrator * bfi_real,
BilinearFormIntegrator * bfi_imag,
Array< int > & elem_marker )

Adds new Domain Integrator, restricted to specific attributes.

Definition at line 889 of file complex_fem.cpp.

◆ AddInteriorFaceIntegrator()

void mfem::MixedSesquilinearForm::AddInteriorFaceIntegrator ( BilinearFormIntegrator * bfi_real,
BilinearFormIntegrator * bfi_imag )

Adds new interior Face Integrator. Assumes ownership of bfi.

Definition at line 933 of file complex_fem.cpp.

◆ AddTraceFaceIntegrator()

void mfem::MixedSesquilinearForm::AddTraceFaceIntegrator ( BilinearFormIntegrator * bfi_real,
BilinearFormIntegrator * bfi_imag )

Add a trace face integrator. Assumes ownership of bfi.

This type of integrator assembles terms over all faces of the mesh using the face FE from the trial space and the two adjacent volume FEs from the test space.

Definition at line 976 of file complex_fem.cpp.

◆ Assemble()

void mfem::MixedSesquilinearForm::Assemble ( int skip_zeros = 1)

Assemble the local matrix.

Definition at line 1020 of file complex_fem.cpp.

◆ AssembleComplexSparseMatrix()

ComplexSparseMatrix * mfem::MixedSesquilinearForm::AssembleComplexSparseMatrix ( )

Return a ComplexSparseMatrix wrapping the local (L-dof) real and imaginary matrices of the form.

The returned wrapper has to be deleted by the caller, but it does not own the wrapped real and imaginary matrices, which remain owned by this form.

Definition at line 1034 of file complex_fem.cpp.

◆ Finalize()

void mfem::MixedSesquilinearForm::Finalize ( int skip_zeros = 1)

Finalizes the matrix initialization.

Definition at line 1027 of file complex_fem.cpp.

◆ FormRectangularLinearSystem()

void mfem::MixedSesquilinearForm::FormRectangularLinearSystem ( const Array< int > & ess_trial_tdof_list,
const Array< int > & ess_test_tdof_list,
Vector & x,
Vector & b,
OperatorHandle & A,
Vector & X,
Vector & B )

Definition at line 1041 of file complex_fem.cpp.

◆ FormRectangularSystemMatrix()

void mfem::MixedSesquilinearForm::FormRectangularSystemMatrix ( const Array< int > & ess_trial_tdof_list,
const Array< int > & ess_test_tdof_list,
mfem::OperatorHandle & A )

Definition at line 1196 of file complex_fem.cpp.

◆ GetConvention()

ComplexOperator::Convention mfem::MixedSesquilinearForm::GetConvention ( ) const
inline

Definition at line 562 of file complex_fem.hpp.

◆ imag() [1/2]

MixedBilinearForm & mfem::MixedSesquilinearForm::imag ( )
inline

Definition at line 582 of file complex_fem.hpp.

◆ imag() [2/2]

const MixedBilinearForm & mfem::MixedSesquilinearForm::imag ( ) const
inline

Definition at line 584 of file complex_fem.hpp.

◆ real() [1/2]

MixedBilinearForm & mfem::MixedSesquilinearForm::real ( )
inline

Definition at line 581 of file complex_fem.hpp.

◆ real() [2/2]

const MixedBilinearForm & mfem::MixedSesquilinearForm::real ( ) const
inline

Definition at line 583 of file complex_fem.hpp.

◆ SetAssemblyLevel()

void mfem::MixedSesquilinearForm::SetAssemblyLevel ( AssemblyLevel assembly_level)
inline

Set the desired assembly level.

Valid choices are:

This method must be called before assembly.

Definition at line 575 of file complex_fem.hpp.

◆ SetConvention()

void mfem::MixedSesquilinearForm::SetConvention ( const ComplexOperator::Convention & convention)
inline

Definition at line 563 of file complex_fem.hpp.

◆ TestFESpace() [1/2]

FiniteElementSpace * mfem::MixedSesquilinearForm::TestFESpace ( )
inline

Return the test FE space associated with the MixedSesquilinearForm.

Definition at line 670 of file complex_fem.hpp.

◆ TestFESpace() [2/2]

const FiniteElementSpace * mfem::MixedSesquilinearForm::TestFESpace ( ) const
inline

Read-only access to the associated test FiniteElementSpace.

Definition at line 673 of file complex_fem.hpp.

◆ TrialFESpace() [1/2]

FiniteElementSpace * mfem::MixedSesquilinearForm::TrialFESpace ( )
inline

Return the trial FE space associated with the MixedSesquilinearForm.

Definition at line 664 of file complex_fem.hpp.

◆ TrialFESpace() [2/2]

const FiniteElementSpace * mfem::MixedSesquilinearForm::TrialFESpace ( ) const
inline

Read-only access to the associated trial FiniteElementSpace.

Definition at line 667 of file complex_fem.hpp.

◆ Update()

void mfem::MixedSesquilinearForm::Update ( )
virtual

Updates the internal mixed forms with the new finite element space.

Definition at line 1244 of file complex_fem.cpp.


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