getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Yves Renard
Subject: [Getfem-commits] (no subject)
Date: Tue, 27 Aug 2019 14:37:04 -0400 (EDT)

branch: master
commit e920df7f9f5969f3b147fa0e61c325394fb4e208
Merge: ea2609c 41d588b
Author: Yves Renard <address@hidden>
Date:   Tue Aug 27 20:36:36 2019 +0200

    minor fixes

 doc/sphinx/source/about.rst                        |   4 +-
 doc/sphinx/source/biblio.rst                       |  24 +--
 doc/sphinx/source/bugs.rst                         |  12 +-
 doc/sphinx/source/copyright.rst                    |   2 +-
 doc/sphinx/source/glossary.rst                     |   6 +-
 doc/sphinx/source/gmm/blas.rst                     |  10 +-
 doc/sphinx/source/gmm/blas_interface.rst           | 179 ++++++++++----------
 doc/sphinx/source/gmm/catch.rst                    |  16 +-
 doc/sphinx/source/gmm/denseqr.rst                  |   8 +-
 doc/sphinx/source/gmm/first-step.rst               |   8 +-
 doc/sphinx/source/gmm/index.rst                    |   2 +-
 doc/sphinx/source/gmm/inside.rst                   |  56 +++----
 doc/sphinx/source/gmm/install.rst                  |   4 +-
 doc/sphinx/source/gmm/iter.rst                     |  22 +--
 doc/sphinx/source/gmm/matrix.rst                   |   6 +-
 doc/sphinx/source/gmm/noverif.rst                  |   2 +-
 doc/sphinx/source/gmm/sub-matrix.rst               |   8 +-
 doc/sphinx/source/gmm/triangular.rst               |   2 +-
 doc/sphinx/source/install/install_linux.rst        |   2 +-
 doc/sphinx/source/install/install_mac.rst          |   4 +-
 doc/sphinx/source/install/install_windows.rst      |  12 +-
 doc/sphinx/source/links.rst                        |  10 +-
 doc/sphinx/source/lists.rst                        |   2 +-
 doc/sphinx/source/matlab/examples.rst              | 142 ++++++++--------
 doc/sphinx/source/matlab/install.rst               |   2 +-
 doc/sphinx/source/matlab/mlabgf.rst                |   4 +-
 doc/sphinx/source/matlab/oocmd.rst                 |   2 +-
 doc/sphinx/source/matlab/plotcmdref.rst            |  46 ++---
 doc/sphinx/source/project/appendixA.rst            |   2 +-
 doc/sphinx/source/project/contribute.rst           |   4 +-
 doc/sphinx/source/project/femdesc.rst              |  34 ++--
 doc/sphinx/source/project/intro.rst                |  20 +--
 doc/sphinx/source/project/libdesc.rst              |   2 +-
 doc/sphinx/source/project/libdesc_cont.rst         |   6 +-
 doc/sphinx/source/project/libdesc_dal.rst          |   2 +-
 doc/sphinx/source/project/libdesc_event.rst        |   4 +-
 doc/sphinx/source/project/libdesc_fem.rst          |   4 +-
 .../source/project/libdesc_high_gen_assemb.rst     |  18 +-
 doc/sphinx/source/project/libdesc_im.rst           |   6 +-
 doc/sphinx/source/project/libdesc_interface.rst    |  86 +++++-----
 doc/sphinx/source/project/libdesc_levelset.rst     |   4 +-
 .../source/project/libdesc_low_gen_assemb.rst      |  10 +-
 doc/sphinx/source/project/libdesc_mesh.rst         |   2 +-
 doc/sphinx/source/project/libdesc_model.rst        |  10 +-
 doc/sphinx/source/python/examples.rst              | 186 ++++++++++-----------
 doc/sphinx/source/python/howtos.rst                |   2 +-
 doc/sphinx/source/python/intro.rst                 |   6 +-
 doc/sphinx/source/scilab/install.rst               |   2 +-
 doc/sphinx/source/scilab/intro.rst                 |   6 +-
 doc/sphinx/source/scilab/plotcmdref.rst            |  46 ++---
 doc/sphinx/source/scilab/scilabgf.rst              |   4 +-
 doc/sphinx/source/screenshots/shots.rst            |  92 +++++-----
 doc/sphinx/source/tutorial/basic_usage.rst         |   4 +-
 doc/sphinx/source/tutorial/install.rst             |   6 +-
 doc/sphinx/source/tutorial/thermo_coupling.rst     | 110 ++++++------
 doc/sphinx/source/tutorial/wheel.rst               |  14 +-
 doc/sphinx/source/userdoc/appendixA.rst            |  10 +-
 doc/sphinx/source/userdoc/appendixB.rst            |   6 +-
 doc/sphinx/source/userdoc/bfem.rst                 |   2 +-
 doc/sphinx/source/userdoc/bmesh.rst                |   8 +-
 doc/sphinx/source/userdoc/computeL2H1.rst          |   2 +-
 doc/sphinx/source/userdoc/convect.rst              |  20 +--
 doc/sphinx/source/userdoc/gasm_high.rst            |  88 +++++-----
 doc/sphinx/source/userdoc/gasm_low.rst             |   2 +-
 doc/sphinx/source/userdoc/hho.rst                  |   2 +-
 doc/sphinx/source/userdoc/index.rst                |   2 +-
 doc/sphinx/source/userdoc/interMM.rst              |  16 +-
 doc/sphinx/source/userdoc/intro.rst                |   2 +-
 doc/sphinx/source/userdoc/model.rst                |   4 +-
 doc/sphinx/source/userdoc/model_ALE_rotating.rst   |  16 +-
 doc/sphinx/source/userdoc/model_Nitsche.rst        |  28 ++--
 doc/sphinx/source/userdoc/model_bilaplacian.rst    |   6 +-
 .../source/userdoc/model_contact_friction.rst      |  22 +--
 .../model_contact_friction_large_sliding.rst       |  24 +--
 doc/sphinx/source/userdoc/model_continuation.rst   |  18 +-
 doc/sphinx/source/userdoc/model_dirichlet.rst      |  10 +-
 .../source/userdoc/model_generic_assembly.rst      |   6 +-
 .../source/userdoc/model_nonlinear_elasticity.rst  |   8 +-
 doc/sphinx/source/userdoc/model_object.rst         |  48 +++---
 .../userdoc/model_plasticity_small_strain.rst      |  20 +--
 .../source/userdoc/model_time_integration.rst      |  32 ++--
 doc/sphinx/source/userdoc/parallel.rst             |  10 +-
 doc/sphinx/source/userdoc/rmesh.rst                |  12 +-
 doc/sphinx/source/userdoc/xfem.rst                 |   2 +-
 doc/sphinx/source/whatsnew/1.7.rst                 |   6 +-
 doc/sphinx/source/whatsnew/2.0.rst                 |   2 +-
 doc/sphinx/source/whatsnew/3.0.rst                 |   2 +-
 doc/sphinx/source/whatsnew/4.0.rst                 |   2 +-
 doc/sphinx/source/whatsnew/4.1.1.rst               |   2 +-
 doc/sphinx/source/whatsnew/4.1.rst                 |   2 +-
 doc/sphinx/source/whatsnew/4.2.rst                 |  10 +-
 doc/sphinx/source/whatsnew/4.3.rst                 |   6 +-
 doc/sphinx/source/whatsnew/5.0.rst                 |   2 +-
 doc/sphinx/source/whatsnew/5.1.rst                 |   2 +-
 doc/sphinx/source/whatsnew/5.3.rst                 |   2 +-
 interface/tests/python/demo_elasticity_HHO.py      |  17 +-
 96 files changed, 880 insertions(+), 890 deletions(-)

