Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes
Laplace Class Reference

Discrete equivalent of the Laplacian in 2D for linear and quadratic FEM. More...

#include <lhsrhs.hh>

Inheritance diagram for Laplace:
Inheritance graph
[legend]
Collaboration diagram for Laplace:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual Laplaceclone () const
 Virtual constructor.
 Laplace (const concepts::Formula< Real > &frm)
 Constructor. Takes a function as parameter frm.
 Laplace (const concepts::DynArray< Real > &A_M)
 Constructor.
virtual void operator() (const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< Real > &em)
void operator() (const TriangleP2 &elmX, const TriangleP2 &elmY, concepts::ElementMatrix< Real > &em)
 Computes the element stiffness matrix for a triangle with quadratic shape functions.
void operator() (const linearFEM::Triangle &elmX, const linearFEM::Triangle &elmY, concepts::ElementMatrix< Real > &em)
 Computes the element stiffness matrix for a triangle with linear shape functions.
virtual void operator() (const Element< typename Realtype< Real >::type > &elmX, const Element< typename Realtype< Real >::type > &elmY, ElementMatrix< Real > &em)=0
 Evaluates the bilinear form for all shape functions on elmX and elmY and stores the result in the matrix em.
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)
 Evaluates the bilinear form for all shape functions on elmX and elmY and stores the result in the matrix em.

Static Public Attributes

static const concepts::Real2d coord_ [4]
 Integration points (3rd order)
static const Real weights_ [4]
 Integration weights (3rd order)

Protected Member Functions

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

Private Attributes

const concepts::DynArray< Real > * A_M_
std::auto_ptr< const
concepts::Formula< Real > > 
frm_
 Formula.

Detailed Description

Discrete equivalent of the Laplacian in 2D for linear and quadratic FEM.

This bilinear form computes the stiffness matrix resulting from the discretization of the Laplacian (with integration by parts):

\[ \int_K A^M_\alpha(x) \nabla \phi_i \cdot \nabla \phi_j \, dx \]

for the element shape functions $\phi_i$.

Author:
Philipp Frauenfelder, 2002

Definition at line 33 of file lhsrhs.hh.


Constructor & Destructor Documentation

Laplace::Laplace ( const concepts::DynArray< Real > &  A_M) [inline]

Constructor.

Takes a function $A^M_\alpha(x)$ evaluated in all cells as parameter A_M.

Definition at line 38 of file lhsrhs.hh.

Laplace::Laplace ( const concepts::Formula< Real > &  frm) [inline]

Constructor. Takes a function as parameter frm.

Definition at line 40 of file lhsrhs.hh.


Member Function Documentation

virtual Laplace* Laplace::clone ( ) const [virtual]

Virtual constructor.

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

Implements concepts::Cloneable.

virtual std::ostream& concepts::BilinearForm< Real , typename Realtype<Real >::type >::info ( std::ostream &  os) const [protected, virtual, inherited]
virtual void concepts::BilinearForm< Real , typename Realtype<Real >::type >::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 
) [inline, virtual, inherited]

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 53 of file bilinearForm.hh.

Here is the call graph for this function:

virtual void concepts::BilinearForm< Real , typename Realtype<Real >::type >::operator() ( const Element< typename Realtype<Real >::type > &  elmX,
const Element< typename Realtype<Real >::type > &  elmY,
ElementMatrix< Real > &  em 
) [pure virtual, inherited]

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
void Laplace::operator() ( const linearFEM::Triangle elmX,
const linearFEM::Triangle elmY,
concepts::ElementMatrix< Real > &  em 
)

Computes the element stiffness matrix for a triangle with linear shape functions.

The stiffness matrix is precomputed in case A_M was given in the constructor since the element map is constant. Otherwise, it is integrated numerically with 3rd order rule.

void Laplace::operator() ( const TriangleP2 elmX,
const TriangleP2 elmY,
concepts::ElementMatrix< Real > &  em 
)

Computes the element stiffness matrix for a triangle with quadratic shape functions.

The stiffness matrix is integrated numerically with 3rd order rule.

virtual void Laplace::operator() ( const concepts::Element< Real > &  elmX,
const concepts::Element< Real > &  elmY,
concepts::ElementMatrix< Real > &  em 
) [virtual]

Member Data Documentation

const concepts::DynArray<Real>* Laplace::A_M_ [private]

Definition at line 67 of file lhsrhs.hh.

const concepts::Real2d Laplace::coord_[4] [static]

Integration points (3rd order)

Definition at line 63 of file lhsrhs.hh.

std::auto_ptr<const concepts::Formula<Real> > Laplace::frm_ [private]

Formula.

Definition at line 69 of file lhsrhs.hh.

const Real Laplace::weights_[4] [static]

Integration weights (3rd order)

Definition at line 61 of file lhsrhs.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)