template<class TypeTag, int m>
class Dumux::LocalStiffness< TypeTag, m >
Base class for local assemblers.
This class serves as a base class for local assemblers. It provides space and access to the local stiffness matrix. The actual assembling is done in a derived class via the virtual assemble method.
- Template Parameters
-
TypeTag | The problem TypeTag |
m | number of degrees of freedom per node (system size) |
|
virtual | ~LocalStiffness () |
|
virtual void | assemble (const Entity &e, int k=1)=0 |
| Assembles local stiffness matrix including boundary conditions for given element and order. More...
|
|
virtual void | assemble (const Entity &e, const Dune::BlockVector< VBlockType > &localSolution, int k=1)=0 |
| assemble local stiffness matrix including boundary conditions for given element and order More...
|
|
virtual void | assembleBoundaryCondition (const Entity &e, int k=1)=0 |
| assemble only boundary conditions for given element and order More...
|
|
void | print (std::ostream &s, int width, int precision) |
| Prints contents of local stiffness matrix. More...
|
|
const MBlockType & | mat (int i, int j) const |
| Accesses the local stiffness matrix. More...
|
|
const VBlockType & | rhs (int i) const |
| Accesses right hand side. More...
|
|
const BoundaryTypes & | bc (int i) const |
| Accesses boundary condition for each dof. More...
|
|
void | setcurrentsize (int s) |
| Sets the current size of the local stiffness matrix. More...
|
|
int | currentsize () |
| Gets the current size of the local stiffness matrix. More...
|
|
template<class TypeTag , int m>
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
-
e | a codim 0 entity reference |
localSolution | The current solution on the entity, which is needed by nonlinear assemblers |
k | order of Lagrange basis (default is 1) |
Implemented in Dumux::LinearLocalStiffness< TypeTag, m >.
template<class TypeTag , int m>
Assembles 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
-
e | a codim 0 entity reference |
k | order of Lagrange basis (default is 1) |
Implemented in Dumux::LinearLocalStiffness< TypeTag, m >.