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: Fri, 5 Oct 2018 06:11:57 -0400 (EDT)

branch: master
commit 578da9c1827158006fd1c53eabb2e0c7730646d5
Author: Yves Renard <address@hidden>
Date:   Fri Oct 5 11:23:31 2018 +0200

    'PK2' instead of -sigma in hyper elastic law names
---
 .../source/userdoc/model_nonlinear_elasticity.rst  | 40 ++++++-------
 interface/tests/matlab/demo_nonlinear_elasticity.m | 12 ++--
 .../tests/python/demo_nonlinear_elasticity.py      |  2 +-
 src/getfem_nonlinear_elasticity.cc                 | 67 +++++++++++++++++++++-
 4 files changed, 91 insertions(+), 30 deletions(-)

diff --git a/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst 
b/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst
index e29755a..01c796b 100644
--- a/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst
+++ b/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst
@@ -383,33 +383,33 @@ The potentials::
 
 The second Piola-Kirchhoff stress tensors::
 
-  Saint_Venant_Kirchhoff_sigma(Grad_u, [lambda; mu])
-  Plane_Strain_Saint_Venant_Kirchhoff_sigma(Grad_u, [lambda; mu])
-  Generalized_Blatz_Ko_sigma(Grad_u, [a;b;c;d;n])
-  Plane_Strain_Generalized_Blatz_Ko_sigma(Grad_u, [a;b;c;d;n])
-  Ciarlet_Geymonat_sigma(Grad_u, [lambda;mu;a])
-  Plane_Strain_Ciarlet_Geymonat_sigma(Grad_u, [lambda;mu;a])
-  Incompressible_Mooney_Rivlin_sigma(Grad_u, [c1;c2])
-  Plane_Strain_Incompressible_Mooney_Rivlin_sigma(Grad_u, [c1;c2])
-  Compressible_Mooney_Rivlin_sigma(Grad_u, [c1;c2;d1])
-  Plane_Strain_Compressible_Mooney_Rivlin_sigma(Grad_u, [c1;c2;d1])
-  Incompressible_Neo_Hookean_sigma(Grad_u, [c1])
-  Plane_Strain_Incompressible_Neo_Hookean_sigma(Grad_u, [c1])
-  Compressible_Neo_Hookean_sigma(Grad_u, [c1;d1])
-  Plane_Strain_Compressible_Neo_Hookean_sigma(Grad_u, [c1;d1])
-  Compressible_Neo_Hookean_Bonet_sigma(Grad_u, [lambda;mu])
-  Plane_Strain_Compressible_Neo_Hookean_Bonet_sigma(Grad_u, [lambda;mu])
-  Compressible_Neo_Hookean_Ciarlet_sigma(Grad_u, [lambda;mu])
-  Plane_Strain_Compressible_Neo_Hookean_Ciarlet_sigma(Grad_u, [lambda;mu])
+  Saint_Venant_Kirchhoff_PK2(Grad_u, [lambda; mu])
+  Plane_Strain_Saint_Venant_Kirchhoff_PK2(Grad_u, [lambda; mu])
+  Generalized_Blatz_Ko_PK2(Grad_u, [a;b;c;d;n])
+  Plane_Strain_Generalized_Blatz_Ko_PK2(Grad_u, [a;b;c;d;n])
+  Ciarlet_Geymonat_PK2(Grad_u, [lambda;mu;a])
+  Plane_Strain_Ciarlet_Geymonat_PK2(Grad_u, [lambda;mu;a])
+  Incompressible_Mooney_Rivlin_PK2(Grad_u, [c1;c2])
+  Plane_Strain_Incompressible_Mooney_Rivlin_PK2(Grad_u, [c1;c2])
+  Compressible_Mooney_Rivlin_PK2(Grad_u, [c1;c2;d1])
+  Plane_Strain_Compressible_Mooney_Rivlin_PK2(Grad_u, [c1;c2;d1])
+  Incompressible_Neo_Hookean_PK2(Grad_u, [c1])
+  Plane_Strain_Incompressible_Neo_Hookean_PK2(Grad_u, [c1])
+  Compressible_Neo_Hookean_PK2(Grad_u, [c1;d1])
+  Plane_Strain_Compressible_Neo_Hookean_PK2(Grad_u, [c1;d1])
+  Compressible_Neo_Hookean_Bonet_PK2(Grad_u, [lambda;mu])
+  Plane_Strain_Compressible_Neo_Hookean_Bonet_PK2(Grad_u, [lambda;mu])
+  Compressible_Neo_Hookean_Ciarlet_PK2(Grad_u, [lambda;mu])
+  Plane_Strain_Compressible_Neo_Hookean_Ciarlet_PK2(Grad_u, [lambda;mu])
 
 
 Note that the derivatives with respect to the material parameters have not 
