A function class to calculate element matrices for the Div u*Div v Bilinearform. More...

#include <divdiv.hh>

Inheritance diagram for hp2D::DivDiv< Weight >:
concepts::BilinearForm< Real > vectorial::Vectorizable concepts::Cloneable concepts::OutputOperator

Public Member Functions

virtual DivDivclone () const
 Virtual constructor. More...
 
virtual BilinearForm * clone () const=0
 Virtual constructor. More...
 
virtual MaxwellSharedDatadata () const
 Returns the data to be shared. More...
 
virtual void data (concepts::Cloneable *d)
 Sets the data to be shared. More...
 
 DivDiv (concepts::Array< Real > &jacobian, concepts::Array< concepts::MapReal2d > &jacobianInv, const Quad< Real > **oldElm, SingularSet &singularities, const uint i=0, const uint j=0, const concepts::Formula< Real > *frm=0)
 Constructor. More...
 
 DivDiv (SingularSet &singularities, const uint i=0, const uint j=0, const concepts::Formula< Real > *frm=0)
 Constructor. More...
 
virtual void operator() (const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< Real > &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 Quad< Real > &elmX, const Quad< Real > &elmY, concepts::ElementMatrix< Real > &em) const
 
virtual ~DivDiv ()
 

Static Public Member Functions

static void setup (vectorial::BilinearForm< Real, Real > &bf, hp2D::SingularSet &singularities, const concepts::Formula< Real > *frm=0)
 Sets up the bilinear form for the div-div part for Maxwell's equation using weighted regularization. More...
 

Protected Member Functions

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

Private Attributes

concepts::Array< concepts::MapReal2dcoeffMatrix_
 Intermediate data for element matrix computation. More...
 
std::unique_ptr< const concepts::Formula< Real > > frm_
 Formula for dielectricity $\epsilon$. More...
 
uint i_
 Row and column inside the vectorial bilinear form. More...
 
uint j_
 
concepts::Array< Real > * jacobian_
 Intermediate data for element matrix computation. More...
 
concepts::Array< concepts::MapReal2d > * jacobianInv_
 
const Quad< Real > ** oldElm_
 
MaxwellSharedDatasharedData_
 
SingularSetsingularities_
 Set of singular points. More...
 
Weight weight_
 Weight of regularization. More...
 

Detailed Description

template<typename Weight = TrivialWeight>
class hp2D::DivDiv< Weight >

A function class to calculate element matrices for the Div u*Div v Bilinearform.

The Jacobian, its inverse and additional quantities only depending on the physical coordinates are only computed once for all components of the bilinear form. To this end, several additional parameters can be given to the constructor (see there). However, it is much simpler to use the DivDiv::setup method which sets up everything automatically.

Author
Kersten Schmidt, 2003

TODO: setupDivDiv()-function with singularities using SharedJacobianAdj instead of MaxwellSharedData.

Definition at line 59 of file divdiv.hh.

Constructor & Destructor Documentation

◆ DivDiv() [1/2]

template<typename Weight = TrivialWeight>
hp2D::DivDiv< Weight >::DivDiv ( SingularSet singularities,
const uint  i = 0,
const uint  j = 0,
const concepts::Formula< Real > *  frm = 0 
)

Constructor.

Parameters
singularitiesList of singular edges and vertices.
iIndex of the bilinear form in the vector valued bilinear form
jIndex of the bilinear form in the vector valued bilinear form
frmFormula for the dielectricity $\epsilon$

◆ DivDiv() [2/2]

template<typename Weight = TrivialWeight>
hp2D::DivDiv< Weight >::DivDiv ( concepts::Array< Real > &  jacobian,
concepts::Array< concepts::MapReal2d > &  jacobianInv,
const Quad< Real > **  oldElm,
SingularSet singularities,
const uint  i = 0,
const uint  j = 0,
const concepts::Formula< Real > *  frm = 0 
)

Constructor.

Parameters
jacobianReference to the storage space for the Jacobian. Here, also other quantities are stored (premultiplied).
jacobianInvReference to the storage space for the inverse of the Jacobian.
oldElmPointer to the element of the last invocation to detect if the information in jacobian and jacobianInv is still valid.
singularitiesList of singular edges and vertices.
iIndex of the bilinear form in the vector valued bilinear form
jIndex of the bilinear form in the vector valued bilinear form
frmFormula for the dielectic $\epsilon$

◆ ~DivDiv()

template<typename Weight = TrivialWeight>
virtual hp2D::DivDiv< Weight >::~DivDiv ( )
virtual

Member Function Documentation

◆ clone() [1/2]

template<typename Weight = TrivialWeight>
virtual DivDiv* hp2D::DivDiv< Weight >::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< 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.

◆ data() [1/2]

template<typename Weight = TrivialWeight>
virtual MaxwellSharedData* hp2D::DivDiv< Weight >::data ( ) const
virtual

Returns the data to be shared.

Implements vectorial::Vectorizable.

◆ data() [2/2]

template<typename Weight = TrivialWeight>
virtual void hp2D::DivDiv< Weight >::data ( concepts::Cloneable )
virtual

Sets the data to be shared.

Implements vectorial::Vectorizable.

◆ info()

template<typename Weight = TrivialWeight>
virtual std::ostream& hp2D::DivDiv< Weight >::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::BilinearForm< Real >.

◆ operator()() [1/4]

template<typename Weight = TrivialWeight>
virtual void hp2D::DivDiv< Weight >::operator() ( const concepts::Element< Real > &  elmX,
const concepts::Element< Real > &  elmY,
concepts::ElementMatrix< Real > &  em 
) const
virtual

◆ 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<typename Weight = TrivialWeight>
void hp2D::DivDiv< Weight >::operator() ( const Quad< Real > &  elmX,
const Quad< Real > &  elmY,
concepts::ElementMatrix< Real > &  em 
) const

◆ setup()

template<typename Weight = TrivialWeight>
static void hp2D::DivDiv< Weight >::setup ( vectorial::BilinearForm< Real, Real > &  bf,
hp2D::SingularSet singularities,
const concepts::Formula< Real > *  frm = 0 
)
static

Sets up the bilinear form for the div-div part for Maxwell's equation using weighted regularization.

Parameters
bfResulting bilinear form (use this to compute the matrix)
singularitiesSingularities needed for computing the weight
frmFormula for the dielectricity (if none is given, 1 is assumed)
Precondition
The number of components of bf needs to be 2 x 2.

Member Data Documentation

◆ coeffMatrix_

template<typename Weight = TrivialWeight>
concepts::Array<concepts::MapReal2d> hp2D::DivDiv< Weight >::coeffMatrix_
private

Intermediate data for element matrix computation.

Definition at line 126 of file divdiv.hh.

◆ frm_

template<typename Weight = TrivialWeight>
std::unique_ptr<const concepts::Formula<Real> > hp2D::DivDiv< Weight >::frm_
private

Formula for dielectricity $\epsilon$.

Definition at line 123 of file divdiv.hh.

◆ i_

template<typename Weight = TrivialWeight>
uint hp2D::DivDiv< Weight >::i_
private

Row and column inside the vectorial bilinear form.

Definition at line 115 of file divdiv.hh.

◆ j_

template<typename Weight = TrivialWeight>
uint hp2D::DivDiv< Weight >::j_
private

Definition at line 115 of file divdiv.hh.

◆ jacobian_

template<typename Weight = TrivialWeight>
concepts::Array<Real>* hp2D::DivDiv< Weight >::jacobian_
private

Intermediate data for element matrix computation.

Definition at line 130 of file divdiv.hh.

◆ jacobianInv_

template<typename Weight = TrivialWeight>
concepts::Array<concepts::MapReal2d>* hp2D::DivDiv< Weight >::jacobianInv_
private

Definition at line 131 of file divdiv.hh.

◆ oldElm_

template<typename Weight = TrivialWeight>
const Quad<Real>** hp2D::DivDiv< Weight >::oldElm_
private

Definition at line 132 of file divdiv.hh.

◆ sharedData_

template<typename Weight = TrivialWeight>
MaxwellSharedData* hp2D::DivDiv< Weight >::sharedData_
private

Definition at line 133 of file divdiv.hh.

◆ singularities_

template<typename Weight = TrivialWeight>
SingularSet& hp2D::DivDiv< Weight >::singularities_
private

Set of singular points.

Definition at line 118 of file divdiv.hh.

◆ weight_

template<typename Weight = TrivialWeight>
Weight hp2D::DivDiv< Weight >::weight_
private

Weight of regularization.

Definition at line 120 of file divdiv.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