concepts::BilinearFormLiCo< F, G > Class Template Referenceabstract

A linear combination of bilinear forms. More...

#include <bilinearForm.hh>

Inheritance diagram for concepts::BilinearFormLiCo< F, G >:
concepts::BilinearForm< F, typename Realtype< F >::type > concepts::Cloneable concepts::OutputOperator

Public Member Functions

 BilinearFormLiCo (BilinearForm< F, G > &bfA, BilinearForm< F, G > &bfB, const F cA=1.0, const F cB=1.0)
 Constructor. More...
 
 BilinearFormLiCo (const BilinearFormLiCo &b)
 Copy constructor. This copy constructor implements a deep copy. More...
 
virtual BilinearFormLiCo< F, G > * clone () const
 Virtual constructor. More...
 
virtual BilinearFormclone () const=0
 Virtual constructor. More...
 
virtual void operator() (const Element< G > &elmX, const Element< G > &elmY, ElementMatrix< F > &em) const
 
virtual void operator() (const Element< typename Realtype< F >::type > &elmX, const Element< typename Realtype< F >::type > &elmY, ElementMatrix< F > &em) const=0
 Evaluates the bilinear form for all shape functions on elmX and elmY and stores the result in the matrix em. More...
 
virtual void operator() (const Element< typename Realtype< F >::type > &elmX, const Element< typename Realtype< F >::type > &elmY, ElementMatrix< F > &em, const ElementPair< typename Realtype< F >::type > &ep) const
 Evaluates the bilinear form for all shape functions on elmX and elmY and stores the result in the matrix em. More...
 
virtual ~BilinearFormLiCo ()
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Private Attributes

concepts::RCP< BilinearForm< F, G > > bA
 
concepts::RCP< BilinearForm< F, G > > bB
 
BilinearForm< F, G > * bfA_
 Bilinear form. More...
 
std::unique_ptr< BilinearForm< F, G > > bfAptr_
 
BilinearForm< F, G > * bfB_
 
std::unique_ptr< BilinearForm< F, G > > bfBptr_
 
const F cA_
 Coefficient of bfA. More...
 
const F cB_
 Coefficient of bfB. More...
 
ElementMatrix< F > em_
 Local element matrix used as temporary storage. More...
 

Detailed Description

template<class F, class G = typename Realtype<F>::type>
class concepts::BilinearFormLiCo< F, G >

A linear combination of bilinear forms.

The resulting element matrices of the bilinear forms are added into each other with the correct coefficient and can then be assembled.

Author
Philipp Frauenfelder, 2001
Examples
hpFEM2d.cc.

Definition at line 83 of file bilinearForm.hh.

Constructor & Destructor Documentation

◆ BilinearFormLiCo() [1/2]

template<class F , class G = typename Realtype<F>::type>
concepts::BilinearFormLiCo< F, G >::BilinearFormLiCo ( BilinearForm< F, G > &  bfA,
BilinearForm< F, G > &  bfB,
const F  cA = 1.0,
const F  cB = 1.0 
)
inline

Constructor.

Parameters
bfAFirst bilinear form
bfBSecond bilinear form
cACoefficient of bfA
cBCoefficient of bfB

Definition at line 91 of file bilinearForm.hh.

◆ BilinearFormLiCo() [2/2]

template<class F , class G = typename Realtype<F>::type>
concepts::BilinearFormLiCo< F, G >::BilinearFormLiCo ( const BilinearFormLiCo< F, G > &  b)

Copy constructor. This copy constructor implements a deep copy.

◆ ~BilinearFormLiCo()

template<class F , class G = typename Realtype<F>::type>
virtual concepts::BilinearFormLiCo< F, G >::~BilinearFormLiCo ( )
inlinevirtual

Definition at line 101 of file bilinearForm.hh.

Member Function Documentation

◆ clone() [1/2]

template<class F , class G = typename Realtype<F>::type>
virtual BilinearFormLiCo<F,G>* concepts::BilinearFormLiCo< F, G >::clone ( ) const
virtual

Virtual constructor.

Returns a pointer to a copy of itself. The caller is responsible to destroy this copy.

Implements concepts::Cloneable.

◆ clone() [2/2]

