<html><head></head><body>Hi Thomas,<br><br>as you said, it works for a single element, I don't think it is likely that the actual problem arises from wrong boundary conditions, but from something else. Your currently replace your Dirichlet rows with a diagonal 1. Some remarks... What is the size of your other matrix entries? Are they O(1)? Otherwise you might run into issues due to the different entries, or you have to do a full elimination (including columns). You are using a CG solver. That should work, as you are arriving in the right subspaces but your matrix is non-symmetric, so depending on the finite on precision errors, you might still run into trouble. To use a direct divers, you can simply replace the CG with one of our direct solver wrappers. We support SuperLU and UMFPack, e.g. dune/istl/superlu.hh.<br><br>Ciao<br>Christian<br><br><div class="gmail_quote">Am 15. April 2020 22:37:21 MESZ schrieb HELFER Thomas 202608 <thomas.helfer@cea.fr>:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Dear Dune users,<br><br>I introduced my self by saying that I was interested to evaluate Dune for non linear mechanics<br>and in particular that I wanted to use MFront behaviours in Dune.<br><br>I tried to adapt the poisson-solver example given by O. Sander to the description of a simple<br>tensile test on a unit cube.<br><br>It almost works. I can simulate a tensile test for an elastic behaviour and a plastic behaviour.<br>I probably can use any smal strain behaviour generated by MFront. The non-linearity is treated<br>very crudely as we use an Newton algorithm with a fixed number of iterations.<br><br>The trouble is that it only works if the grid contains only a single element. This probably means<br>that I made a mistake in the assembly of the stiffness matrix or the assembly of the inner<br>forces. I reread my code several times without finding the trouble.<br><br>Please find enclosed my project, modified to drop the dependency to the MGIS library and<br>only integrate an isotropic elastic behaviour. The relevant file is<br>dune-mgis/src/dune-mgis-tensile-test.cc.<br><br>The purpose of my request is twofold:<br><br>- I would be grateful if anyone could find what I have done wrong.<br>- I would be grateful if anyone could review the code to tell me what could be improved.<br><br>With kind regards,<br><br>Thomas Helfer</pre></blockquote></div></body></html>