been implemented apart for the Saint Venant Kirchhoff hyperelastic law. 
Therefore, it is not possible to make the parameter depend on other variables 
of a model (derivatives are not necessary complicated to implement but for the 
moment, only a wrapper with old implementations has been written).
 
-Note that the coupling of models is to be done at the weak formulation level. 
In a general way, it is recommended not to use the potential to define a 
problem. Two reasons are first that the second order derivative of the 
potential (necessary to obtain the tangent system) can be very complicated and 
non-optimized and main couplings cannot be obtained at the potential level. 
Thus the use of potential should be restricted to the actual computation of the 
potential.
+Note that the coupling of models is to be done at the weak formulation level. 
In a general way, it is recommended not to use the potential to define a 
problem. Main couplings cannot be obtained at the potential level. Thus the use 
of potential should be restricted to the actual computation of the potential.
 
 An example of use to add a Saint Venant-Kirchhoff hyperelastic term to a 
variable ``u`` in a model or a ga_workspace is given by the addition of the 
following assembly string::
 
-  
"((Id(meshdim)+Grad_u)*(Saint_Venant_Kirchhoff_sigma(Grad_u,[lambda;mu]))):Grad_Test_u"
+  
"((Id(meshdim)+Grad_u)*(Saint_Venant_Kirchhoff_PK2(Grad_u,[lambda;mu]))):Grad_Test_u"
 
 Note that in that case, ``lambda`` and ``mu`` have to be declared data of the 
model/ga_workspace. It is of course possible to replace them by explicit 
constants or expressions depending on several data.
 
diff --git a/interface/tests/matlab/demo_nonlinear_elasticity.m 
b/interface/tests/matlab/demo_nonlinear_elasticity.m
index 5e6803a..d2e9b41 100644
--- a/interface/tests/matlab/demo_nonlinear_elasticity.m
+++ b/interface/tests/matlab/demo_nonlinear_elasticity.m
@@ -92,15 +92,15 @@ gf_model_set(md, 'add finite strain elasticity brick', mim, 
lawname, 'u',  'para
 %            
'((Id(meshdim)+Grad_u)*(params(1)*Trace(Green_Lagrangian(Id(meshdim)+Grad_u))*Id(meshdim)+2*params(2)*Green_Lagrangian(Id(meshdim)+Grad_u))):Grad_Test_u');
 % gf_model_set(md, 'add nonlinear term', mim, 
'Saint_Venant_Kirchhoff_potential(Grad_u,params)'); 
 % gf_model_set(md, 'add nonlinear term', mim, ...
-%           
'((Id(meshdim)+Grad_u)*(Ciarlet_Geymonat_sigma(Grad_u,params))):Grad_Test_u');
+%           
'((Id(meshdim)+Grad_u)*(Ciarlet_Geymonat_PK2(Grad_u,params))):Grad_Test_u');
 % gf_model_set(md, 'add nonlinear term', mim, ...
 %                'Ciarlet_Geymonat_potential(Grad_u,params)');
 % gf_model_set(md, 'add nonlinear term', mim, ...
-%         
'((Id(meshdim)+Grad_u)*(Incompressible_Mooney_Rivlin_sigma(Grad_u,params))):Grad_Test_u');
+%         
'((Id(meshdim)+Grad_u)*(Incompressible_Mooney_Rivlin_PK2(Grad_u,params))):Grad_Test_u');
 % gf_model_set(md, 'add nonlinear term', mim, ...
 %                  'Incompressible_Mooney_Rivlin_potential(Grad_u,params)');
 % gf_model_set(md, 'add nonlinear term', mim, ...
-%      
'((Id(meshdim)+Grad_u)*(Saint_Venant_Kirchhoff_sigma(Grad_u,params))):Grad_Test_u');
+%      
'((Id(meshdim)+Grad_u)*(Saint_Venant_Kirchhoff_PK2(Grad_u,params))):Grad_Test_u');
 
     
 if (incompressible)
@@ -209,9 +209,9 @@ for step=1:nbstep,
     % sigma = gf_model_get(md, 'compute second Piola Kirchhoff tensor', 'u', 
lawname, 'params', mfdu);
     
     % Direct interpolation of the Von Mises stress
-    % VM = gf_model_get(md, 'interpolation', 
'(sqrt(3/2)/Det(Id(meshdim)+Grad_u))*Norm((Id(meshdim)+Grad_u)*Saint_Venant_Kirchhoff_sigma(Grad_u,params)*(Id(meshdim)+Grad_u'')
 - 
Id(meshdim)*Trace((Id(meshdim)+Grad_u)*Saint_Venant_Kirchhoff_sigma(Grad_u,params)*(Id(meshdim)+Grad_u''))/meshdim)',
 mfdu);
-    % VM = gf_model_get(md, 'interpolation', 
'(sqrt(3/2)/Det(Id(meshdim)+Grad_u))*Norm(Deviator((Id(meshdim)+Grad_u)*Saint_Venant_Kirchhoff_sigma(Grad_u,params)*(Id(meshdim)+Grad_u'')))',
 mfdu);
-    % VM = gf_model_get(md, 'interpolation', 
'sqrt(3/2)*Norm(Deviator(Cauchy_stress_from_PK2(Saint_Venant_Kirchhoff_sigma(Grad_u,params),Grad_u)))',
 mfdu);
+    % VM = gf_model_get(md, 'interpolation', 
'(sqrt(3/2)/Det(Id(meshdim)+Grad_u))*Norm((Id(meshdim)+Grad_u)*Saint_Venant_Kirchhoff_PK2(Grad_u,params)*(Id(meshdim)+Grad_u'')
 - 
Id(meshdim)*Trace((Id(meshdim)+Grad_u)*Saint_Venant_Kirchhoff_PK2(Grad_u,params)*(Id(meshdim)+Grad_u''))/meshdim)',
 mfdu);
+    % VM = gf_model_get(md, 'interpolation', 
'(sqrt(3/2)/Det(Id(meshdim)+Grad_u))*Norm(Deviator((Id(meshdim)+Grad_u)*Saint_Venant_Kirchhoff_PK2(Grad_u,params)*(Id(meshdim)+Grad_u'')))',
 mfdu);
+    % VM = gf_model_get(md, 'interpolation', 
'sqrt(3/2)*Norm(Deviator(Cauchy_stress_from_PK2(Saint_Venant_Kirchhoff_PK2(Grad_u,params),Grad_u)))',
 mfdu);
     VM = gf_model_get(md, 'compute finite strain elasticity Von Mises', 
lawname, 'u', 'params', mfdu);
     % norm(VM-VM0)
     
diff --git a/interface/tests/python/demo_nonlinear_elasticity.py 
b/interface/tests/python/demo_nonlinear_elasticity.py
index b149050..82ccf94 100644
--- a/interface/tests/python/demo_nonlinear_elasticity.py
+++ b/interface/tests/python/demo_nonlinear_elasticity.py
@@ -211,7 +211,7 @@ for step in range(1,nbstep+1):
     VM0 = md.compute_Von_Mises_or_Tresca('u', lawname, 'params', mfdu)
 
     # Direct interpolation of the Von Mises stress
-    # VM = 
md.interpolation('(sqrt(3/2)/Det(Id(meshdim)+Grad_u))*Norm((Id(meshdim)+Grad_u)*Saint_Venant_Kirchhoff_sigma(Grad_u,params)*(Id(meshdim)+Grad_u'')
 - 
Id(meshdim)*Trace((Id(meshdim)+Grad_u)*Saint_Venant_Kirchhoff_sigma(Grad_u,params)*(Id(meshdim)+Grad_u''))/meshdim)',
 mfdu);