virtual BilinearForm* concepts::BilinearForm< F, typename Realtype< F >::type >::clone ( ) const
pure virtualinherited

Virtual constructor.

Returns a pointer to a copy of itself. The caller is responsible to destroy this copy.

Implemented in concepts::BilinearFormContainer< F, typename Realtype< F >::type >.

◆ info()

template<class F , class G = typename Realtype<F>::type>
virtual std::ostream& concepts::BilinearFormLiCo< F, G >::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::BilinearForm< F, typename Realtype< F >::type >.

◆ operator()() [1/3]

template<class F , class G = typename Realtype<F>::type>
virtual void concepts::BilinearFormLiCo< F, G >::operator() ( const Element< G > &  elmX,
const Element< G > &  elmY,
ElementMatrix< F > &  em 
) const
virtual

◆ operator()() [2/3]

virtual void concepts::BilinearForm< F, typename Realtype< F >::type >::operator() ( const Element< G > &  elmX,
const Element< G > &  elmY,
ElementMatrix< F > &  em 
) const
pure virtualinherited

Evaluates the bilinear form for all shape functions on elmX and elmY and stores the result in the matrix em.

Postcondition
The returned matrix em has the correct size.
Parameters
elmXLeft element (test functions)
elmYRight element (trial functions)
emReturn element matrix

Implemented in concepts::BilinearFormContainer< F, typename Realtype< F >::type >.

◆ operator()() [3/3]

virtual void concepts::BilinearForm< F, typename Realtype< F >::type >::operator() ( const Element< G > &  elmX,
const Element< G > &  elmY,
ElementMatrix< F > &  em,
const ElementPair< G > &  ep 
) const
inlinevirtualinherited

Evaluates the bilinear form for all shape functions on elmX and elmY and stores the result in the matrix em.

If this method is not reimplemented in a derived class, the default behaviour is to call the application operator without ep.

Postcondition
The returned matrix em has the correct size.
Parameters
elmXLeft element
elmYRight element
emReturn element matrix
epElement pair holding more information on the pair elmX and elmY

Definition at line 57 of file bilinearForm.hh.

Member Data Documentation

◆ bA

template<class F , class G = typename Realtype<F>::type>
concepts::RCP<BilinearForm<F,G> > concepts::BilinearFormLiCo< F, G >::bA
private

Definition at line 114 of file bilinearForm.hh.

◆ bB

template<class F , class G = typename Realtype<F>::type>
concepts::RCP<BilinearForm<F,G> > concepts::BilinearFormLiCo< F, G >::bB
private

Definition at line 114 of file bilinearForm.hh.

◆ bfA_

template<class F , class G = typename Realtype<F>::type>
BilinearForm<F,G>* concepts::BilinearFormLiCo< F, G >::bfA_
private

Bilinear form.

Definition at line 111 of file bilinearForm.hh.

◆ bfAptr_

template<class F , class G = typename Realtype<F>::type>
std::unique_ptr<BilinearForm<F,G> > concepts::BilinearFormLiCo< F, G >::bfAptr_
private

Definition at line 109 of file bilinearForm.hh.

◆ bfB_

template<class F , class G = typename Realtype<F>::type>
BilinearForm<F,G> * concepts::BilinearFormLiCo< F, G >::bfB_
private

Definition at line 111 of file bilinearForm.hh.

◆ bfBptr_

template<class F , class G = typename Realtype<F>::type>
std::unique_ptr<BilinearForm<F,G> > concepts::BilinearFormLiCo< F, G >::bfBptr_
private

Definition at line 109 of file bilinearForm.hh.

◆ cA_

template<class F , class G = typename Realtype<F>::type>
const F concepts::BilinearFormLiCo< F, G >::cA_
private

Coefficient of bfA.

Definition at line 117 of file bilinearForm.hh.

◆ cB_

template<class F , class G = typename Realtype<F>::type>
const F concepts::BilinearFormLiCo< F, G >::cB_
private

Coefficient of bfB.

Definition at line 119 of file bilinearForm.hh.

◆ em_

template<class F , class G = typename Realtype<F>::type>
ElementMatrix<F> concepts::BilinearFormLiCo< F, G >::em_
mutableprivate

Local element matrix used as temporary storage.

Definition at line 121 of file bilinearForm.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich