From 411bbced1deb49439257e953edcc3336060edd90 Mon Sep 17 00:00:00 2001 From: Jeremy Bleyer Date: Wed, 25 Apr 2018 12:10:03 +0200 Subject: [PATCH] Some polishing and added tips and tricks section --- 2D_elasticity.txt~ | 5 -- doc/2D_elasticity.rst~ | 4 - doc/index.rst | 1 + doc/tips_and_tricks.rst | 28 +++++++ .../vonMises_plasticity.py.rst | 2 +- toolbox_list~ | 74 ------------------- 6 files changed, 30 insertions(+), 84 deletions(-) delete mode 100644 2D_elasticity.txt~ delete mode 100644 doc/2D_elasticity.rst~ create mode 100644 doc/tips_and_tricks.rst delete mode 100644 toolbox_list~ diff --git a/2D_elasticity.txt~ b/2D_elasticity.txt~ deleted file mode 100644 index 95f345c..0000000 --- a/2D_elasticity.txt~ +++ /dev/null @@ -1,5 +0,0 @@ -========================= - 2D elasticity in Fenics -========================= - -:math:`\int_{\Omega}\underline{\underline{\sigma}}:\underline{\underline{\varepsilon}}[v]d\Omega` diff --git a/doc/2D_elasticity.rst~ b/doc/2D_elasticity.rst~ deleted file mode 100644 index 7539fe2..0000000 --- a/doc/2D_elasticity.rst~ +++ /dev/null @@ -1,4 +0,0 @@ -========================= - 2D elasticity in Fenics -========================= - diff --git a/doc/index.rst b/doc/index.rst index 9acd72f..9770e9a 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -15,6 +15,7 @@ Contents: linear_problems nonlinear_problems demo/reissner_mindlin/reissner_mindlin.rst + tips_and_tricks diff --git a/doc/tips_and_tricks.rst b/doc/tips_and_tricks.rst new file mode 100644 index 0000000..d5e4c43 --- /dev/null +++ b/doc/tips_and_tricks.rst @@ -0,0 +1,28 @@ + +Tips and Tricks +================ + +In construction... + +.. _TipsTricksProjection: + +------------------------------------------------ +Efficient projection on DG or Quadrature spaces +------------------------------------------------ + + +For projecting a Function on a DG or Quadrature space, that is a space with no coupling between elements, the projection can be performed element-wise. For this purpose, using the LocalSolver is much faster than performing a global projection:: + + metadata={"quadrature_degree": deg} + def local_project(v,V): + dv = TrialFunction(V) + v_ = TestFunction(V) + a_proj = inner(dv,v_)*dx(metadata=metadata) + b_proj = inner(v,v_)*dx(metadata=metadata) + solver = LocalSolver(a_proj,b_proj) + solver.factorize() + u = Function(V) + solver.solve_local_rhs(u) + return u + +Local factorizations can be cached if projection is performed many times. diff --git a/examples/nonlinear_materials/vonMises_plasticity.py.rst b/examples/nonlinear_materials/vonMises_plasticity.py.rst index 5cedf42..4b60fb0 100644 --- a/examples/nonlinear_materials/vonMises_plasticity.py.rst +++ b/examples/nonlinear_materials/vonMises_plasticity.py.rst @@ -259,7 +259,7 @@ the stress and strain tensors. These nonlinear expressions must then be projecte back onto the associated Quadrature spaces. Since these fields are defined locally in each cell (in fact only at their associated Gauss point), this projection can be performed locally. For this reason, we define a ``local_project`` function -that use the ``LocalSolver`` to gain in efficiency (see also :ref:`TipsStressProjection`_) +that use the ``LocalSolver`` to gain in efficiency (see also :ref:`TipsTricksProjection`) for more details:: def local_project(v, V, u=None): diff --git a/toolbox_list~ b/toolbox_list~ deleted file mode 100644 index 62717c1..0000000 --- a/toolbox_list~ +++ /dev/null @@ -1,74 +0,0 @@ -############### -Linear problems -############### - -Elastostatics : -standard continuous galerkin -* 2D plane stress/strain -* 3D isotropic, orthotropic - -discontinous galerkin --> volumetric locking - -mixed formulation using Hu-Wahizu --> volumetric locking - -Elastodynamics -* time integration Newmark scheme, theta -* modal analysis with SLEPC - -Poroelasticity - -Mixing continuum and interfaces -* elastic interfaces/supports (beam on elastic foundation) - -Linear Fracture Mechanics -* G-theta method to compute J-integral and stress intensity factors - -Homogenization in elasticity --> treatment of rigid particles with Lagrange multipliers - -Linear Buckling - -################## -Nonlinear problems -################## - -Hyperelasticity : --> compressible neo-hookean --> incompressible neo-hookean - -Viscoelasticity -* Maxwell model -* Kelvin-Voigt model - -Elasto-plasticity -* radial return for von Mises/Drucker Prager -* limit analysis with augmented Lagrangian - -Viscoplasticity -* yield stress fluids - -Contact -* resolution of normal contact with TAO -* contact with AL - -Von-Karman plates - -################ -Beams and Plates -################ - -Love-Kirchhoff plates with DG - -Reissner-Mindlin plates - -Higher-order plate models (warping, Bending-Gradient) - -##### -Misc -##### -Topology Optimization -(undocumented example) - -Linear Matching Method -- GitLab