diff --cc doc/sphinx/source/biblio.rst
index bf9c8fd,0b8831f..d842d9b
--- a/doc/sphinx/source/biblio.rst
+++ b/doc/sphinx/source/biblio.rst
@@@ -43,15 -35,11 +43,15 @@@ Reference
     *Mixed-interpolated element for Reissner-Mindlin plates*. Internat. J. 
Numer. Methods Engrg., 28, 1787-1801, 1989.
  
  .. [bu-ha2010] E. Burman, P. Hansbo.
-    *Fictitious domain finite element methods using cut elements: I. A 
stabilized Lagrange multiplier method*. Computer Methods in Applied Mechanics, 
199:41-44, 2680-2686, 2010. 
+    *Fictitious domain finite element methods using cut elements: I. A 
stabilized Lagrange multiplier method*. Computer Methods in Applied Mechanics, 
199:41-44, 2680-2686, 2010.
  
  .. [ca-re-so1994] D. Calvetti, L. Reichel and D.C. Sorensen.
-    *An implicitely restarted Lanczos method for large symmetric eigenvalue 
problems*. Electronic Transaction on Numerical Analysis}. 2:1-21, 1994.
+    *An implicitly restarted Lanczos method for large symmetric eigenvalue 
problems*. Electronic Transaction on Numerical Analysis}. 2:1-21, 1994.
  
 +.. [ca-ch-er2019] K. Cascavita, F. Chouly and A. Ern
 +   *Hybrid High-Order discretizations combined with Nitsche's method for 
Dirichlet and Signorini boundary conditions*.
 +   hal-02016378v2, 2019
 +   
  .. [CH-LA-RE2008] E. Chahine, P. Laborde, Y. Renard.
     *Crack-tip enrichment in the Xfem method using a cut-off function*. Int. 
J. Numer. Meth. Engng., 75(6):629-646, 2008.
  
diff --cc doc/sphinx/source/gmm/blas_interface.rst
index 3c40ec1,f391821..bbdbdb7
--- a/doc/sphinx/source/gmm/blas_interface.rst
+++ b/doc/sphinx/source/gmm/blas_interface.rst
@@@ -35,99 -35,99 +35,98 @@@ Ask your system administrator if this c
  
  The following operations are interfaced::
  
