# The model description and basic model bricks¶

The model description of *GetFEM* allows
to quickly build some fem applications on complex linear or nonlinear PDE coupled
models. The principle is to propose predefined bricks which can be assembled to
describe a complex situation. A brick can describe either an equation (Poisson
equation, linear elasticity …) or a boundary condition (Dirichlet, Neumann …)
or any relation between two variables. Once a brick is written, it is possible to
use it in very different situations. This allows a reusability of the produced
code and the possibility of a growing library of bricks. An effort has been made in
order to facilitate as much as possible the definition of a new brick. A brick is
mainly defined by its contribution in the tangent linear system to be solved.

This model description is an evolution of the model bricks of previous versions of
*GetFEM*. Compared to the old system, it is more flexible, more general, allows the
coupling of model (multiphysics) in a easier way and facilitates the writing of new
components. It also facilitate the write of time integration schemes for evolving
PDEs.

The kernel of the model description is contained in the file
`getfem/getfem_models.h`

. The two main objects are the model and the brick.

- The model object
`is_complex`

`add_fixed_size_variable`

`add_fixed_size_variable`

`add_fixed_size_data`

`add_fixed_size_data`

`add_initialized_fixed_size_data`

`add_initialized_scalar_data`

`add_fem_variable`

`add_filtered_fem_variable`

`add_fem_data`

`add_initialized_fem_data`

`add_multiplier`

`add_im_variable`

`add_internal_im_variable`

`add_im_data`

`real_variable`

`complex_variable`

`mesh_fem_of_variable`

`real_tangent_matrix`

`complex_tangent_matrix`

`real_rhs`

`complex_rhs`

- The brick object
- How to build a new brick
- How to add the brick to a model
- Generic assembly bricks
- Generic elliptic brick
- Dirichlet condition brick
- Generalized Dirichlet condition brick
- Pointwise constraints brick
- Source term bricks (and Neumann condition)
- Predefined solvers
- Example of a complete Poisson problem
- Nitsche’s method for dirichlet and contact boundary conditions
- Constraint brick
- Other “explicit” bricks
- Helmholtz brick
- Fourier-Robin brick
- Isotropic linearized elasticity brick
- Linear incompressibility (or nearly incompressibility) brick
- Mass brick
- Bilaplacian and Kirchhoff-Love plate bricks
- Mindlin-Reissner plate model
- The model tools for the integration of transient problems
- The implicit theta-method for first-order problems
- Precomputation of velocity/acceleration
- The implicit theta-method for second-order problems
- The implicit Newmark scheme for second order problems
- The implicit Houbolt scheme
- Transient terms
- Computation on the sequence of time steps
- Boundary conditions
- Small example: heat equation
- Implicit/explicit some terms
- Explicit schemes
- Time step adaptation
- Quasi-static problems

- Small sliding contact with friction bricks
- Approximation of contact
- Direct nodal contact condition
- Weak nodal contact condition
- Weak integral contact condition
- Numerical continuation
- Friction law
- Add a contact with or without friction to a model
- Frictionless basic contact brick
- Basic contact brick with friction
- Frictionless nodal contact with a rigid obstacle brick
- Nodal contact with a rigid obstacle brick with friction
- Frictionless nodal contact between non-matching meshes brick
- Nodal contact between non-matching meshes brick with friction
- Hughes stabilized frictionless contact condition
- Frictionless integral contact with a rigid obstacle brick
- Integral contact with a rigid obstacle brick with friction
- Frictionless integral contact between non-matching meshes brick
- Integral contact between non-matching meshes brick with friction
- Frictionless penalized contact with a rigid obstacle brick
- Penalized contact with a rigid obstacle brick with friction
- Frictionless penalized contact between non-matching meshes brick
- Penalized contact between non-matching meshes brick with friction

- Large sliding/large deformation contact with friction bricks