From bf69fa970fffdc3fbd821c01f40416882a69e5d7 Mon Sep 17 00:00:00 2001
From: noels <l.noels@ulg.ac.be>
Date: Thu, 5 Nov 2020 20:23:12 +0100
Subject: [PATCH] add P = sig in export

---
 .../internalPoints/ipNonLocalDamage.cpp       | 20 ++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/NonLinearSolver/internalPoints/ipNonLocalDamage.cpp b/NonLinearSolver/internalPoints/ipNonLocalDamage.cpp
index 97e9e4f9b..2e891aef8 100644
--- a/NonLinearSolver/internalPoints/ipNonLocalDamage.cpp
+++ b/NonLinearSolver/internalPoints/ipNonLocalDamage.cpp
@@ -34,12 +34,18 @@ double IPNonLocalDamage::get(int comp) const
  // if(comp == IPField::SIG_YY) return euler[1];
  // if(comp == IPField::SIG_ZZ) return euler[2];
 
-  if(comp >= IPField::SIG_XX and comp<=IPField::SIG_XY )
-	  return _nldStress(comp-1);
-  else if(comp==IPField::SIG_XZ) // order xx yy zz xy xz yz
-	  return _nldStress(comp-2);
-  else if(comp==IPField::SIG_YZ)
-	  return _nldStress(comp);
+  if(comp == IPField::SIG_XX || comp == IPField::P_XX)
+	  return _nldStress(0);
+  else if(comp == IPField::SIG_YY || comp == IPField::P_YY)
+	  return _nldStress(1);
+  else if(comp == IPField::SIG_ZZ || comp == IPField::P_ZZ)
+	  return _nldStress(2);	  
+  else if(comp==IPField::SIG_XY || comp == IPField::P_XY || comp == IPField::P_YX) // order xx yy zz xy xz yz
+	  return _nldStress(3);
+  else if(comp==IPField::SIG_XZ || comp == IPField::P_XZ || comp == IPField::P_ZX) // order xx yy zz xy xz yz
+	  return _nldStress(4);
+  else if(comp==IPField::SIG_YZ || comp == IPField::P_YZ || comp == IPField::P_YZ) // order xx yy zz xy xz yz
+	  return _nldStress(5);
   else if(comp == IPField::SVM) // von Mises
   {
 
@@ -173,7 +179,7 @@ double IPNonLocalDamage::get(int comp) const
   }
   else
      return 0.;
-
+  return 0.;
 }
 
 void IPNonLocalDamage::restart()
-- 
GitLab