-   vect_norm2(std::vector<T> v);                                           
-                                                                         
-   vect_sp(std::vector<T>, std::vector<T>);                              
-   vect_sp(scaled(std::vector<T>), std::vector<T>);                       
-   vect_sp(std::vector<T>, scaled(std::vector<T>));                       
-   vect_sp(scaled(std::vector<T>), scaled(std::vector<T>));               
-                                                                         
-   vect_hp(std::vector<T>, std::vector<T>);                            
-   vect_hp(scaled(std::vector<T>), std::vector<T>);                      
-   vect_hp(std::vector<T>, scaled(std::vector<T>));                     
-   vect_hp(scaled(std::vector<T>), scaled(std::vector<T>));              
-                                                                         
-   add(std::vector<T>, std::vector<T>);                                 
-   add(scaled(std::vector<T>, a), std::vector<T>);                        
- 
-   mult(dense_matrix<T>, dense_matrix<T>, dense_matrix<T>);             
-   mult(transposed(dense_matrix<T>), dense_matrix<T>, dense_matrix<T>); 
-   mult(dense_matrix<T>, transposed(dense_matrix<T>), dense_matrix<T>); 
-   mult(transposed(dense_matrix<T>), transposed(dense_matrix<T>),        
-        dense_matrix<T>);                                     
-   mult(conjugated(dense_matrix<T>), dense_matrix<T>, dense_matrix<T>); 
-   mult(dense_matrix<T>, conjugated(dense_matrix<T>), dense_matrix<T>); 
-   mult(conjugated(dense_matrix<T>), conjugated(dense_matrix<T>),        
-        dense_matrix<T>);
-                                                                         
-   mult(dense_matrix<T>, std::vector<T>, std::vector<T>);                
-   mult(transposed(dense_matrix<T>), std::vector<T>, std::vector<T>);
-   mult(conjugated(dense_matrix<T>), std::vector<T>, std::vector<T>);
-   mult(dense_matrix<T>, scaled(std::vector<T>), std::vector<T>);
-   mult(transposed(dense_matrix<T>), scaled(std::vector<T>),             
-        std::vector<T>);            
-   mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),             
-        std::vector<T>);
- 
-   mult_add(dense_matrix<T>, std::vector<T>, std::vector<T>);       
-   mult_add(transposed(dense_matrix<T>), std::vector<T>, std::vector<T>);
-   mult_add(conjugated(dense_matrix<T>), std::vector<T>, std::vector<T>);
-   mult_add(dense_matrix<T>, scaled(std::vector<T>), std::vector<T>);
-   mult_add(transposed(dense_matrix<T>), scaled(std::vector<T>),         
-            std::vector<T>);                                    
-   mult_add(conjugated(dense_matrix<T>), scaled(std::vector<T>),         
-            std::vector<T>);                                      
-                                                                         
-   mult(dense_matrix<T>, std::vector<T>, std::vector<T>, std::vector<T>);
-   mult(transposed(dense_matrix<T>), std::vector<T>, std::vector<T>,     
-        std::vector<T>);                                               
-   mult(conjugated(dense_matrix<T>), std::vector<T>, std::vector<T>,     
-        std::vector<T>);                                             
-   mult(dense_matrix<T>, scaled(std::vector<T>), std::vector<T>,         
-        std::vector<T>);                                          
-   mult(transposed(dense_matrix<T>), scaled(std::vector<T>),             
-        std::vector<T>, std::vector<T>);                               
-   mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),             
-        std::vector<T>, std::vector<T>);            
-   mult(dense_matrix<T>, std::vector<T>, scaled(std::vector<T>),         
-        std::vector<T>);                                 
-   mult(transposed(dense_matrix<T>), std::vector<T>,                     
-        scaled(std::vector<T>), std::vector<T>);
-   mult(conjugated(dense_matrix<T>), std::vector<T>,                     
-        scaled(std::vector<T>), std::vector<T>);
-   mult(dense_matrix<T>, scaled(std::vector<T>), scaled(std::vector<T>), 
-     std::vector<T>);
-   mult(transposed(dense_matrix<T>), scaled(std::vector<T>),             
-        scaled(std::vector<T>), std::vector<T>);      
-   mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),             
-        scaled(std::vector<T>), std::vector<T>);
-                                                                         
-   lower_tri_solve(dense_matrix<T>, std::vector<T>, k, b);          
-   upper_tri_solve(dense_matrix<T>, std::vector<T>, k, b);
-   lower_tri_solve(transposed(dense_matrix<T>), std::vector<T>, k, b);
-   upper_tri_solve(transposed(dense_matrix<T>), std::vector<T>, k, b);
-   lower_tri_solve(conjugated(dense_matrix<T>), std::vector<T>, k, b);
-   upper_tri_solve(conjugated(dense_matrix<T>), std::vector<T>, k, b);
-                                                                         
-   lu_factor(dense_matrix<T>, std::vector<int>);            
-   lu_solve(dense_matrix<T>, std::vector<T>, std::vector<T>)             
-   lu_solve(dense_matrix<T>, std::vector<int>, std::vector<T>,           
-            std::vector<T>);
+   vect_norm2(std::vector<T>)
+ 
+   vect_sp(std::vector<T>, std::vector<T>)
+   vect_sp(scaled(std::vector<T>), std::vector<T>)
+   vect_sp(std::vector<T>, scaled(std::vector<T>))
+   vect_sp(scaled(std::vector<T>), scaled(std::vector<T>))
+ 
+   vect_hp(std::vector<T>, std::vector<T>)
+   vect_hp(scaled(std::vector<T>), std::vector<T>)
+   vect_hp(std::vector<T>, scaled(std::vector<T>))
+   vect_hp(scaled(std::vector<T>), scaled(std::vector<T>))
+ 
+   add(std::vector<T>, std::vector<T>)
+   add(scaled(std::vector<T>, a), std::vector<T>)
+ 
+   mult(dense_matrix<T>, dense_matrix<T>, dense_matrix<T>)
+   mult(transposed(dense_matrix<T>), dense_matrix<T>, dense_matrix<T>)
+   mult(dense_matrix<T>, transposed(dense_matrix<T>), dense_matrix<T>)
+   mult(transposed(dense_matrix<T>), transposed(dense_matrix<T>),
+        dense_matrix<T>)
+   mult(conjugated(dense_matrix<T>), dense_matrix<T>, dense_matrix<T>)
+   mult(dense_matrix<T>, conjugated(dense_matrix<T>), dense_matrix<T>)
+   mult(conjugated(dense_matrix<T>), conjugated(dense_matrix<T>),
+        dense_matrix<T>)
+ 
+   mult(dense_matrix<T>, std::vector<T>, std::vector<T>)
+   mult(transposed(dense_matrix<T>), std::vector<T>, std::vector<T>)
+   mult(conjugated(dense_matrix<T>), std::vector<T>, std::vector<T>)
+   mult(dense_matrix<T>, scaled(std::vector<T>), std::vector<T>)
+   mult(transposed(dense_matrix<T>), scaled(std::vector<T>),
+        std::vector<T>)
+   mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),
+        std::vector<T>)
+ 
+   mult_add(dense_matrix<T>, std::vector<T>, std::vector<T>)
+   mult_add(transposed(dense_matrix<T>), std::vector<T>, std::vector<T>)
+   mult_add(conjugated(dense_matrix<T>), std::vector<T>, std::vector<T>)
+   mult_add(dense_matrix<T>, scaled(std::vector<T>), std::vector<T>)
+   mult_add(transposed(dense_matrix<T>), scaled(std::vector<T>),
+            std::vector<T>)
+   mult_add(conjugated(dense_matrix<T>), scaled(std::vector<T>),
+            std::vector<T>)
+ 
+   mult(dense_matrix<T>, std::vector<T>, std::vector<T>, std::vector<T>)
+   mult(transposed(dense_matrix<T>), std::vector<T>, std::vector<T>,
+        std::vector<T>)
+   mult(conjugated(dense_matrix<T>), std::vector<T>, std::vector<T>,
+        std::vector<T>)
+   mult(dense_matrix<T>, scaled(std::vector<T>), std::vector<T>,
+        std::vector<T>)
+   mult(transposed(dense_matrix<T>), scaled(std::vector<T>),
+        std::vector<T>, std::vector<T>)
+   mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),
+        std::vector<T>, std::vector<T>)
+   mult(dense_matrix<T>, std::vector<T>, scaled(std::vector<T>),
+        std::vector<T>)
+   mult(transposed(dense_matrix<T>), std::vector<T>,
+        scaled(std::vector<T>), std::vector<T>)
+   mult(conjugated(dense_matrix<T>), std::vector<T>,
+        scaled(std::vector<T>), std::vector<T>)
+   mult(dense_matrix<T>, scaled(std::vector<T>), scaled(std::vector<T>),
+     std::vector<T>)
+   mult(transposed(dense_matrix<T>), scaled(std::vector<T>),
+        scaled(std::vector<T>), std::vector<T>)
+   mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),
+        scaled(std::vector<T>), std::vector<T>)
+ 
+   lower_tri_solve(dense_matrix<T>, std::vector<T>, k, b)
+   upper_tri_solve(dense_matrix<T>, std::vector<T>, k, b)
+   lower_tri_solve(transposed(dense_matrix<T>), std::vector<T>, k, b)
+   upper_tri_solve(transposed(dense_matrix<T>), std::vector<T>, k, b)
+   lower_tri_solve(conjugated(dense_matrix<T>), std::vector<T>, k, b)
+   upper_tri_solve(conjugated(dense_matrix<T>), std::vector<T>, k, b)
+ 
+   lu_factor(dense_matrix<T>, std::vector<int>)
+   lu_solve(dense_matrix<T>, std::vector<T>, std::vector<T>)
+   lu_solve(dense_matrix<T>, std::vector<int>, std::vector<T>,
+            std::vector<T>)
    lu_solve_transposed(dense_matrix<T>, std::vector<int>, std::vector<T>,
-                       std::vector<T>);
-   lu_inverse(dense_matrix<T>);                        
-   lu_inverse(dense_matrix<T>, std::vector<int>, dense_matrix<T>);
-                                                                         
-   qr_factor(dense_matrix<T>, dense_matrix<T>, dense_matrix<T>);
+            std::vector<T>)
+   lu_inverse(dense_matrix<T>)
+   lu_inverse(dense_matrix<T>, std::vector<int>, dense_matrix<T>)
  
