24#ifndef DUMUX_LOCAL_STIFFNESS_HH
25#define DUMUX_LOCAL_STIFFNESS_HH
33#include<dune/common/timer.hh>
34#include<dune/common/fvector.hh>
35#include<dune/common/fmatrix.hh>
36#include<dune/geometry/type.hh>
37#include<dune/grid/common/grid.hh>
38#include<dune/istl/operators.hh>
39#include<dune/istl/bvector.hh>
40#include<dune/istl/matrix.hh>
58template<
class TypeTag,
int m>
64 using Entity =
typename GridView::template Codim<0>::Entity;
65 enum {n=GridView::dimension};
98 virtual void assemble (
const Entity& e,
int k=1) = 0;
124 virtual void assemble (
const Entity& e,
const Dune::BlockVector<VBlockType>& localSolution,
int k=1) = 0;
154 void print (std::ostream& s,
int width,
int precision)
157 s.setf(std::ios_base::scientific, std::ios_base::floatfield);
158 int oldprec = s.precision();
159 s.precision(precision);
184 s.precision(oldprec);
185 s.setf(std::ios_base::fixed, std::ios_base::floatfield);
250 Dune::Matrix<MBlockType>
A;
251 std::vector<VBlockType>
b;
266template<
class TypeTag,
int m>
273 using Entity =
typename GridView::template Codim<0>::Entity;
274 enum {n=GridView::dimension};
310 virtual void assemble (
const Entity& e,
int k=1) = 0;
321 virtual void assemble (
const Entity& e,
const Dune::BlockVector<VBlockType>& localSolution,
int k=1)
Definition of boundary condition types, extend if necessary.
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Base class for local assemblers.
Definition: localstiffness.hh:60
virtual ~LocalStiffness()
Definition: localstiffness.hh:74
void print(std::ostream &s, int width, int precision)
Prints contents of local stiffness matrix.
Definition: localstiffness.hh:154
Dune::FieldMatrix< Scalar, m, m > MBlockType
Definition: localstiffness.hh:69
int currentsize()
Gets the current size of the local stiffness matrix.
Definition: localstiffness.hh:243
GetPropType< TypeTag, Properties::BoundaryTypes > BoundaryTypes
Definition: localstiffness.hh:72
std::array< BoundaryConditions::Flags, m > BCBlockType
Definition: localstiffness.hh:71
const VBlockType & rhs(int i) const
Accesses right hand side.
Definition: localstiffness.hh:210
const MBlockType & mat(int i, int j) const
Accesses the local stiffness matrix.
Definition: localstiffness.hh:197
virtual void assembleBoundaryCondition(const Entity &e, int k=1)=0
assemble only boundary conditions for given element and order
void setcurrentsize(int s)
Sets the current size of the local stiffness matrix.
Definition: localstiffness.hh:233
const BoundaryTypes & bc(int i) const
Accesses boundary condition for each dof.
Definition: localstiffness.hh:223
Dune::Matrix< MBlockType > A
Definition: localstiffness.hh:250
Dune::FieldVector< Scalar, m > VBlockType
Definition: localstiffness.hh:70
virtual void assemble(const Entity &e, int k=1)=0
Assembles local stiffness matrix including boundary conditions for given element and order.
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
std::vector< VBlockType > b
Definition: localstiffness.hh:251
std::vector< BoundaryTypes > bctype
Definition: localstiffness.hh:252
Base class for linear local assemblers.
Definition: localstiffness.hh:268
virtual void assemble(const Entity &e, const Dune::BlockVector< VBlockType > &localSolution, int k=1)
Assembles local stiffness matrix including boundary conditions for given element and order.
Definition: localstiffness.hh:321
virtual void assemble(const Entity &e, int k=1)=0
Assembles local stiffness matrix including boundary conditions for given element and order.
virtual ~LinearLocalStiffness()
Definition: localstiffness.hh:286
LinearLocalStiffness()
Definition: localstiffness.hh:283
Base file for properties related to sequential models.