Dune::LinearElasticityLocalStiffness< GridView, RT > Class Template Reference
[Abstractions for Discretization Schemes]

#include <linearelasticityassembler.hh>

Inheritance diagram for Dune::LinearElasticityLocalStiffness< GridView, RT >:

Dune::LinearLocalStiffness< GridView, RT, GridView::dimension > Dune::LocalStiffness< GV, RT, m > List of all members.

Detailed Description

template<class GridView, class RT>
class Dune::LinearElasticityLocalStiffness< GridView, RT >

A class for computing local stiffness matrices.

A class for computing local stiffness matrix for the linear elasticity equation

u = g on Gamma1; j*n = J on Gamma2.

Uses conforming finite elements with the Lagrange shape functions. It should work for all dimensions and element types. All the numbering is with respect to the reference element and the Lagrange shape functions

GridView a DUNE gridview type RT type used for return values


Public Member Functions

 LinearElasticityLocalStiffness ()
 Default Constructor.
 LinearElasticityLocalStiffness (double E, double nu, bool procBoundaryAsDirichlet_=true)
 Constructor.
void setEandNu (double E, double nu)
 Set material parameters.
void assemble (const Entity &e, int k=1)
 assemble local stiffness matrix for given element and order
void assembleBoundaryCondition (const Entity &e, int k=1)
 should allow to assmble boundary conditions only
virtual void assemble (const Entity &e, const BlockVector< VBlockType > &localSolution, int k=1)
 assemble local stiffness matrix including boundary conditions for given element and order
virtual void assemble (const Entity &e, int k=1)=0
 assemble local stiffness matrix including boundary conditions for given element and order
virtual void assemble (const Entity &e, const BlockVector< VBlockType > &localSolution, int k=1)=0
 assemble local stiffness matrix including boundary conditions for given element and order
virtual void assembleBoundaryCondition (const Entity &e, int k=1)=0
 assemble only boundary conditions for given element and order
void print (std::ostream &s, int width, int precision)
 print contents of local stiffness matrix
const MBlockType & mat (int i, int j) const
 access local stiffness matrix
const VBlockType & rhs (int i) const
 access right hand side
const BCBlockType & bc (int i) const
 access boundary condition for each dof
void setcurrentsize (int s)
 set the current size of the local stiffness matrix
int currentsize ()
 get the current size of the local stiffness matrix

Member Function Documentation

template<class GridView, class RT>
void Dune::LinearElasticityLocalStiffness< GridView, RT >::assemble ( const Entity &  e,
int  k = 1 
) [inline, virtual]

assemble local stiffness matrix for given element and order

On exit the following things have been done:

  • The stiffness matrix for the given entity and polynomial degree has been assembled and is accessible with the mat() method.
  • The boundary conditions have been evaluated and are accessible with the bc() method
  • The right hand side has been assembled. It contains either the value of the essential boundary condition or the assembled source term and neumann boundary condition. It is accessible via the rhs() method.
    Parameters:
    [in] e a codim 0 entity reference
    [in] k order of Lagrange basis

Implements Dune::LinearLocalStiffness< GridView, RT, GridView::dimension >.

virtual void Dune::LinearLocalStiffness< GridView , RT , m >::assemble ( const Entity &  e,
const BlockVector< VBlockType > &  localSolution,
int  k = 1 
) [inline, virtual, inherited]

assemble local stiffness matrix including boundary conditions for given element and order

Since this is a base class for linear assemblers, the local solution will be ignored.

Parameters:
[in] e a codim 0 entity reference
[in] localSolution The current solution on the entity, which is needed by nonlinear assemblers
[in] k order of Lagrange basis (default is 1)

template<class GV, class RT, int m>
virtual void Dune::LocalStiffness< GV, RT, m >::assemble ( const Entity &  e,
int  k = 1 
) [pure virtual, inherited]

assemble local stiffness matrix including boundary conditions for given element and order