-   implicit_qr_algorithm(dense_matrix<T>, std::vector<T>);
+   qr_factor(dense_matrix<T>, dense_matrix<T>, dense_matrix<T>)
+ 
+   implicit_qr_algorithm(dense_matrix<T>, std::vector<T>)
    implicit_qr_algorithm(dense_matrix<T>, std::vector<T>,
-                         dense_matrix<T>);    
-   implicit_qr_algorithm(dense_matrix<T>, std::vector<std::complex<T> >);
+                         dense_matrix<T>)
+   implicit_qr_algorithm(dense_matrix<T>, std::vector<std::complex<T> >)
    implicit_qr_algorithm(dense_matrix<T>, std::vector<std::complex<T> >,
-                         dense_matrix<T>);      
- 
+                         dense_matrix<T>)
  
 -
  Of course, it is not difficult to interface another operation if needed.
  
  The following interface does not correspond to an algorithm existing in |gmm|:
diff --cc doc/sphinx/source/userdoc/gasm_high.rst
index d8968f1,39e82bf..be8f598
--- a/doc/sphinx/source/userdoc/gasm_high.rst
+++ b/doc/sphinx/source/userdoc/gasm_high.rst
@@@ -70,7 -70,7 +70,7 @@@ A specific weak form language has been 
  
    - ``Interpolate(variable, transformation)``: Powerful operation which 
allows to interpolate the variables, or test functions either on the same mesh 
on other elements or on another mesh. ``transformation`` is an object stored by 
the workspace or model object which describes the map from the current point to 
the point where to perform the interpolation. This functionality can be used 
for instance to prescribe periodic conditions or to compute mortar matrices for 
two finite element spac [...]
  
-   - ``Elementary_transformation(variable, transformation, dest)``: Allow a 
linear tranformation defined at the element level (i.e. not possible to define 
at the gauss point level). This feature has been added mostly for defining a 
reduction for plate elements (projection onto low-level vector element such as 
rotated RT0). ``transformation`` is an object stored by the workspace or model 
object which describes the trasformation for a particular element. ``dest`` is 
an optional argument re [...]
 -  - ``Elementary_transformation(variable, transformation)``: Allow a linear 
transformation defined at the element level (i.e. not possible to define at the 
gauss point level). This feature has been added mostly for defining a reduction 
for plate elements (projection onto low-level vector element such as rotated 
RT0). ``transformation`` is an object stored by the workspace or model object 
which describes the trasformation for a particular element.
++  - ``Elementary_transformation(variable, transformation, dest)``: Allow a 
linear transformation defined at the element level (i.e. not possible to define 
at the gauss point level). This feature has been added mostly for defining a 
reduction for plate elements (projection onto low-level vector element such as 
rotated RT0). ``transformation`` is an object stored by the workspace or model 
object which describes the trasformation for a particular element. ``dest`` is 
an optional argument r [...]
  
    - Possibility of integration on the direct product of two-domains for 