+    # VM = 
md.interpolation('(sqrt(3/2)/Det(Id(meshdim)+Grad_u))*Norm((Id(meshdim)+Grad_u)*Saint_Venant_Kirchhoff_PK2(Grad_u,params)*(Id(meshdim)+Grad_u'')
 - 
Id(meshdim)*Trace((Id(meshdim)+Grad_u)*Saint_Venant_Kirchhoff_PK2(Grad_u,params)*(Id(meshdim)+Grad_u''))/meshdim)',
 mfdu);
 
     VM = md.compute_finite_strain_elasticity_Von_Mises(lawname, 'u', 'params', 
mfdu)
     print(npla.norm(VM-VM0))
diff --git a/src/getfem_nonlinear_elasticity.cc 
b/src/getfem_nonlinear_elasticity.cc
index b5b8baa..3542e57 100644
--- a/src/getfem_nonlinear_elasticity.cc
+++ b/src/getfem_nonlinear_elasticity.cc
@@ -2045,6 +2045,9 @@ namespace getfem {
       ("Saint_Venant_Kirchhoff_sigma",
        std::make_shared<Saint_Venant_Kirchhoff_sigma>());
     PREDEF_OPERATORS.add_method
+      ("Saint_Venant_Kirchhoff_PK2",
+       std::make_shared<Saint_Venant_Kirchhoff_sigma>());
+    PREDEF_OPERATORS.add_method
       ("Saint_Venant_Kirchhoff_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<SaintVenant_Kirchhoff_hyperelastic_law>()));
@@ -2052,6 +2055,9 @@ namespace getfem {
       ("Plane_Strain_Saint_Venant_Kirchhoff_sigma",
        std::make_shared<Saint_Venant_Kirchhoff_sigma>());
     PREDEF_OPERATORS.add_method
+      ("Plane_Strain_Saint_Venant_Kirchhoff_PK2",
+       std::make_shared<Saint_Venant_Kirchhoff_sigma>());
+    PREDEF_OPERATORS.add_method
       ("Plane_Strain_Saint_Venant_Kirchhoff_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<SaintVenant_Kirchhoff_hyperelastic_law>()));
@@ -2061,7 +2067,10 @@ namespace getfem {
     PREDEF_OPERATORS.add_method
       ("Generalized_Blatz_Ko_sigma",
        std::make_shared<AHL_wrapper_sigma>(gbklaw));
-    PREDEF_OPERATORS.add_method
+     PREDEF_OPERATORS.add_method
+      ("Generalized_Blatz_Ko_PK2",
+       std::make_shared<AHL_wrapper_sigma>(gbklaw));
+   PREDEF_OPERATORS.add_method
       ("Generalized_Blatz_Ko_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<generalized_Blatz_Ko_hyperelastic_law>()));
@@ -2070,6 +2079,10 @@ namespace getfem {
        std::make_shared<AHL_wrapper_sigma>
        (std::make_shared<plane_strain_hyperelastic_law>(gbklaw)));
     PREDEF_OPERATORS.add_method
+      ("Plane_Strain_Generalized_Blatz_Ko_PK2",
+       std::make_shared<AHL_wrapper_sigma>
+       (std::make_shared<plane_strain_hyperelastic_law>(gbklaw)));
+    PREDEF_OPERATORS.add_method
       ("Plane_Strain_Generalized_Blatz_Ko_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<plane_strain_hyperelastic_law>(gbklaw)));
@@ -2077,6 +2090,8 @@ namespace getfem {
     phyperelastic_law cigelaw
       = std::make_shared<Ciarlet_Geymonat_hyperelastic_law>();
     PREDEF_OPERATORS.add_method
+      ("Ciarlet_Geymonat_PK2", std::make_shared<AHL_wrapper_sigma>(cigelaw));
+    PREDEF_OPERATORS.add_method
       ("Ciarlet_Geymonat_sigma", std::make_shared<AHL_wrapper_sigma>(cigelaw));
     PREDEF_OPERATORS.add_method
       ("Ciarlet_Geymonat_potential",
@@ -2087,6 +2102,10 @@ namespace getfem {
        std::make_shared<AHL_wrapper_sigma>
        (std::make_shared<plane_strain_hyperelastic_law>(cigelaw)));
     PREDEF_OPERATORS.add_method
+      ("Plane_Strain_Ciarlet_Geymonat_PK2",
+       std::make_shared<AHL_wrapper_sigma>
+       (std::make_shared<plane_strain_hyperelastic_law>(cigelaw)));
+    PREDEF_OPERATORS.add_method
       ("Plane_Strain_Ciarlet_Geymonat_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<plane_strain_hyperelastic_law>(cigelaw)));
@@ -2097,10 +2116,17 @@ namespace getfem {
       ("Incompressible_Mooney_Rivlin_sigma",
        std::make_shared<AHL_wrapper_sigma>(morilaw));
     PREDEF_OPERATORS.add_method
+      ("Incompressible_Mooney_Rivlin_PK2",
+       std::make_shared<AHL_wrapper_sigma>(morilaw));
+    PREDEF_OPERATORS.add_method
       ("Incompressible_Mooney_Rivlin_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<Mooney_Rivlin_hyperelastic_law>()));
     PREDEF_OPERATORS.add_method
+      ("Plane_Strain_Incompressible_Mooney_Rivlin_PK2",
+       std::make_shared<AHL_wrapper_sigma>
+       (std::make_shared<plane_strain_hyperelastic_law>(morilaw)));
+    PREDEF_OPERATORS.add_method
       ("Plane_Strain_Incompressible_Mooney_Rivlin_sigma",
        std::make_shared<AHL_wrapper_sigma>
        (std::make_shared<plane_strain_hyperelastic_law>(morilaw)));
@@ -2115,10 +2141,17 @@ namespace getfem {
       ("Compressible_Mooney_Rivlin_sigma",
        std::make_shared<AHL_wrapper_sigma>(cmorilaw));
     PREDEF_OPERATORS.add_method
+      ("Compressible_Mooney_Rivlin_PK2",
+       std::make_shared<AHL_wrapper_sigma>(cmorilaw));
+    PREDEF_OPERATORS.add_method
       ("Compressible_Mooney_Rivlin_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<Mooney_Rivlin_hyperelastic_law>(true)));
     PREDEF_OPERATORS.add_method
+      ("Plane_Strain_Compressible_Mooney_Rivlin_PK2",
+       std::make_shared<AHL_wrapper_sigma>
+       (std::make_shared<plane_strain_hyperelastic_law>(cmorilaw)));
+    PREDEF_OPERATORS.add_method
       ("Plane_Strain_Compressible_Mooney_Rivlin_sigma",
        std::make_shared<AHL_wrapper_sigma>
        (std::make_shared<plane_strain_hyperelastic_law>(cmorilaw)));
@@ -2133,6 +2166,9 @@ namespace getfem {
       ("Incompressible_Neo_Hookean_sigma",
        std::make_shared<AHL_wrapper_sigma>(ineolaw));
     PREDEF_OPERATORS.add_method
+      ("Incompressible_Neo_Hookean_PK2",
+       std::make_shared<AHL_wrapper_sigma>(ineolaw));
+    PREDEF_OPERATORS.add_method
       ("Incompressible_Neo_Hookean_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<Mooney_Rivlin_hyperelastic_law>(false,true)));
@@ -2141,6 +2177,10 @@ namespace getfem {
        std::make_shared<AHL_wrapper_sigma>
        (std::make_shared<plane_strain_hyperelastic_law>(ineolaw)));
     PREDEF_OPERATORS.add_method
+      ("Plane_Strain_Incompressible_Neo_Hookean_PK2",
+       std::make_shared<AHL_wrapper_sigma>
+       (std::make_shared<plane_strain_hyperelastic_law>(ineolaw)));
+    PREDEF_OPERATORS.add_method
       ("Plane_Strain_Incompressible_Neo_Hookean_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<plane_strain_hyperelastic_law>(ineolaw)));
@@ -2151,6 +2191,9 @@ namespace getfem {
       ("Compressible_Neo_Hookean_sigma",
        std::make_shared<AHL_wrapper_sigma>(cneolaw));
     PREDEF_OPERATORS.add_method
+      ("Compressible_Neo_Hookean_PK2",
+       std::make_shared<AHL_wrapper_sigma>(cneolaw));
+    PREDEF_OPERATORS.add_method
       ("Compressible_Neo_Hookean_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<Mooney_Rivlin_hyperelastic_law>(true,true)));
@@ -2159,6 +2202,10 @@ namespace getfem {
        std::make_shared<AHL_wrapper_sigma>
        (std::make_shared<plane_strain_hyperelastic_law>(cneolaw)));
     PREDEF_OPERATORS.add_method
+      ("Plane_Strain_Compressible_Neo_Hookean_PK2",
+       std::make_shared<AHL_wrapper_sigma>
+       (std::make_shared<plane_strain_hyperelastic_law>(cneolaw)));
+    PREDEF_OPERATORS.add_method
       ("Plane_Strain_Compressible_Neo_Hookean_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<plane_strain_hyperelastic_law>(cneolaw)));
@@ -2169,6 +2216,9 @@ namespace getfem {
       ("Compressible_Neo_Hookean_Bonet_sigma",
        std::make_shared<AHL_wrapper_sigma>(cneobolaw));
     PREDEF_OPERATORS.add_method
+      ("Compressible_Neo_Hookean_Bonet_PK2",
+       std::make_shared<AHL_wrapper_sigma>(cneobolaw));
+    PREDEF_OPERATORS.add_method
       ("Compressible_Neo_Hookean_Bonet_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<Neo_Hookean_hyperelastic_law>(true)));
@@ -2177,6 +2227,10 @@ namespace getfem {
        std::make_shared<AHL_wrapper_sigma>
        (std::make_shared<plane_strain_hyperelastic_law>(cneobolaw)));
     PREDEF_OPERATORS.add_method
+      ("Plane_Strain_Compressible_Neo_Hookean_Bonet_PK2",
+       std::make_shared<AHL_wrapper_sigma>
+       (std::make_shared<plane_strain_hyperelastic_law>(cneobolaw)));
+    PREDEF_OPERATORS.add_method
       ("Plane_Strain_Compressible_Neo_Hookean_Bonet_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<plane_strain_hyperelastic_law>(cneobolaw)));
@@ -2187,6 +2241,9 @@ namespace getfem {
       ("Compressible_Neo_Hookean_Ciarlet_sigma",
        std::make_shared<AHL_wrapper_sigma>(cneocilaw));
     PREDEF_OPERATORS.add_method
+      ("Compressible_Neo_Hookean_Ciarlet_PK2",
+       std::make_shared<AHL_wrapper_sigma>(cneocilaw));
+    PREDEF_OPERATORS.add_method
       ("Compressible_Neo_Hookean_Ciarlet_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<Neo_Hookean_hyperelastic_law>(false)));
@@ -2195,6 +2252,10 @@ namespace getfem {
        std::make_shared<AHL_wrapper_sigma>
        (std::make_shared<plane_strain_hyperelastic_law>(cneocilaw)));
     PREDEF_OPERATORS.add_method
+      ("Plane_Strain_Compressible_Neo_Hookean_Ciarlet_PK2",
+       std::make_shared<AHL_wrapper_sigma>
+       (std::make_shared<plane_strain_hyperelastic_law>(cneocilaw)));
+    PREDEF_OPERATORS.add_method
       ("Plane_Strain_Compressible_Neo_Hookean_Ciarlet_potential",
        std::make_shared<AHL_wrapper_potential>
        (std::make_shared<plane_strain_hyperelastic_law>(cneocilaw)));
@@ -2257,7 +2318,7 @@ namespace getfem {
     std::string adapted_lawname = adapt_law_name(lawname, N);
 
     std::string expr = "((Id(meshdim)+Grad_"+varname+")*(" + adapted_lawname
-      + "_sigma(Grad_"+varname+","+params+"))):Grad_" + test_varname;
+      + "_PK2(Grad_"+varname+","+params+"))):Grad_" + test_varname;
 
     return add_nonlinear_generic_assembly_brick
       (md, mim, expr, region, true, false,
@@ -2289,7 +2350,7 @@ namespace getfem {
     std::string adapted_lawname = adapt_law_name(lawname, N);
 
     std::string expr = "sqrt(3/2)*Norm(Deviator(Cauchy_stress_from_PK2("
-      + adapted_lawname + "_sigma(Grad_" + varname + "," + params + "),Grad_"
+      + adapted_lawname + "_PK2(Grad_" + varname + "," + params + "),Grad_"
       + varname + ")))";
     ga_interpolation_Lagrange_fem(md, expr, mf_vm, VM, rg);
   }



reply via email to

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