On exit the following things have been done:

  • The stiffness matrix for the given entity and polynomial degree has been assembled and is accessible with the mat() method.
  • The boundary conditions have been evaluated and are accessible with the bc() method. The boundary conditions are either neumann, process or dirichlet. Neumann indicates that the corresponding node (assuming a nodal basis) is at the Neumann boundary, process indicates that the node is at a process boundary (arising from the parallel decomposition of the mesh). Process boundaries are treated as homogeneous Dirichlet conditions, i.e. the corresponding value in the right hand side is set to 0. Finally, Dirichlet indicates that the node is at the Dirichlet boundary.
  • The right hand side has been assembled. It contains either the value of the essential boundary condition or the assembled source term and neumann boundary condition. It is accessible via the rhs() method.

Parameters:
[in] e a codim 0 entity reference
[in] k order of Lagrange basis (default is 1)

Implemented in Dune::GroundwaterEquationLocalStiffness< GV, RT >, Dune::LinearLocalStiffness< GV, RT, m >, and Dune::LinearLocalStiffness< GV, RT, 1 >.

template<class GV, class RT, int m>
virtual void Dune::LocalStiffness< GV, RT, m >::assemble ( const Entity &  e,
const BlockVector< VBlockType > &  localSolution,
int  k = 1 
) [pure virtual, inherited]

assemble local stiffness matrix including boundary conditions for given element and order

Unlike the method with only two arguments, this one additionally takes the local solution in order to allow assembly of nonlinear operators.

On exit the following things have been done:

  • The stiffness matrix for the given entity and polynomial degree has been assembled and is accessible with the mat() method.
  • The boundary conditions have been evaluated and are accessible with the bc() method. The boundary conditions are either neumann, process or dirichlet. Neumann indicates that the corresponding node (assuming a nodal basis) is at the Neumann boundary, process indicates that the node is at a process boundary (arising from the parallel decomposition of the mesh). Process boundaries are treated as homogeneous Dirichlet conditions, i.e. the corresponding value in the right hand side is set to 0. Finally, Dirichlet indicates that the node is at the Dirichlet boundary.
  • The right hand side has been assembled. It contains either the value of the essential boundary condition or the assembled source term and neumann boundary condition. It is accessible via the rhs() method.

Parameters:
[in] e a codim 0 entity reference
[in] localSolution The current solution on the entity, which is needed by nonlinear assemblers
[in] k order of Lagrange basis (default is 1)

Implemented in Dune::LinearLocalStiffness< GV, RT, m >, and Dune::LinearLocalStiffness< GV, RT, 1 >.

template<class GV, class RT, int m>
virtual void Dune::LocalStiffness< GV, RT, m >::assembleBoundaryCondition ( const Entity &  e,
int  k = 1 
) [pure virtual, inherited]

assemble only boundary conditions for given element and order

On exit the following things have been done:

  • The boundary conditions have been evaluated and are accessible with the bc() method. The boundary conditions are either neumann, process or dirichlet. Neumann indicates that the corresponding node (assuming a nodal basis) is at the Neumann boundary, process indicates that the node is at a process boundary (arising from the parallel decomposition of the mesh). Process boundaries are treated as homogeneous Dirichlet conditions, i.e. the corresponding value in the right hand side is set to 0. Finally, Dirichlet indicates that the node is at the Dirichlet boundary.
  • The right hand side has been assembled as far as boundary conditions are concerned. It contains either the value of the essential boundary condition or the assembled neumann boundary condition. It is accessible via the rhs() method.

Parameters:
[in] e a codim 0 entity reference
[in] k order of Lagrange basis (default is 1)

Implemented in Dune::GroundwaterEquationLocalStiffness< GV, RT >.

template<class GV, class RT, int m>
const MBlockType& Dune::LocalStiffness< GV, RT, m >::mat ( int  i,
int  j 
) const [inline, inherited]

access local stiffness matrix

Access elements of the local stiffness matrix. Elements are undefined without prior call to the assemble method.

template<class GV, class RT, int m>
const VBlockType& Dune::LocalStiffness< GV, RT, m >::rhs ( int  i  )  const [inline, inherited]

access right hand side

Access elements of the right hand side vector. Elements are undefined without prior call to the assemble method.

template<class GV, class RT, int m>
const BCBlockType& Dune::LocalStiffness< GV, RT, m >::bc ( int  i  )  const [inline, inherited]

access boundary condition for each dof

Access boundary condition type for each degree of freedom. Elements are undefined without prior call to the assemble method.


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

Generated on 6 Jan 2009 with Doxygen (ver 1.5.1) [logfile].