double integral computation or coupling of two variables with a Kernel / 
convolution / exchange integral. This allows terms like 
:math:`\displaystyle\int_{\Omega_1}\int_{\Omega_2}k(x,y)u(x)v(y)dydx` with 
:math:`\Omega_1` and :math:`\Omega_2` two domains, different or not, having 
their own meshes, integration methods and with :math:`u` a variable defined on 
:math:`\Omega_1` and :math:`v` a variable defined on :math:` [...]
  
@@@ -791,14 -789,14 +789,14 @@@ A specific transformation (see previou
    add_element_extrapolation_transformation
    (workspace, transname, my_mesh, std::map<size_type, size_type> &elt_corr);
  
- The map elt_corr should contain the correspondances between the elements 
where the transformation is to be applied and the respective elements where the 
extrapolation has to be made. On the element not listed in the map, no 
transformation is applied and the evaluation is performed normally on the 
current element.
-   
- The following functions allow to change the element correspondance of a 
previously added element extrapolation transformation::
+ The map elt_corr should contain the correspondences between the elements 
where the transformation is to be applied and the respective elements where the 
extrapolation has to be made. On the element not listed in the map, no 
transformation is applied and the evaluation is performed normally on the 
current element.
+ 
+ The following functions allow to change the element correspondence of a 
previously added element extrapolation transformation::
  
 -  set_element_extrapolation_correspondance
 +  set_element_extrapolation_correspondence
    (model, transname, std::map<size_type, size_type> &elt_corr);
 -
 -  set_element_extrapolation_correspondance
 +  
 +  set_element_extrapolation_correspondence
    (workspace, transname, std::map<size_type, size_type> &elt_corr);
  
  
diff --cc doc/sphinx/source/userdoc/hho.rst
index 42e47e9,0000000..758d313
mode 100644,000000..100644
--- a/doc/sphinx/source/userdoc/hho.rst
+++ b/doc/sphinx/source/userdoc/hho.rst
@@@ -1,157 -1,0 +1,157 @@@
 +.. $Id$
 +
 +.. include:: ../replaces.txt
 +
 +.. highlightlang:: python
 +
 +.. _ud-hho:
 +
 +Tools for HHO (Hybrid High-Order) methods
 +=========================================
 +
 +
 +
 +HHO method are hybrid methods in the sense that they have both degrees of 
freedom located on the element of a mesh and on the faces of the elements which 
represent separated approximations. HHO method are primal methods in the sense 
that both the degree of freedom in the element and on the faces represent the 
main unknown of the problem (no lagrange multipliers is introduced). The 
interest of these methods, first developped in  [Di-Er2015]_, [Di-Er2017]_ is 
their accuracy and their grea [...]
 +
- HHO methods can be applied to arbitrary shape elements. However, the 
implementation in |gf| is for the moment limited to standard elements : 
simplices, quadrilaterals, hexahedrons, ... Moreover this implementation is 
still experimental and not pretending to optimality.
++HHO methods can be applied to arbitrary shape elements. However, the 
implementation in |gf| is for the moment limited to standard elements : 
simplices, quadrilaterals, hexahedrons, ... Moreover this implementation is 
still experimental and not pretending to optimality. For the moment, no tool to 
make an auyomatic condensation of internal node is proposed and te method wotk 
only for simplices.
 +
 +HHO elements
 +------------
 +
 +HHO elements are composite ones having a polynomial approximation space for 
the interior of the element and a polynomial approximation for each face of the 
element. Moreover, this is a discontinous approximation, in the sens that no 
continuity is prescribed between the approximation inside the element and the 
approximation on the faces, neither than between the approximations on two 
different faces of the element. However, when two neighbour elements share a 
face, the approximation on t [...]
 +
 +  getfem::pfem pf = getfem::fem_descriptor("HHO(FEM_SIMPLEX_IPK(2,2), 
FEM_SIMPLEX_CIPK(1,2))");
 +
 +The first argument to ``FEM_HHO(...)`` is the fem for the interior of the 
element. It has to be a discontinuous FEM. The method ``FEM_SIMPLEX_IPK(2,2)`` 
is a discontinous method having its degrees of freedom in the strict interior 
of the element, which ensure that no dof identification will be done. The 
second argument is the fem for the faces (if only one method is given, it will 
be applied to all faces, but it is also possible to give a different method for 
each face). Their is no ver [...]
 +
 +For the moment, the fursnished element for interior and faces are
 +- ``FEM_SIMPLEX_IPK(n,k)`` : interior PK element of degree k for the 
simplices in dimension n (equivalent to ``FEM_PK_DISCONTINUOUS(n,k,0.1)``).
 +- ``FEM_QUAD_IPK(n,k)`` : interior PK element of degree k for the 
quadrilaterals in dimension n.
 +- ``FEM_PRISM_IPK(n,k)`` : interior PK element of degree k for the prisms in 
dimension n.
 +- ``FEM_SIMPLEX_CIPK(n,k)`` : interior PK element on simplices which is 
additionnaly connectable. Designed to be use on HHO element face. 
 +- ``FEM_QUAD_CIPK(k)`` : interior PK element on a quadrilateral which is 
additionnaly connectable. Designed to be use on HHO element face. 
 +
 +Reconstruction operators
 +------------------------
 +
 +For a variable ``u``, we will note :math:`u_{T}` its value in the interior of 
the element :math:`T` and :math:`u_{\partial T}` its value on the boundary of 
:math:`T` (corresponding to the two different approximations). The 
reconstruction operators are implemeted in |gf| as elementary transformations, 
as described in the section :ref:`ud-gasm-high-elem-trans`.
 +
 +Reconstructed gradient
 +++++++++++++++++++++++
 +
 +The first reconstruction operator is the reconstructed gradient. Given a 
certain polynomial space :math:`V_G`, the reconstructed gradient :math:`G(u)` 
will be the solution to the local problem
 +
 +.. math::
 +   \int_T G(u):\tau dx = \int_T \nabla u_T : \tau dx + \int_{\partial T} 
(u_{\partial T} - u_{T}).(\tau n_T) d\Gamma, ~~~ \forall \tau \in V_G
 +
 +where :math:`n_T` is the outward unit normal to  :math:`T` on  
:math:`\partial T`. Note that the space :math:`V` is a vector-valued one if 
``u`` is a scalar field variable (in that case, :math:`G(u):\tau` reduces to 
:math:`G(u).\tau`) and a matrix-valued one if ``u`` is a vector field variable.
 +
 +In order to be used, the elementary transformation corresponding to this 
operator has first to be added to the model by the command:: 
 +
 +  add_HHO_reconstructed_gradient(model, transname);
 +
 +where ``transname`` is an arbitrary name which will designate the 
transformation in the weak form language. Then, it will be possible to refer to 
the reconstructed gradient of a variable ``u`` into the weak form language as 
``Elementary_transformation(u, HHO_grad, Gu)``, if ``transname="HHO_grad"``. 
The third parameter of the transformation ``Gu`` should be a fem variable or a 
data of the model. This variable will not be used on itself but will determine 
the finite element space of the  [...]
 +
 +This is an example of use with the Python interface for a two-dimensional 
triangule mesh ``m`` ::
 +
 +  mfu   = gf.MeshFem(m, 1)
 +  mfgu  = gf.MeshFem(m, N)
 +  mfu.set_fem(gf.Fem('FEM_HHO(FEM_SIMPLEX_IPK(2,2),FEM_SIMPLEX_CIPK(1,2))'))
 +  mfgu.set_fem(gf.Fem('FEM_PK(2,2)'))
 +
 +  md = gf.Model('real')
 +  md.add_fem_variable('u', mfu)
 +  md.add_fem_data('Gu', mfgu)
 +
 +  md.add_HHO_reconstructed_gradient('HHO_Grad')
 +  md.add_macro('HHO_Grad_u', 'Elementary_transformation(u, HHO_Grad, Gu)')
 +  md.add_macro('HHO_Grad_Test_u', 'Elementary_transformation(Test_u, 
HHO_Grad, Gu)')
 +
 +The macro definitions allowing to use the gradient of the variable inside 
weak formulations as usual. For instance, the addition of a weak term for the 
Laplace equation can then be simply written::
 +
 +  md.add_linear_term(mim, 'HHO_Grad_u.HHO_Grad_Test_u')
 +
 +Two complete examples of use are given in the test programs 
:file:`interface/tests/demo_laplacian_HHO.py` and 
:file:`interface/tests/demo_elasticity_HHO.py`.
 +
 +Reconstructed symmetrized gradient
 +++++++++++++++++++++++++++++++++++
 +
 +The symmetrized gradient is only for vector field variables and additionally 
when the vector field dimension is the same as the domain dimension. This is 
usually the case for instance for elasticity problems. With the same notation 
as in the previous section, the reconstructed gradient :math:`G^s(u)` will be 
the solution to the local problem
 +
 +.. math::
 +   \int_T G^s(u):\tau dx = \int_T \nabla^s u_T : \tau dx + \int_{\partial T} 
(u_{\partial T} - u_{T}).(\tau^s n_T) d\Gamma, ~~~ \forall \tau \in V_G
 +
 +where :math:`\nabla^s u_T = (\nabla u_T + (\nabla u_T)^T)/2` and 
:math:`\tau^s = (\tau + \tau^T)/2`.
 +
 +The elementary transformation corresponding to this operator can be added to 
the model by the command:: 
 +
 +  add_HHO_reconstructed_symmetrized_gradient(model, transname);
 +
 +and then be used into the weak form language as 
``Elementary_transformation(u, HHO_sym_grad, Gu)``, if 
``transname="HHO_sym_grad"``, with ``Gu`` still determining the reconstruction 
space.
 +
 +Reconstructed variable
 +++++++++++++++++++++++
 +
 +A recontruction of higher order can be done using both the approximation on 
the interior and the approximation on the faces. The recontructed variable 
:math:`D(u)` will be the solution to the local Neumann problem on a chosen 
space :math:`V_D`
 +
 +.. math::
 +   \int_T \nabla D(u). \nabla v dx = \int_T \nabla u_T . \nabla v dx + 
\int_{\partial T} (u_{\partial T} - u_{T}).(\nabla v n_T) d\Gamma, ~~~ \forall 
v \in V_D
 +
 +with the additional constraint
 +
 +.. math::
 +
 +   \int_T D(u) dx = \int_T u_T dx
 +
 +The corresponding elementary transformation can be added to the model by the 
command:: 
 +
 +  add_HHO_reconstructed_value(model, transname);
 +
 +and used into the weak form language as ``Elementary_transformation(u, 
HHO_val, ud)``, if ``transname="HHO_val"``, with ``ud`` determining the 
reconstruction space.
 +
 +Reconstructed variable with symmetrized gradient
 +++++++++++++++++++++++++++++++++++++++++++++++++
 +
 +A variant of the recontruction of a variable is the one using a symmetrized 
gradient. It can be used only for vector field variables and additionally when 
the vector field dimension is the same as the domain dimension. The 
recontructed variable :math:`D(u)` will be the solution to the local Neumann 
problem on a chosen space :math:`V_D`
 +
 +.. math::
 +   \int_T \nabla^s D(u). \nabla^s v dx = \int_T \nabla^s u_T . \nabla^s v dx 
+ \int_{\partial T} (u_{\partial T} - u_{T}).(\nabla^s v n_T) d\Gamma, ~~~ 
\forall v \in V_D
 +
 +with the additional constraints
 +
 +.. math::
 +
 +  & \int_T D(u) dx = \int_T u_T dx
 +   
 +   &\int_T \mbox{Skew}(\nabla D(u)) dx = \int_{\partial T} (n_T \otimes 
u_{\partial T} - u_{\partial T} \otimes n_T)/2 d\Gamma
 +
 +where :math:`\mbox{Skew}(\nabla D(u)) = (\nabla D(u) - (\nabla D(u))^T)/2`.
 +
 +The corresponding elementary transformation can be added to the model by the 
command:: 
 +
 +  add_HHO_reconstructed_value(model, transname);
 +
 +and used into the weak form language as ``Elementary_transformation(u, 
HHO_val, ud)``, if ``transname="HHO_val"``, with ``ud`` determining the 
reconstruction space.
 +
 +
 +Stabilization operators
 +-----------------------
 +
 +The stabilization operators is an operator that measure in a sense the 
discontinuity of the approximation. A stabilization is obtained by a 
penalization term using this operator. The stabilization operator :math:`S(u)` 
is defined on the boundary space :math:`V_{\partial T}` of the element, with 
the formula
 +
 +.. math::
 +   S(u) = \Pi_{\partial T}(u_{\partial T} - D(u) - \Pi_{T}(u_T - D(u)))
 +
 +where :math:`D(u)` is the reconstruction operator on a polynomial space one 
degree higher that the finite element space used for the variable, 
:math:`\Pi_{\partial T}` is the :math:`L^2` projection onto the space of the 
face approximations and  :math:`\Pi_{T}` the :math:`L^2` projection onto the 
space of the interior of the element.
 +
 +For vector field variables having the same dimension as the domain, there 
exists also a stabilization operator using the symmetrized gradient, which is 
defined by
 +
 +.. math::
 +   S^s(u) = \Pi_{\partial T}(u_{\partial T} - D^s(u) - \Pi_{T}(u_T - D^s(u)))
 +
 +The corresponding elementary transformations can be added to the model by the 
two commands::
 +  
 +  add_HHO_stabilization(model, transname);
 +  add_HHO_symmetrized_stabilization(model, transname);
 +
 +and used into the weak form language as ``Elementary_transformation(u, 
HHO_stab)``, if ``transname="HHO_stab"``. A third argument is optional to 
specify the target (HHO) space (the default is one of the variable itself). An 
example of use is also given in the test programs 
:file:`interface/tests/demo_laplacian_HHO.py` and 
:file:`interface/tests/demo_elasticity_HHO.py`.
diff --cc interface/tests/python/demo_elasticity_HHO.py
index fbaae48,0000000..436253b
mode 100644,000000..100644
--- a/interface/tests/python/demo_elasticity_HHO.py
+++ b/interface/tests/python/demo_elasticity_HHO.py
@@@ -1,204 -1,0 +1,207 @@@
 +#!/usr/bin/env python
 +# -*- coding: utf-8 -*-
 +# Python GetFEM++ interface
 +#
 +# Copyright (C) 2019-2019 Yves Renard.
 +#
 +# This file is a part of GetFEM++
 +#
 +# GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
 +# under  the  terms  of the  GNU  Lesser General Public License as published
 +# by  the  Free Software Foundation;  either version 2.1 of the License,  or
 +# (at your option) any later version.
 +# This program  is  distributed  in  the  hope  that it will be useful,  but
 +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 +# or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 +# License for more details.
 +# You  should  have received a copy of the GNU Lesser General Public License
 +# along  with  this program;  if not, write to the Free Software Foundation,
 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
 +#
 +############################################################################
 +"""  2D elasticity problem using HHO methods.
 +
 +  This program is used to check that python-getfem is working. This is
 +  also a good example of use of GetFEM++.
 +
 +  $Id$
 +"""
 +# Import basic modules
 +import getfem as gf
 +import numpy as np
 +
 +## Parameters
 +NX = 20                           # Mesh parameter.
 +Dirichlet_with_multipliers = True # Dirichlet condition with multipliers
 +                                  # or penalization
 +dirichlet_coefficient = 1e10      # Penalization coefficient
- using_HHO = False                 # Use HHO method or standard Lagrange FEM
++using_HHO = True                  # Use HHO method or standard Lagrange FEM
 +using_symmetric_gradient = True   # Use symmetric gradient reconstruction or 
not
 +
 +E = 1                             # Young's modulus
- nu = 0.499                        # Poisson ratio
++nu = 0.3                          # Poisson ratio
 +
 +cmu = E/(2*(1+nu))                # Lame coefficient
 +clambda = 2*cmu*nu/(1-2*nu)       # Lame coefficient
- use_quad = False                  # Quadrilaterals or triangles
++use_quad = True                   # Quadrilaterals or triangles
 +
 +# Create a simple cartesian mesh
 +if (use_quad):
 +  m = gf.Mesh('cartesian', np.arange(0,1+1./NX,1./NX),
 +              np.arange(0,1+1./NX,1./NX));
 +  # 
m=gf.Mesh('import','structured','GT="GT_QK(2,1)";SIZES=[1,1];NOISED=1;NSUBDIV=[1,1];')
 +else:
 +  m = gf.Mesh('regular_simplices', np.arange(0,1+1./NX,1./NX),
 +              np.arange(0,1+1./NX,1./NX))
 +  # 
m=gf.Mesh('import','structured','GT="GT_PK(2,1)";SIZES=[1,1];NOISED=1;NSUBDIV=[%d,%d];'
 % (NX, NX))
 +  
 +
 +N = m.dim();
 +
 +# Meshfems
 +mfu   = gf.MeshFem(m, N)
 +mfgu  = gf.MeshFem(m, N, N)
 +mfur  = gf.MeshFem(m, N)
 +mfrhs = gf.MeshFem(m, 1)
 +
 +if (using_HHO):
 +  if (use_quad):
 +    mfu.set_fem(gf.Fem('FEM_HHO(FEM_QUAD_IPK(2,2),FEM_SIMPLEX_CIPK(1,2))'))
 +    # 
mfu.set_fem(gf.Fem('FEM_HHO(FEM_QK_DISCONTINUOUS(2,2,0.1),FEM_SIMPLEX_CIPK(1,2))'))
-     mfur.set_fem(gf.Fem('FEM_QK(2,3)'))
++    # mfu.set_fem(gf.Fem('FEM_HHO(FEM_QK(2,2),FEM_PK(1,2))'))
++    mfur.set_fem(gf.Fem('FEM_QUAD_IPK(2,3)'))
++    # mfur.set_fem(gf.Fem('FEM_QK(2,3)'))
 +  else:
 +    mfu.set_fem(gf.Fem('FEM_HHO(FEM_SIMPLEX_IPK(2,2),FEM_SIMPLEX_CIPK(1,2))'))
 +    mfur.set_fem(gf.Fem('FEM_PK(2,3)'))
 +else:
 +  if (use_quad):
 +    mfu.set_fem(gf.Fem('FEM_QK(2,2)'))
 +    mfur.set_fem(gf.Fem('FEM_QK(2,2)'))
 +  else:
 +    mfu.set_fem(gf.Fem('FEM_PK(2,2)'))
 +    mfur.set_fem(gf.Fem('FEM_PK(2,2)'))
 +    
 +if (use_quad):
++  # mfgu.set_fem(gf.Fem('FEM_QUAD_IPK(2,2)'))
 +  mfgu.set_fem(gf.Fem('FEM_QK(2,2)'))
 +  mfrhs.set_fem(gf.Fem('FEM_QK(2,2)'))
 +else:
 +  mfgu.set_fem(gf.Fem('FEM_PK(2,2)'))
 +  mfrhs.set_fem(gf.Fem('FEM_PK(2,2)'))
 +
 +print('nbdof : %d' % mfu.nbdof());
 +
 +#  Integration method used
 +if (use_quad):
-   mim = gf.MeshIm(m, gf.Integ('IM_GAUSS_PARALLELEPIPED(2,4)'))
++  mim = gf.MeshIm(m, gf.Integ('IM_GAUSS_PARALLELEPIPED(2,6)'))
 +else:
 +  mim = gf.MeshIm(m, gf.Integ('IM_TRIANGLE(4)'))
 +
 +# Boundary selection
 +flst  = m.outer_faces()
 +GAMMAD = 1
 +m.set_region(GAMMAD, flst)
 +
 +# Faces for stabilization term
 +all_faces = m.all_faces()
 +ALL_FACES = 4
 +m.set_region(ALL_FACES, all_faces)
 +
 +# Interpolate the exact solution (Assuming mfu is a Lagrange fem)
 +a = 8.
- Ue = mfur.eval('[np.sin((%g)*x), -(%g)*y*np.cos((%g)*x)]' % (a,a,a), 
globals(), locals())
++Ue = mfrhs.eval('[np.sin((%g)*x), -(%g)*y*np.cos((%g)*x)]' % (a,a,a), 
globals(), locals())
 +
 +# Interpolate the source term
 +F1 = mfrhs.eval('(%g)*(pow(%g,2.))*np.sin((%g)*x), 
-(%g)*(pow(%g,3.))*y*np.cos((%g)*x)' % (cmu, a, a, cmu, a, a), globals(), 
locals())
 +
 +
 +
 +# Model
 +md = gf.Model('real')
 +
 +
 +
 +# Main unknown
 +md.add_fem_variable('u', mfu)
 +md.add_fem_data('Gu', mfgu)
 +md.add_fem_data('ur', mfur)
 +
 +# Needed reconstuction and stabilization operators
 +if (using_HHO):
 +  if (using_symmetric_gradient):
 +    md.add_HHO_reconstructed_symmetrized_gradient('HHO_Grad')
 +    md.add_HHO_reconstructed_gradient('HHO_vGrad')
 +    md.add_HHO_reconstructed_symmetrized_value('HHO_Val')
 +    md.add_HHO_symmetrized_stabilization('HHO_Stab')
 +    md.add_macro('HHO_vGrad_u', 'Elementary_transformation(u, HHO_vGrad, Gu)')
 +  else :
 +    md.add_HHO_reconstructed_gradient('HHO_Grad')
 +    md.add_HHO_reconstructed_value('HHO_Val')
 +    md.add_HHO_stabilization('HHO_Stab')
 +    md.add_macro('HHO_vGrad_u', 'Elementary_transformation(u, HHO_Grad, Gu)')
 +
 +    
 +  md.add_macro('HHO_Val_u', 'Elementary_transformation(u, HHO_Val, ur)')
 +  md.add_macro('HHO_Grad_u', 'Elementary_transformation(u, HHO_Grad, Gu)')
 +  md.add_macro('HHO_Grad_Test_u',
 +               'Elementary_transformation(Test_u, HHO_Grad, Gu)')
 +  md.add_macro('HHO_Stab_u', 'Elementary_transformation(u, HHO_Stab)')
 +  md.add_macro('HHO_Stab_Test_u',
 +               'Elementary_transformation(Test_u, HHO_Stab)')
 +
 +
 +# Elasticity term on u
 +md.add_initialized_data('cmu', [cmu])
 +md.add_initialized_data('clambda', [clambda])
 +if (using_HHO):
 +  # Elasticity term
 +  md.add_linear_term(mim, 'clambda*Trace(HHO_Grad_u)*Trace(HHO_Grad_Test_u)'
 +                     +    '+ 2*cmu*Sym(HHO_Grad_u):Sym(HHO_Grad_Test_u)')
 +  # Stabilization term
 +  md.add_linear_term(mim, 'cmu*HHO_Stab_u.HHO_Stab_Test_u', ALL_FACES)
 +else:
 +  md.add_isotropic_linearized_elasticity_brick(mim, 'u', 'clambda', 'cmu')
 +
 +# Volumic source term
 +md.add_initialized_fem_data('VolumicData', mfrhs, F1)
 +md.add_source_term_brick(mim, 'u', 'VolumicData')
 +
 +# Dirichlet condition
- md.add_initialized_fem_data("Ue", mfur, Ue)
++md.add_initialized_fem_data("Ue", mfrhs, Ue)
 +
 +if (Dirichlet_with_multipliers):
 +  md.add_Dirichlet_condition_with_multipliers(mim, 'u', mfu, GAMMAD, 'Ue')
 +else:
 +  md.add_Dirichlet_condition_with_penalization(mim, 'u', 
dirichlet_coefficient,
 +                                               GAMMAD, 'Ue')
 +
 +# Assembly of the linear system and solve.
 +md.solve()
 +
 +# Error computation
 +U = md.variable('u')
 +L2error = gf.asm('generic', mim, 0, 'Norm_sqr(u-Ue)', -1, md)
 +H1error = gf.asm('generic', mim, 0, 'Norm_sqr(Grad_u-Grad_Ue)', -1, md)
 +H1error = np.sqrt(L2error + H1error); L2error = np.sqrt(L2error)
 +print('Error in L2 norm (without reconstruction): %g' % L2error)
 +print('Error in H1 norm (without reconstruction): %g' % H1error)
 +
 +if (using_HHO):
 +  L2error = gf.asm('generic', mim, 0, 'Norm_sqr(HHO_Val_u-Ue)', -1, md)
 +  H1error = gf.asm('generic', mim, 0, 'Norm_sqr(HHO_vGrad_u-Grad_Ue)', -1, md)
 +  H1error = np.sqrt(L2error + H1error); L2error = np.sqrt(L2error)
 +  print('Error in L2 norm (with reconstruction): %g' % L2error)
 +  print('Error in H1 norm (with reconstruction): %g' % H1error)
 +
 +
 +# Export data
 +# mfur.export_to_pos('elasticity_e.pos', Ue, 'Exact solution')
 +mfu.export_to_pos('elasticity.pos', U, 'Computed solution')
 +print('You can view the solution with (for example):')
 +print('gmsh elasticity.pos')
 +
 +
 +if (H1error > 0.013):
 +    print('Error too large !')
 +    exit(1)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]