[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 025ad8b35c51cd12776fcfd94029eaca21577def
Author: Yves Renard <address@hidden>
Date: Tue Aug 20 23:44:53 2019 +0200
adding a small documentation on HHO methods
---
doc/sphinx/Makefile.am | 61 +++++----
doc/sphinx/source/biblio.rst | 27 +++-
doc/sphinx/source/conf.py | 28 ++--
doc/sphinx/source/gmm/blas_interface.rst | 118 ++++++++--------
doc/sphinx/source/gmm/catch.rst | 2 +-
doc/sphinx/source/gmm/inside.rst | 2 +-
doc/sphinx/source/install/install_linux.rst | 2 +-
doc/sphinx/source/install/install_mac.rst | 2 +-
doc/sphinx/source/install/install_windows.rst | 2 +-
doc/sphinx/source/project/contribute.rst | 2 +-
doc/sphinx/source/project/libdesc_event.rst | 2 +-
doc/sphinx/source/userdoc/appendixA.rst | 32 ++++-
doc/sphinx/source/userdoc/appendixB.rst | 3 +-
doc/sphinx/source/userdoc/bmesh.rst | 2 +-
doc/sphinx/source/userdoc/gasm_high.rst | 19 ++-
doc/sphinx/source/userdoc/hho.rst | 152 +++++++++++++++++++++
doc/sphinx/source/userdoc/index.rst | 1 +
doc/sphinx/source/userdoc/interMM.rst | 2 +-
.../source/userdoc/model_nonlinear_elasticity.rst | 2 +-
interface/tests/python/demo_laplacian_HHO.py | 10 +-
20 files changed, 341 insertions(+), 130 deletions(-)
diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am
index 2cab2a6..4d31d1b 100644
--- a/doc/sphinx/Makefile.am
+++ b/doc/sphinx/Makefile.am
@@ -23,7 +23,8 @@ PYTHON = python
SPHINXROOT = http://svn.python.org/projects
LANGUAGE = en
SPHINXOPTS = -D language=$(LANGUAGE)
-SPHINXBUILD = $(PYTHON) tools/sphinx-build.py
+# SPHINXBUILD = $(PYTHON) tools/sphinx-build.py
+SPHINXBUILD = sphinx-build
SPHINXINTL = sphinx-intl
PAPER =
SOURCES = $(srcdir)/source
@@ -51,34 +52,34 @@ help:
@echo " linkcheck to check all external links for integrity"
@echo " upload to make HTML and LATEX docs and upload it to
Savannah.org"
-checkout:
- @if [ ! -d tools ]; then \
- echo "Checking out tools..."; \
- svn checkout $(SPHINXROOT)/python/trunk/Doc/tools tools; \
- fi
- @if [ ! -d tools/sphinx ]; then \
- echo "Checking out Sphinx..."; \
- svn checkout $(SPHINXROOT)/external/Sphinx-1.2/sphinx tools/sphinx; \
- fi
- @if [ ! -d tools/docutils ]; then \
- echo "Checking out Docutils..."; \
- svn checkout $(SPHINXROOT)/external/docutils-0.11/docutils
tools/docutils; \
- fi
- @if [ ! -d tools/jinja2 ]; then \
- echo "Checking out Jinja..."; \
- svn checkout $(SPHINXROOT)/external/Jinja-2.3.1/jinja2 tools/jinja2; \
- fi
- @if [ ! -d tools/pygments ]; then \
- echo "Checking out Pygments..."; \
- svn checkout $(SPHINXROOT)/external/Pygments-1.6/pygments
tools/pygments; \
- fi
-
-update: checkout
- svn update tools
- svn update tools/sphinx
- svn update tools/docutils
- svn update tools/jinja2
- svn update tools/pygments
+# checkout:
+# @if [ ! -d tools ]; then \
+# echo "Checking out tools..."; \
+# svn checkout $(SPHINXROOT)/python/trunk/Doc/tools tools; \
+# fi
+# @if [ ! -d tools/sphinx ]; then \
+# echo "Checking out Sphinx..."; \
+# svn checkout $(SPHINXROOT)/external/Sphinx-1.2/sphinx tools/sphinx; \
+# fi
+# @if [ ! -d tools/docutils ]; then \
+# echo "Checking out Docutils..."; \
+# svn checkout $(SPHINXROOT)/external/docutils-0.6/docutils
tools/docutils; \
+# fi
+# @if [ ! -d tools/jinja2 ]; then \
+# echo "Checking out Jinja..."; \
+# svn checkout $(SPHINXROOT)/external/Jinja-2.3.1/jinja2 tools/jinja2; \
+# fi
+# @if [ ! -d tools/pygments ]; then \
+# echo "Checking out Pygments..."; \
+# svn checkout $(SPHINXROOT)/external/Pygments-1.6/pygments
tools/pygments; \
+# fi
+#
+#update: checkout
+# svn update tools
+# svn update tools/sphinx
+# svn update tools/docutils
+# svn update tools/jinja2
+# svn update tools/pygments
images:
-cd $(srcdir)/source/userdoc/images/; make png
@@ -88,7 +89,7 @@ images:
-cd $(srcdir)/source/scilab/images/; make png
build: $(srcdir)/source/matlab/cmdref.rst $(srcdir)/source/python/cmdref.rst
$(srcdir)/source/scilab/cmdref.rst checkout images
- $(SPHINXINTL) build
+ echo # $(SPHINXINTL) build # sphinx-intl produces a segmentation fault
...
echo # rm -fr build/$(BUILDER)/_images
echo # rm -fr build/$(BUILDER)/*.png
mkdir -p build/$(BUILDER) build/doctrees
diff --git a/doc/sphinx/source/biblio.rst b/doc/sphinx/source/biblio.rst
index 17d1ae8..bf9c8fd 100644
--- a/doc/sphinx/source/biblio.rst
+++ b/doc/sphinx/source/biblio.rst
@@ -5,6 +5,14 @@
References
----------
+.. [AB-ER-PI2018] M. Abbas, A. Ern, N. Pignet.
+ *Hybrid High-Order methods for finite deformations of hyperelastic
materials*.
+ Computational Mechanics, 62(4), 909-928, 2018.
+
+.. [AB-ER-PI2019] M. Abbas, A. Ern, N. Pignet.
+ *A Hybrid High-Order method for incremental associative plasticity with
small deformations*.
+ Computer Methods in Applied Mechanics and Engineering, 346, 891-912, 2019.
+
.. [AL-CU1991] P. Alart, A. Curnier.
*A mixed formulation for frictional contact problems prone to newton like
solution methods*. Comput. Methods Appl. Mech. Engrg. 92, 353--375, 1991.
@@ -40,6 +48,10 @@ References
.. [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.
+.. [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.
@@ -56,13 +68,19 @@ References
R. Cools, `An Encyclopedia of Cubature Formulas
<http://www.cs.kuleuven.ac.be/~ines/research/ecf/ecf.html>`_, J. Complexity.
-.. [dh-to1984] G. Dhatt, G. Touzot.
- *The Finite Element Method Displayed*. J. Wiley & Sons, New York, 1984.
-
.. [Dh-Go-Ku2003] A. Dhooge, W. Govaerts and Y. A. Kuznetsov.
*MATCONT: A MATLAB Package for Numerical Bifurcation Analysis of ODEs*.
ACM Trans. Math. Software 31, 141-164, 2003.
+
+.. [Di-Er2015] D.A. Di Pietro, A. Ern.
+ *A hybrid high-order locking free method for linear elasticity on general
meshes*.
+ Comput. Methods Appl. Mech. Engrg., 283:1-21, 2015
+
+.. [Di-Er2017] D.A. Di Pietro, A. Ern.
+ *Arbitrary-order mixed methods for heterogeneous anisotropic diffusion on
general meshes*.
+ IMA Journal of Numerical Analysis, 37(1), 40-63. 2017
+
.. [Duan2014] H. Duan.
*A finite element method for Reissner-Mindlin plates*.
Math. Comp., 83:286, 701-733, 2014.
@@ -141,9 +159,6 @@ References
and finite element approach*.
Comput. Methods Appl. Mech. Engrg., 193:4299-4322, 2004.
-.. [nedelec1991] J.-C. Nedelec.
- *Notions sur les techniques d'elements finis*. Ellipses, SMAI,
Mathematiques & Applications no 7, 1991.
-
.. [NI-RE-CH2011] S. Nicaise, Y. Renard, E. Chahine,
*Optimal convergence analysis for the eXtended Finite Element Method*. Int.
J. Numer. Meth. Engng., 86:528-548, 2011.
diff --git a/doc/sphinx/source/conf.py b/doc/sphinx/source/conf.py
index d5f924b..1cb9c9f 100644
--- a/doc/sphinx/source/conf.py
+++ b/doc/sphinx/source/conf.py
@@ -22,7 +22,8 @@ sys.path.append('../../../interface/src/python/') #
getfem
###########################################################################
from getfem import getfem_env
-user_preamble = """\n% begin user_preamble:
+user_preamble = '''
+\n% begin user_preamble:
\\usepackage{mathrsfs}
\\usepackage{amsmath}
\\usepackage{amssymb}
@@ -32,11 +33,11 @@ user_preamble = """\n% begin user_preamble:
\\newcommand{\\Frac}[2]{{\\ds \\frac{\\ds #1}{\\ds #2}}}
\\usepackage[draft]{minted}\\fvset{breaklines=true}
% end user_preamble
-"""
+'''
-pngmath_use_preview = True
-pngmath_dvipng_args = ['-gamma', '1.5', '-D', '110', '-bg', 'Transparent']
-pngmath_latex_preamble = user_preamble
+imgmath_use_preview = True
+imgmath_dvipng_args = ['-gamma', '1.5', '-D', '110', '-bg', 'Transparent']
+imgmath_latex_preamble = user_preamble
autoclass_content = "both"
@@ -48,7 +49,7 @@ _stdauthor = getfem_env('authors')
# Add any Sphinx extension module names here, as strings. They can be
extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.pngmath','sphinx.ext.autodoc',
+extensions = ['sphinx.ext.imgmath','sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.doctest']
@@ -180,7 +181,7 @@ html_logo = '.static/logo_getfem_small.png'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
-html_favicon = 'favicon.ico'
+html_favicon = '.static/favicon.ico'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
@@ -295,9 +296,16 @@ latex_logo = '.static/logogetfem.png'
# 'fncychap' : Inclusion of the "fncychap" package, default
'\\usepackage[Bjarne]{fncychap}'
# 'preamble' : Additional preamble content, default empty.
# 'footer' : Additional footer content (before the indices), default empty.
-latex_elements = [
- ('preamble',user_preamble),
-]
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+'papersize': 'a4paper',
+
+# The font size ('10pt', '11pt' or '12pt').
+'pointsize': '11pt',
+
+# Additional stuff for the LaTeX preamble.
+ 'preamble': user_preamble
+}
# A list of file names, relative to the configuration directory, to copy to
# the build directory when building LaTeX output.
diff --git a/doc/sphinx/source/gmm/blas_interface.rst
b/doc/sphinx/source/gmm/blas_interface.rst
index 0de1682..3c40ec1 100644
--- a/doc/sphinx/source/gmm/blas_interface.rst
+++ b/doc/sphinx/source/gmm/blas_interface.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. _gmm-lapack:
@@ -35,97 +35,97 @@ Ask your system administrator if this configuration does
not work.
The following operations are interfaced::
- vect_norm2(std::vector<T>)
+ 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_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>))
+ 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>)
+ 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(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>)
+ 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>)
+ 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(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>)
+ std::vector<T>);
mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),
- 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(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>)
+ std::vector<T>);
mult_add(conjugated(dense_matrix<T>), scaled(std::vector<T>),
- std::vector<T>)
+ std::vector<T>);
- mult(dense_matrix<T>, std::vector<T>, 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>)
+ std::vector<T>);
mult(conjugated(dense_matrix<T>), std::vector<T>, std::vector<T>,
- std::vector<T>)
+ std::vector<T>);
mult(dense_matrix<T>, scaled(std::vector<T>), std::vector<T>,
- std::vector<T>)
+ std::vector<T>);
mult(transposed(dense_matrix<T>), scaled(std::vector<T>),
- std::vector<T>, std::vector<T>)
+ std::vector<T>, std::vector<T>);
mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),
- std::vector<T>, std::vector<T>)
+ std::vector<T>, std::vector<T>);
mult(dense_matrix<T>, std::vector<T>, scaled(std::vector<T>),
- std::vector<T>)
+ std::vector<T>);
mult(transposed(dense_matrix<T>), std::vector<T>,
- scaled(std::vector<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>)
+ scaled(std::vector<T>), std::vector<T>);
mult(dense_matrix<T>, scaled(std::vector<T>), scaled(std::vector<T>),
- std::vector<T>)
+ std::vector<T>);
mult(transposed(dense_matrix<T>), scaled(std::vector<T>),
- scaled(std::vector<T>), 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>)
+ 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)
+ 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_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>)
+ 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>)
+ 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>)
+ 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>);
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.
diff --git a/doc/sphinx/source/gmm/catch.rst b/doc/sphinx/source/gmm/catch.rst
index fe76a1f..245b01f 100644
--- a/doc/sphinx/source/gmm/catch.rst
+++ b/doc/sphinx/source/gmm/catch.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. _gmm-catch:
diff --git a/doc/sphinx/source/gmm/inside.rst b/doc/sphinx/source/gmm/inside.rst
index fd1b0d6..e17ae29 100644
--- a/doc/sphinx/source/gmm/inside.rst
+++ b/doc/sphinx/source/gmm/inside.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. _gmm-inside:
diff --git a/doc/sphinx/source/install/install_linux.rst
b/doc/sphinx/source/install/install_linux.rst
index 71da831..4bb2e0e 100644
--- a/doc/sphinx/source/install/install_linux.rst
+++ b/doc/sphinx/source/install/install_linux.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. _ud-install-linux:
diff --git a/doc/sphinx/source/install/install_mac.rst
b/doc/sphinx/source/install/install_mac.rst
index e49a991..dac77b6 100644
--- a/doc/sphinx/source/install/install_mac.rst
+++ b/doc/sphinx/source/install/install_mac.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. _ud-install-mac:
diff --git a/doc/sphinx/source/install/install_windows.rst
b/doc/sphinx/source/install/install_windows.rst
index 18e6b80..44c875c 100644
--- a/doc/sphinx/source/install/install_windows.rst
+++ b/doc/sphinx/source/install/install_windows.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. _ud-install-windows:
diff --git a/doc/sphinx/source/project/contribute.rst
b/doc/sphinx/source/project/contribute.rst
index 2fd533a..4340b15 100644
--- a/doc/sphinx/source/project/contribute.rst
+++ b/doc/sphinx/source/project/contribute.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. _dp-contribute:
diff --git a/doc/sphinx/source/project/libdesc_event.rst
b/doc/sphinx/source/project/libdesc_event.rst
index e978401..b6a36fd 100644
--- a/doc/sphinx/source/project/libdesc_event.rst
+++ b/doc/sphinx/source/project/libdesc_event.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. _dp-libdesc_event:
diff --git a/doc/sphinx/source/userdoc/appendixA.rst
b/doc/sphinx/source/userdoc/appendixA.rst
index 2a4d1d4..65ffcba 100644
--- a/doc/sphinx/source/userdoc/appendixA.rst
+++ b/doc/sphinx/source/userdoc/appendixA.rst
@@ -246,11 +246,33 @@ the classical :math:`P_K` Lagrange element.
- Yes :math:`(M = Id)`
- Yes
-Even though Lagrange elements are defined for arbitrary degrees, to choose a
high
-degree can be problematic for a large number of applications due to the "noisy"
-characteristic of the lagrange basis. These elements are recommended for the
basic
-interpolation but for p.d.e. applications elements with hierarchical basis are
-preferable (see the corresponding section).
+:math:`.\\`
+
+ .. list-table:: Discontinuous :math:`P_K` Lagrange element with internal
dofs ``"FEM_PK_DISCONTINUOUS(P, K, alpha)"``. The method
``"FEM_PK_DISCONTINUOUS(P, K, 0)"`` is identical to ``"FEM_PK_DISCONTINUOUS(P,
K)"``. For alpha > 0, ``"FEM_PK_DISCONTINUOUS(P, K, alpha)"`` corresponds to a
Lagrange method with all finite element nodes in the interior of the domain
located at the position :math:`(\mbox{alpha})g + (1-\mbox{alpha})a_i` for
:math:`g` the centroid of the element and :math:`a_i [...]
+ :widths: 10 10 10 10 10 10 10
+ :header-rows: 1
+
+ * - degree
+ - dimension
+ - d.o.f. number
+ - class
+ - vector
+ - :math:`\tau`-equivalent
+ - Polynomial
+
+ * - :math:`K`, :math:`0 \leq K \leq 255`
+ - :math:`P`, :math:`~ 1 \leq P \leq 255`
+ - :math:`\Frac{(K+P)!}{K! P!}`
+ - discontinuous
+ - No :math:`(Q = 1)`
+ - Yes :math:`(M = Id)`
+ - Yes
+
+Even though Lagrange elements are defined for arbitrary degrees, choosing a
+high degree can be problematic for a large number of applications due to
+the "noisy" characteristic of the lagrange basis. These elements are
+recommended for the basic interpolation but for p.d.e. applications elements
+with hierarchical basis are preferable (see the corresponding section).
Classical Lagrange elements on other geometries
-----------------------------------------------
diff --git a/doc/sphinx/source/userdoc/appendixB.rst
b/doc/sphinx/source/userdoc/appendixB.rst
index 679841c..5b0322c 100644
--- a/doc/sphinx/source/userdoc/appendixB.rst
+++ b/doc/sphinx/source/userdoc/appendixB.rst
@@ -1,3 +1,4 @@
+
.. $Id$
.. include:: ../replaces.txt
@@ -9,7 +10,7 @@
Appendix B. Cubature method list
================================
-The integration methods are of two kinds. Exact integrations of polynomials and
+For more information on cubature formulas, the reader is referred to
[EncyclopCubature]_ and [so-se-do2004]_ for instance. The integration methods
are of two kinds. Exact integrations of polynomials and
approximated integrations (cubature formulas) of any function. The exact
integration can only be used if all the elements are polynomial and if the
geometric transformation is linear.
diff --git a/doc/sphinx/source/userdoc/bmesh.rst
b/doc/sphinx/source/userdoc/bmesh.rst
index 576c3a9..d9a7704 100644
--- a/doc/sphinx/source/userdoc/bmesh.rst
+++ b/doc/sphinx/source/userdoc/bmesh.rst
@@ -25,7 +25,7 @@ domain mesh generators).
The structure |gf_m| may also contain a description about a region of the mesh,
such as a boundary or a set of elements. This is handled via a container of
-convexes and convex faces, |gf_mr|.
+convexes and convex faces, |gf_mr|. We refer to [remacle2002]_ for a
discussion on mesh representation.
Add an element to a mesh
diff --git a/doc/sphinx/source/userdoc/gasm_high.rst
b/doc/sphinx/source/userdoc/gasm_high.rst
index 526115f..d8968f1 100644
--- a/doc/sphinx/source/userdoc/gasm_high.rst
+++ b/doc/sphinx/source/userdoc/gasm_high.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. index:: asm, generic assembly
@@ -929,17 +929,28 @@ where ``pelementary_transformation`` is a pointer to an
object deriving from ``v
where ``u`` is one of the FEM variables of the model/workspace, and ``dest``
is an optional parameter which should be a variable or data name of the model
and will correspond to the target fem of the transformation. If omitted, by
default, the transformation is from the fem of the first variable to itself.
-
-For the moment, the only available elementary transformation is the the one
for the projection on rotated RT0 element for two-dimensional elements which
can be added thanks to the function (defined in
:file:`src/getfem/getfem_linearized_plates.h`)::
+A typical transformation is the the one for the projection on rotated RT0
element for two-dimensional elements which is an ingredient of the MITC plate
element. It can be added thanks to the function (defined in
:file:`src/getfem/getfem_linearized_plates.h`)::
add_2D_rotated_RT0_projection(model, transname)
+Some other transformations are available for the use into Hybrid High-Order
methods (HHO methods, see :ref:`ud-hho` for more information). These
transformations correspond to the reconstruction of the gradient of a variable
or the variable itself, the HHO methods having separated discretizations on the
interior of the element and on its faces. The different transformations can be
added with the functions (defined in :file:`src/getfem/getfem_HHO.h`)::
+
+ add_HHO_reconstructed_gradient(model, transname);
+ add_HHO_reconstructed_symmetrized_gradient(model, transname);
+
+ void add_HHO_reconstructed_value(model, transname);
+ void add_HHO_reconstructed_symmetrized_value(model, transname);
+
+ void add_HHO_stabilization(model, transname);
+ void add_HHO_symmetrized_stabilization(model, transname);
+
+
.. _ud-gasm-high_xfem:
Xfem discontinuity evaluation (with mesh_fem_level_set)
-------------------------------------------------------
-For |gf| 5.1. When using a fem cut by a level-set (using fem_level_set or
mesh_fem_level_set objects), it is often interesting to integrate the
discontinuity jump of a variable, or the jump in gradient or the average value.
For this purpose, the weak form language furnishes the following expressions
for ``u`` a FEM variable::
+When using a fem cut by a level-set (using fem_level_set or mesh_fem_level_set
objects), it is often interesting to integrate the discontinuity jump of a
variable, or the jump in gradient or the average value. For this purpose, the
weak form language furnishes the following expressions for ``u`` a FEM
variable::
Xfem_plus(u)
Xfem_plus(Grad_u)
diff --git a/doc/sphinx/source/userdoc/hho.rst
b/doc/sphinx/source/userdoc/hho.rst
new file mode 100644
index 0000000..b7ce053
--- /dev/null
+++ b/doc/sphinx/source/userdoc/hho.rst
@@ -0,0 +1,152 @@
+.. $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 great [...]
+
+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 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 th [...]
+
+ getfem::pfem pf = getfem::fem_descriptor("HHO(FEM_DISCONTINOUS_PK(2,2,0.1),
FEM_DISCONTINOUS_PK(1,2,0.1))");
+
+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_DISCONTINOUS_PK(2,2,0.1)`` 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 [...]
+
++ ``FEM_IPK`` and PK on quadrilateral ...
+
+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, ur)``, if ``transname="HHO_grad"``.
The third parameter of the transformation ``ur`` 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 r [...]
+
+This is an example of use in Python for a two-dimensional mesh ``m`` ::
+
+ mfu = gf.MeshFem(m, 1)
+ mfgu = gf.MeshFem(m, N)
+
mfu.set_fem(gf.Fem('FEM_HHO(FEM_PK_DISCONTINUOUS(2,2,0.1),FEM_PK_DISCONTINUOUS(1,2,0.1))'))
+ 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')
+
+A complete example of use is given in the test program
:file:`interface/tests/demo_laplacian_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, ur)``, if ``transname="HHO_sym_grad"``, with ``ur`` 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 transformation 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"``. There is no third argument for these
transformations since the arrival space is the one of the variable. A example
of use is also given in the test program
:file:`interface/tests/demo_laplacian_HHO.py`.
diff --git a/doc/sphinx/source/userdoc/index.rst
b/doc/sphinx/source/userdoc/index.rst
index 3fd75ba..3ad132d 100644
--- a/doc/sphinx/source/userdoc/index.rst
+++ b/doc/sphinx/source/userdoc/index.rst
@@ -27,6 +27,7 @@ User Documentation
ifem
iinteg
xfem
+ hho
interNMM
computeL2H1
computeD
diff --git a/doc/sphinx/source/userdoc/interMM.rst
b/doc/sphinx/source/userdoc/interMM.rst
index 556efdc..06f8b57 100644
--- a/doc/sphinx/source/userdoc/interMM.rst
+++ b/doc/sphinx/source/userdoc/interMM.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. _ud-intermm:
diff --git a/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst
b/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst
index 01c796b..f987a1d 100644
--- a/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst
+++ b/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst
@@ -2,7 +2,7 @@
.. include:: ../replaces.txt
-.. highlightlang:: c++
+.. highlightlang:: none
.. index:: models, model bricks
diff --git a/interface/tests/python/demo_laplacian_HHO.py
b/interface/tests/python/demo_laplacian_HHO.py
index f21b609..06b472d 100644
--- a/interface/tests/python/demo_laplacian_HHO.py
+++ b/interface/tests/python/demo_laplacian_HHO.py
@@ -31,11 +31,11 @@ import getfem as gf
import numpy as np
## Parameters
-NX = 10 # Mesh parameter.
+NX = 40 # 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
# Create a simple cartesian mesh
m = gf.Mesh('regular_simplices', np.arange(0,1+1./NX,1./NX),
@@ -104,9 +104,9 @@ md.add_fem_data('ur', mfur)
# Needed reconstuction and stabilization operators
if (using_HHO):
- md.add_HHO_reconstructed_gradient('HHO_Grad');
- md.add_HHO_reconstructed_value('HHO_Val');
- md.add_HHO_stabilization('HHO_Stab');
+ md.add_HHO_reconstructed_gradient('HHO_Grad')
+ md.add_HHO_reconstructed_value('HHO_Val')
+ md.add_HHO_stabilization('HHO_Stab')
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',
- [Getfem-commits] [getfem-commits] master updated (860f866 -> e920df7), Yves Renard, 2019/08/27
- [Getfem-commits] (no subject), Yves Renard, 2019/08/27
- [Getfem-commits] (no subject), Yves Renard, 2019/08/27
- [Getfem-commits] (no subject), Yves Renard, 2019/08/27
- [Getfem-commits] (no subject), Yves Renard, 2019/08/27
- [Getfem-commits] (no subject), Yves Renard, 2019/08/27
- [Getfem-commits] (no subject), Yves Renard, 2019/08/27
- [Getfem-commits] (no subject), Yves Renard, 2019/08/27
- [Getfem-commits] (no subject),
Yves Renard <=
- [Getfem-commits] (no subject), Yves Renard, 2019/08/27