User Documentation Release 5.4.1
Total Page:16
File Type:pdf, Size:1020Kb
User Documentation Release 5.4.1 Yves Renard, Julien Pommier, Konstantinos Poulios Jul 22, 2021 Contents 1 Introduction 1 2 How to install 3 3 Linear algebra procedures5 4 MPI Parallelization of GetFEM 7 4.1 State of progress of GetFEM MPI parallelization.....................8 5 Catch errors 11 6 Build a mesh 13 6.1 Add an element to a mesh................................. 13 6.2 Remove an element from a mesh............................. 15 6.3 Simple structured meshes................................. 15 6.4 Mesh regions........................................ 16 6.5 Methods of the getfem::mesh object......................... 17 6.6 Using dal::bit_vector ................................ 19 6.7 Face numbering...................................... 19 6.8 Save and load meshes................................... 20 7 Build a finite element method on a mesh 23 7.1 First level: manipulating fems on each elements..................... 24 7.2 Examples.......................................... 25 7.3 Second level: the optional “vectorization/tensorization”................. 26 7.4 Third level: the optional linear transformation (or reduction)............... 27 7.5 Obtaining generic mesh_fem’s............................... 28 7.6 The partial_mesh_fem object............................... 28 8 Selecting integration methods 29 8.1 Methods of the mesh_im object.............................. 31 9 Mesh refinement 33 10 Compute arbitrary terms - high-level generic assembly procedures - Generic Weak-Form Language (GWFL) 35 10.1 Overview of GWFL.................................... 35 i 10.2 Some basic examples.................................... 37 10.3 Derivation order and symbolic differentiation....................... 38 10.4 C++ Call of the assembly................................. 39 10.5 C++ assembly examples.................................. 40 10.6 Script languages call of the assembly........................... 43 10.7 The tensors......................................... 43 10.8 The variables........................................ 43 10.9 The constants or data.................................... 44 10.10 Test functions........................................ 44 10.11 Gradient.......................................... 44 10.12 Hessian........................................... 44 10.13 Predefined scalar functions................................. 45 10.14 User defined scalar functions................................ 45 10.15 Derivatives of defined scalar functions........................... 46 10.16 Binary operations...................................... 46 10.17 Unary operators...................................... 47 10.18 Parentheses......................................... 47 10.19 Explicit vectors....................................... 47 10.20 Explicit matrices...................................... 47 10.21 Explicit tensors....................................... 47 10.22 Access to tensor components................................ 48 10.23 Constant expressions.................................... 48 10.24 Special expressions linked to the current position..................... 48 10.25 Print command....................................... 49 10.26 Reshape a tensor...................................... 49 10.27 Trace, Deviator, Sym and Skew operators......................... 49 10.28 Nonlinear operators.................................... 49 10.29 Macro definition...................................... 50 10.30 Explicit Differentiation................................... 51 10.31 Explicit Gradient...................................... 52 10.32 Interpolate transformations................................. 52 10.33 Element extrapolation transformation........................... 54 10.34 Evaluating discontinuities across inter-element edges/faces................ 55 10.35 Double domain integrals or terms (convolution - Kernel - Exchange integrals)...... 56 10.36 Elementary transformations................................ 57 10.37 Xfem discontinuity evaluation (with mesh_fem_level_set)................ 58 10.38 Storage of sub-expressions in a getfem::im_data object during assembly......... 59 11 Compute arbitrary terms - low-level generic assembly procedures (deprecated) 61 11.1 available operations inside the comp command...................... 63 11.2 others operations...................................... 64 12 Some Standard assembly procedures (low-level generic assembly) 65 12.1 Laplacian (Poisson) problem................................ 65 12.2 Linear Elasticity problem................................. 67 12.3 Stokes Problem with mixed finite element method.................... 68 12.4 Assembling a mass matrix................................. 68 13 Interpolation of arbitrary quantities 69 13.1 Basic interpolation..................................... 69 13.2 Interpolation based on the generic weak form language (GWFL)............. 70 ii 14 Incorporate new finite element methods in GetFEM 73 15 Incorporate new approximated integration methods in GetFEM 75 16 Level-sets, Xfem, fictitious domains, Cut-fem 77 16.1 Representation of level-sets................................ 78 16.2 Mesh cut by level-sets................................... 78 16.3 Adapted integration methods................................ 79 16.4 Cut-fem........................................... 80 16.5 Discontinuous field across some level-sets........................ 80 16.6 Xfem............................................ 80 16.7 Post treatment....................................... 81 17 Tools for HHO (Hybrid High-Order) methods 83 17.1 HHO elements....................................... 83 17.2 Reconstruction operators.................................. 84 17.3 Stabilization operators................................... 86 18 Interpolation/projection of a finite element method on non-matching meshes 89 18.1 mixed methods with different meshes........................... 90 18.2 mortar methods....................................... 90 19 Compute L2 and H1 norms 91 20 Compute derivatives 93 21 Export and view a solution 95 21.1 Saving mesh and mesh_fem objects for the Matlab interface............... 95 21.2 Producing mesh slices................................... 96 21.3 Exporting mesh, mesh_fem or slices to VTK/VTU.................... 98 21.4 Exporting mesh, mesh_fem or slices to OpenDX..................... 98 22 A pure convection method 101 23 The model description and basic model bricks 103 23.1 The model object...................................... 103 23.2 The brick object...................................... 106 23.3 How to build a new brick.................................. 107 23.4 How to add the brick to a model.............................. 111 23.5 Generic assembly bricks.................................. 112 23.6 Generic elliptic brick.................................... 113 23.7 Dirichlet condition brick.................................. 114 23.8 Generalized Dirichlet condition brick........................... 116 23.9 Pointwise constraints brick................................. 116 23.10 Source term bricks (and Neumann condition)....................... 117 23.11 Predefined solvers..................................... 118 23.12 Example of a complete Poisson problem......................... 118 23.13 Nitsche’s method for dirichlet and contact boundary conditions............. 120 23.14 Constraint brick...................................... 123 23.15 Other “explicit” bricks................................... 124 23.16 Helmholtz brick...................................... 124 23.17 Fourier-Robin brick.................................... 125 23.18 Isotropic linearized elasticity brick............................ 125 iii 23.19 Linear incompressibility (or nearly incompressibility) brick............... 126 23.20 Mass brick......................................... 127 23.21 Bilaplacian and Kirchhoff-Love plate bricks....................... 128 23.22 Mindlin-Reissner plate model............................... 129 23.23 The model tools for the integration of transient problems................. 131 23.24 Small sliding contact with friction bricks......................... 139 23.25 Large sliding/large deformation contact with friction bricks............... 151 24 Numerical continuation and bifurcation 161 24.1 Numerical continuation.................................. 161 24.2 Detection of limit points.................................. 163 24.3 Numerical bifurcation................................... 164 24.4 Approximation of solution curves of a model....................... 167 25 Finite strain Elasticity bricks 169 25.1 Some recalls on finite strain elasticity........................... 169 25.2 Add an nonlinear elasticity brick to a model........................ 173 25.3 Add a large strain incompressibility brick to a model................... 174 25.4 High-level generic assembly versions........................... 175 26 Small strain plasticity 179 26.1 Theoretical background.................................. 179 26.2 Flow rule integration.................................... 181 26.3 Some classical laws.................................... 184 26.4 Elasto-plasticity bricks................................... 188 27 ALE Support for object having a large rigid body motion 193 27.1 ALE terms for rotating objects............................... 193 27.2 ALE terms for a uniformly translated part of an object.................. 196 28 Appendix A. Finite element method list 199 28.1 Classical PK Lagrange elements on simplices....................... 201 28.2 Classical Lagrange elements on other