A function class to calculate element matrices for the bilinear form. More...

#include <bf_graduv.hh>

Inheritance diagram for hp2Dedge::Graduv< F >:
concepts::BilinearForm< Real > hp2Dedge::GraduvBase< Real > concepts::Cloneable concepts::OutputOperator hp2D::BilinearFormHelper_1_1< Real, typename concepts::Realtype< Real >::type >

Public Types

typedef concepts::Combtype< Real, typename concepts::Realtype< Real >::type >::type value_type
 

Public Member Functions

virtual Graduv< F > * clone () const
 Virtual constructor. More...
 
virtual BilinearForm * clone () const=0
 Virtual constructor. More...
 
concepts::RCP< concepts::SharedJacobianAdj< 2 > > data () const
 Gets the pointer to the shared data. More...
 
void data (const concepts::RCP< concepts::SharedJacobianAdj< 2 > > d)
 Set the pointer to the shared data. More...
 
 Graduv (const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
 
void operator() (const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
 
virtual void operator() (const Element< typename Realtype< Real >::type > &elmX, const Element< typename Realtype< Real >::type > &elmY, ElementMatrix< Real > &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< Real >::type > &elmX, const Element< typename Realtype< Real >::type > &elmY, ElementMatrix< Real > &em, const ElementPair< typename Realtype< Real >::type > &ep) const
 Evaluates the bilinear form for all shape functions on elmX and elmY and stores the result in the matrix em. More...
 
void operator() (const hp2D::Quad< Real > &elmX, const Quad< Real > &elmY, concepts::ElementMatrix< F > &em) const
 
virtual ~Graduv ()
 

Protected Member Functions

bool assemble_ (const hp2D::Quad< Real > *elmX, const Quad< Real > *elmY, concepts::ElementMatrix< value_type > &em) const
 
void computeIntermediate_ (const BaseQuad< Real > &elm, const int i=-1, const int j=-1) const
 Compute the intermediate data for element matrix computation. More...
 
virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Protected Attributes

bool all_
 Parameter for the sum factorisation. More...
 
concepts::ElementFormulaContainer< Real > frm_
 Element formula. More...
 
concepts::ElementFormulaContainer< concepts::Mapping< typename concepts::Realtype< Real >::type, 2 > > frmM_
 Matrix element formula. More...
 
concepts::Array< concepts::Mapping< typename concepts::Realtype< Real >::type, 2 > > intermediateMatrix_
 Intermediate matrix. More...
 
concepts::Array< Real > intermediateValue_
 Intermediate value. More...
 

Private Member Functions

void computeadjJ_adjJT_rank1_ (concepts::Array< concepts::Mapping< Real, 2 > > &intermediateMatrix, const int i, const int j) const
 Computes the either adj(J)*adj(J)^T or in the case of partial derivatives (i > NONE, j > NONE) the rank-1 product of j-th column of adj(J) with i-th row of adj(J)^T. More...
 
void computeJacobianMatrix_ (const BaseQuad< Real > &elm, concepts::Array< concepts::Mapping< Real, 2 > > &J, concepts::Array< Real > &detJ_inv) const
 Compute the Jacobian matrix and the inverse of its determinant on each quadrature point. More...
 

Private Attributes

concepts::Array< Real > factor_
 Intermediate data for element matrix computation. More...
 
concepts::Array< concepts::Mapping< Real, 2 > > jacobianInv_
 
concepts::RCP< concepts::SharedJacobianAdj< 2 > > sharedData_
 Shared data for vectorial bilinear forms. More...
 

Detailed Description

template<class F = Real>
class hp2Dedge::Graduv< F >

A function class to calculate element matrices for the bilinear form.

\[\int\limits_{K}\underline{u}^\top\;\nabla{v}\;d\underline{\xi} = \int\limits_{\hat{K}}\underline{\hat{u}}^\top J^{-1}J^{-\top}\;\nabla{\hat{v}}|\det J|\;d\underline{\hat{\xi}}\]

Author
Kersten Schmidt, 2005

Definition at line 100 of file bf_graduv.hh.

Member Typedef Documentation

◆ value_type

typedef concepts::Combtype<Real , typename concepts::Realtype<Real >::type >::type hp2Dedge::GraduvBase< Real , typename concepts::Realtype<Real >::type >::value_type
inherited

Definition at line 66 of file bf_graduv.hh.

Constructor & Destructor Documentation

◆ Graduv()

template<class F = Real>
hp2Dedge::Graduv< F >::Graduv ( const concepts::ElementFormulaContainer< F >  frm = concepts::ElementFormulaContainer< F >())

◆ ~Graduv()

template<class F = Real>
virtual hp2Dedge::Graduv< F >::~Graduv ( )
inlinevirtual

Definition at line 106 of file bf_graduv.hh.

Member Function Documentation

◆ assemble_()

bool hp2Dedge::GraduvBase< Real , typename concepts::Realtype<Real >::type >::assemble_ ( const hp2D::Quad< Real > *  elmX,
const Quad< Real > *  elmY,
concepts::ElementMatrix< value_type > &  em 
) const
protectedinherited

◆ clone() [1/2]

template<class F = Real>
virtual Graduv<F>* hp2Dedge::Graduv< F >::clone ( ) const
inlinevirtual

Virtual constructor.

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

Implements concepts::Cloneable.

Definition at line 117 of file bf_graduv.hh.

◆ clone() [2/2]

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

Virtual constructor.

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

◆ computeadjJ_adjJT_rank1_()

void hp2D::BilinearFormHelper_1_1< Real , typename concepts::Realtype< Real >::type >::computeadjJ_adjJT_rank1_ ( concepts::Array< concepts::Mapping< Real, 2 > > &  intermediateMatrix,
const int  i,
const int  j 
) const
privateinherited

Computes the either adj(J)*adj(J)^T or in the case of partial derivatives (i > NONE, j > NONE) the rank-1 product of j-th column of adj(J) with i-th row of adj(J)^T.

◆ computeIntermediate_()

void hp2D::BilinearFormHelper_1_1< Real , typename concepts::Realtype< Real >::type >::computeIntermediate_ ( const BaseQuad< Real > &  elm,
const int  i = -1,
const int  j = -1 
) const
protectedinherited

Compute the intermediate data for element matrix computation.

Parameters
iif i=0 or 1, then take only i-th column of Jacobian matrix (for test function)
jif j=0 or 1, then take only j-th column of Jacobian matrix (for trial function)

The Jacobian matrices have to been taken both full (i,j = -1) or both partial (i,j = 0 or 1).

Matrix formulas and complex valued scalar formulas are only implemented for full Jacobians.

◆ computeJacobianMatrix_()

void hp2D::BilinearFormHelper_1_1< Real , typename concepts::Realtype< Real >::type >::computeJacobianMatrix_ ( const BaseQuad< Real > &  elm,
concepts::Array< concepts::Mapping< Real, 2 > > &  J,
concepts::Array< Real > &  detJ_inv 
) const
privateinherited

Compute the Jacobian matrix and the inverse of its determinant on each quadrature point.

◆ data() [1/2]

concepts::RCP<concepts::SharedJacobianAdj<2> > hp2D::BilinearFormHelper_1_1< Real , typename concepts::Realtype< Real >::type >::data ( ) const
inherited

Gets the pointer to the shared data.

◆ data() [2/2]

void hp2D::BilinearFormHelper_1_1< Real , typename concepts::Realtype< Real >::type >::data ( const concepts::RCP< concepts::SharedJacobianAdj< 2 > >  d)
inherited

Set the pointer to the shared data.

◆ info()

template<class F = Real>
virtual std::ostream& hp2Dedge::Graduv< F >::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::BilinearForm< Real >.

◆ operator()() [1/4]

template<class F = Real>
void hp2Dedge::Graduv< F >::operator() ( const concepts::Element< Real > &  elmX,
const concepts::Element< Real > &  elmY,
concepts::ElementMatrix< F > &  em 
) const

◆ operator()() [2/4]

virtual void concepts::BilinearForm< Real , typename Realtype<Real >::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

◆ operator()() [3/4]

virtual void concepts::BilinearForm< Real , typename Realtype<Real >::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.

◆ operator()() [4/4]

template<class F = Real>
void hp2Dedge::Graduv< F >::operator() ( const hp2D::Quad< Real > &  elmX,
const Quad< Real > &  elmY,
concepts::ElementMatrix< F > &  em 
) const

Member Data Documentation

◆ all_

bool hp2Dedge::GraduvBase< Real , typename concepts::Realtype<Real >::type >::all_
protectedinherited

Parameter for the sum factorisation.

Definition at line 79 of file bf_graduv.hh.

◆ factor_

concepts::Array<Real > hp2Dedge::GraduvBase< Real , typename concepts::Realtype<Real >::type >::factor_
mutableprivateinherited

Intermediate data for element matrix computation.

Definition at line 87 of file bf_graduv.hh.

◆ frm_

concepts::ElementFormulaContainer<Real > hp2D::BilinearFormHelper_1_1< Real , typename concepts::Realtype< Real >::type >::frm_
protectedinherited

Element formula.

Definition at line 193 of file bilinearFormHelper.hh.

◆ frmM_

concepts::ElementFormulaContainer<concepts::Mapping<typename concepts::Realtype< Real >::type ,2> > hp2D::BilinearFormHelper_1_1< Real , typename concepts::Realtype< Real >::type >::frmM_
protectedinherited

Matrix element formula.

Definition at line 195 of file bilinearFormHelper.hh.

◆ intermediateMatrix_

concepts::Array<concepts::Mapping<typename concepts::Realtype< Real >::type ,2> > hp2D::BilinearFormHelper_1_1< Real , typename concepts::Realtype< Real >::type >::intermediateMatrix_
mutableprotectedinherited

Intermediate matrix.

In case of a scalar formula:

\[\mbox{adj}(J) \mbox{adj}(J)^\top\]

In case of a matrix formula $M$:

\[\mbox{adj}(J) M \mbox{adj}(J)^\top\]

In case of partial Jacobian:

\[\mbox{adj}(J)_{\cdot,j} (\mbox{adj}(J)_{\cdot,i})^\top\]

Definition at line 191 of file bilinearFormHelper.hh.

◆ intermediateValue_

concepts::Array<Real > hp2D::BilinearFormHelper_1_1< Real , typename concepts::Realtype< Real >::type >::intermediateValue_
mutableprotectedinherited

Intermediate value.

In case of a scalar formula:

\[\frac{f(F_K(\xi))}{\det J}\]

In case of a matrix formula:

\[\frac{1}{\det J}\]

Definition at line 179 of file bilinearFormHelper.hh.

◆ jacobianInv_

concepts::Array<concepts::Mapping<Real , 2> > hp2Dedge::GraduvBase< Real , typename concepts::Realtype<Real >::type >::jacobianInv_
mutableprivateinherited

Definition at line 88 of file bf_graduv.hh.

◆ sharedData_

concepts::RCP<concepts::SharedJacobianAdj<2> > hp2D::BilinearFormHelper_1_1< Real , typename concepts::Realtype< Real >::type >::sharedData_
privateinherited

Shared data for vectorial bilinear forms.

Definition at line 212 of file bilinearFormHelper.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