From 0b6459287bd520cee6b9ae628d304eb99b03fecc Mon Sep 17 00:00:00 2001 From: cyrielle <l.noels@ulg.ac.be> Date: Mon, 26 May 2025 17:24:20 +0200 Subject: [PATCH] subStepping in non local law with RNN --- dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp | 123 ++++++++++++++++----- dG3D/src/nonLocalDamageDG3DMaterialLaw.h | 4 +- 2 files changed, 99 insertions(+), 28 deletions(-) diff --git a/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp b/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp index c3d19891b..8f1c9da44 100644 --- a/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp +++ b/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp @@ -2560,7 +2560,7 @@ NonlocalDamageTorchANNBasedDG3DMaterialLaw::NonlocalDamageTorchANNBasedDG3DMater _SZXmean(SZXmean), _SZXstd(SZXstd), _elTangCompxxxxmean(elTangCompxxxxmean), _elTangCompxxxxstd(elTangCompxxxxstd), _elTangCompyyxxmean(elTangCompyyxxmean), _elTangCompyyxxstd(elTangCompyyxxstd), _elTangCompzzxxmean(elTangCompzzxxmean), _elTangCompzzxxstd(elTangCompzzxxstd), _elTangCompxyxymean(elTangCompxyxymean), _elTangCompxyxystd(elTangCompxyxystd), _elTangCompxzxzmean(elTangCompxzxzmean), _elTangCompxzxzstd(elTangCompxzxzstd), _elTangCompyyyymean(elTangCompyyyymean), _elTangCompyyyystd(elTangCompyyyystd), _elTangCompzzyymean(elTangCompzzyymean), _elTangCompzzyystd(elTangCompzzyystd), _elTangCompyzyzmean(elTangCompyzyzmean), _elTangCompyzyzstd(elTangCompyzyzstd), _elTangCompzzzzmean(elTangCompzzzzmean), _elTangCompzzzzstd(elTangCompzzzzstd), _NonDamTangCompxxxxmean(NonDamTangCompxxxxmean), _NonDamTangCompxxxxstd(NonDamTangCompxxxxstd), _NonDamTangCompyyxxmean(NonDamTangCompyyxxmean), _NonDamTangCompyyxxstd(NonDamTangCompyyxxstd), _NonDamTangCompzzxxmean(NonDamTangCompzzxxmean), _NonDamTangCompzzxxstd(NonDamTangCompzzxxstd), _NonDamTangCompxyxymean(NonDamTangCompxyxymean), _NonDamTangCompxyxystd(NonDamTangCompxyxystd), _NonDamTangCompxzxzmean(NonDamTangCompxzxzmean), _NonDamTangCompxzxzstd(NonDamTangCompxzxzstd), _NonDamTangCompyyyymean(NonDamTangCompyyyymean), _NonDamTangCompyyyystd(NonDamTangCompyyyystd), _NonDamTangCompzzyymean(NonDamTangCompzzyymean), _NonDamTangCompzzyystd(NonDamTangCompzzyystd), _NonDamTangCompyzyzmean(NonDamTangCompyzyzmean), _NonDamTangCompyzyzstd(NonDamTangCompyzyzstd), _NonDamTangCompzzzzmean(NonDamTangCompzzzzmean), _NonDamTangCompzzzzstd(NonDamTangCompzzzzstd), - _tangentByPerturbation(pert), _pertTol(tol), _kinematicInput(EGL),_NeedExtraNorm(false),_DoubleInput(false),_RNN(true),_Ie00(1), _Ie01(1), _Ie02(1), _Ie11(1), _Ie12(1), _Ie22(1), _Id0000(1), _Id0100(1), _Id0200(1), _Id1100(1), _Id1200(1), _Id2200(1), _Id0101(1), _Id0201(1), _Id1101(1), _Id1201(1), _Id2201(1), _Id0202(1), _Id1102(1), _Id1202(1), _Id2202(1), _Id1111(1), _Id1211(1), _Id2211(1), _Id1212(1), _Id2212(1), _Id2222(1) + _tangentByPerturbation(pert), _pertTol(tol), _kinematicInput(EGL),_NeedExtraNorm(false),_DoubleInput(false),_RNN(true),_Ie00(1), _Ie01(1), _Ie02(1), _Ie11(1), _Ie12(1), _Ie22(1), _Id0000(1), _Id0100(1), _Id0200(1), _Id1100(1), _Id1200(1), _Id2200(1), _Id0101(1), _Id0201(1), _Id1101(1), _Id1201(1), _Id2201(1), _Id0202(1), _Id1102(1), _Id1202(1), _Id2202(1), _Id1111(1), _Id1211(1), _Id2211(1), _Id1212(1), _Id2212(1), _Id2222(1), _incrlimit(0.0004) { _mecalocalLaw = NULL; cLLaw.resize(_numNonlocalVar); @@ -2653,7 +2653,7 @@ NonlocalDamageTorchANNBasedDG3DMaterialLaw::NonlocalDamageTorchANNBasedDG3DMater _SYZmean(src._SYZmean), _SYZstd(src._SYZstd), _SZZmean(src._SZZmean), _SZZstd(src._SZZstd), _SZXmean(src._SZXmean), _SZXstd(src._SZXstd), _elTangCompxxxxmean(src._elTangCompxxxxmean), _elTangCompxxxxstd(src._elTangCompxxxxstd), _elTangCompyyxxmean(src._elTangCompyyxxmean), _elTangCompyyxxstd(src._elTangCompyyxxstd), _elTangCompzzxxmean(src._elTangCompzzxxmean), _elTangCompzzxxstd(src._elTangCompzzxxstd), _elTangCompxyxymean(src._elTangCompxyxymean), _elTangCompxyxystd(src._elTangCompxyxystd), _elTangCompxzxzmean(src._elTangCompxzxzmean), _elTangCompxzxzstd(src._elTangCompxzxzstd), _elTangCompyyyymean(src._elTangCompyyyymean), _elTangCompyyyystd(src._elTangCompyyyystd), _elTangCompzzyymean(src._elTangCompzzyymean), _elTangCompzzyystd(src._elTangCompzzyystd), _elTangCompyzyzmean(src._elTangCompyzyzmean), _elTangCompyzyzstd(src._elTangCompyzyzstd), _elTangCompzzzzmean(src._elTangCompzzzzmean), _elTangCompzzzzstd(src._elTangCompzzzzstd), _NonDamTangCompxxxxmean(src._NonDamTangCompxxxxmean), _NonDamTangCompxxxxstd(src._NonDamTangCompxxxxstd), _NonDamTangCompyyxxmean(src._NonDamTangCompyyxxmean), _NonDamTangCompyyxxstd(src._NonDamTangCompyyxxstd), _NonDamTangCompzzxxmean(src._NonDamTangCompzzxxmean), _NonDamTangCompzzxxstd(src._NonDamTangCompzzxxstd), _NonDamTangCompxyxymean(src._NonDamTangCompxyxymean), _NonDamTangCompxyxystd(src._NonDamTangCompxyxystd), _NonDamTangCompxzxzmean(src._NonDamTangCompxzxzmean), _NonDamTangCompxzxzstd(src._NonDamTangCompxzxzstd), _NonDamTangCompyyyymean(src._NonDamTangCompyyyymean), _NonDamTangCompyyyystd(src._NonDamTangCompyyyystd), _NonDamTangCompzzyymean(src._NonDamTangCompzzyymean), _NonDamTangCompzzyystd(src._NonDamTangCompzzyystd), _NonDamTangCompyzyzmean(src._NonDamTangCompyzyzmean), _NonDamTangCompyzyzstd(src._NonDamTangCompyzyzstd), _NonDamTangCompzzzzmean(src._NonDamTangCompzzzzmean), _NonDamTangCompzzzzstd(src._NonDamTangCompzzzzstd), - _tangentByPerturbation(src._tangentByPerturbation),_pertTol(src._pertTol), _kinematicInput(src._kinematicInput),_NeedExtraNorm(src._NeedExtraNorm),_DoubleInput(src._DoubleInput), _mecalocalLaw(NULL), _RNN(src._RNN),_Ie00(src._Ie00), _Ie01(src._Ie01), _Ie02(src._Ie02), _Ie11(src._Ie11), _Ie12(src._Ie12), _Ie22(src._Ie22), _Id0000(src._Id0000), _Id0100(src._Id0100), _Id0200(src._Id0200), _Id1100(src._Id1100), _Id1200(src._Id1200), _Id2200(src._Id2200), _Id0101(src._Id0101), _Id0201(src._Id0201), _Id1101(src._Id1101), _Id1201(src._Id1201), _Id2201(src._Id2201), _Id0202(src._Id0202), _Id1102(src._Id1102), _Id1202(src._Id1202), _Id2202(src._Id2202), _Id1111(src._Id1111), _Id1211(src._Id1211), _Id2211(src._Id2211), _Id1212(src._Id1212), _Id2212(src._Id2212), _Id2222(src._Id2222) + _tangentByPerturbation(src._tangentByPerturbation),_pertTol(src._pertTol), _kinematicInput(src._kinematicInput),_NeedExtraNorm(src._NeedExtraNorm),_DoubleInput(src._DoubleInput), _mecalocalLaw(NULL), _RNN(src._RNN),_Ie00(src._Ie00), _Ie01(src._Ie01), _Ie02(src._Ie02), _Ie11(src._Ie11), _Ie12(src._Ie12), _Ie22(src._Ie22), _Id0000(src._Id0000), _Id0100(src._Id0100), _Id0200(src._Id0200), _Id1100(src._Id1100), _Id1200(src._Id1200), _Id2200(src._Id2200), _Id0101(src._Id0101), _Id0201(src._Id0201), _Id1101(src._Id1101), _Id1201(src._Id1201), _Id2201(src._Id2201), _Id0202(src._Id0202), _Id1102(src._Id1102), _Id1202(src._Id1202), _Id2202(src._Id2202), _Id1111(src._Id1111), _Id1211(src._Id1211), _Id2211(src._Id2211), _Id1212(src._Id1212), _Id2212(src._Id2212), _Id2222(src._Id2222), _incrlimit(src._incrlimit) { #if defined(HAVE_TORCH) module_stress = src.module_stress; @@ -2823,12 +2823,12 @@ void NonlocalDamageTorchANNBasedDG3DMaterialLaw::initLaws(const std::map<int,mat E1Vector_plus_pert1(s) = E1_plus(0,s); } STensorOperation::fromFullVectorToSTensor3(E1Vector_plus_pert1, E1Tensor_plus_pert1); - RNNstress_stiff(E1Tensor, E1Tensor_plus_pert1,h_stress_init, h_stress_tmp, h_elTang_init, h_elTang_tmp, h_NonDamTang_init, h_NonDamTang_tmp, S_plus, NonDamTangPred_plus,elTangPred_plus, D_plus, Eplast_plus,false, DSDE, B0, B1, B2, B3, B4, B5, Eplast_l); + compute_local_values(E1Tensor, E1Tensor_plus_pert1,h_stress_init, h_stress_tmp, h_elTang_init, h_elTang_tmp, h_NonDamTang_init, h_NonDamTang_tmp, S_plus, NonDamTangPred_plus,elTangPred_plus, D_plus, Eplast_plus,false, DSDE, B0, B1, B2, B3, B4, B5, Eplast_l); } } else { - RNNstress_stiff(E1Tensor, E1Tensor, h_stress_init, h_stress_tmp, h_elTang_init, h_elTang_tmp, h_NonDamTang_init, h_NonDamTang_tmp, S,NonDamTangPred,elTangPred,D, Eplast, true, DSDE, B0, B1, B2, B3, B4, B5, Eplast_l); + compute_local_values(E1Tensor, E1Tensor, h_stress_init, h_stress_tmp, h_elTang_init, h_elTang_tmp, h_NonDamTang_init, h_NonDamTang_tmp, S,NonDamTangPred,elTangPred,D, Eplast, true, DSDE, B0, B1, B2, B3, B4, B5, Eplast_l); } _initialized = true; }; @@ -3016,23 +3016,13 @@ void NonlocalDamageTorchANNBasedDG3DMaterialLaw::stress(IPVariable* ipv, const I STensor3 E1Tensor; STensorOperation::fromFullVectorToSTensor3(E1Vector, E1Tensor); - //beginning step -1: we check if the strain increments are below the limit increment that the RNN can handle (below 4e-4 for each component for the specifics RNN we have trained so far, this value could be higher with others trained RNN), for the moment it is done for a 2D RNN with only epsilon_XX, epsilon_YY and epsilon_XY as inputs (added on 21/05/25) - double incr_limit=0.0004; + //beginning step -1: we retrieve the strain increments to visualize them in the msh files and to check if they are not too big for what the RNN can handle, for the moment it is done for a 2D RNN with only epsilon_XX, epsilon_YY and epsilon_XY as inputs (added on 21/05/25) double& dExx=ipvcur->getRefTodExx(); double& dEyy=ipvcur->getRefTodEyy(); double& dExy=ipvcur->getRefTodExy(); - dExx=E1(0,0)-E0(0,0); - dEyy=E1(0,1)-E0(0,1); - dExy=E1(0,3)-E0(0,3); - if (abs(dExx)>incr_limit){ - std::cout << "Warning: beyond the limit increment for epsilon_XX: " << dExx << "\n"; - } - if (abs(dEyy)>incr_limit){ - std::cout << "Warning: beyond the limit increment for epsilon_YY: " << dEyy << "\n"; - } - if (abs(dExy)>incr_limit){ - std::cout << "Warning: beyond the limit increment for epsilon_XY: " << dExy << "\n"; - } + dExx=E1Tensor(0,0)-E0Tensor(0,0); + dEyy=E1Tensor(1,1)-E0Tensor(1,1); + dExy=E1Tensor(0,1)-E0Tensor(0,1); //end step -1 /*if (E1Tensor(0,0)>=0.04){ @@ -3124,7 +3114,7 @@ void NonlocalDamageTorchANNBasedDG3DMaterialLaw::stress(IPVariable* ipv, const I if(_tangentByPerturbation){ //beginning step 3.1: we compute the RNN predictions at this time step and the values deduced by the RNN predictions (local damage D and plastic strain Eplast) - RNNstress_stiff(E0Tensor, E1Tensor, h_stress_0, h_stress_1, h_elTang_0, h_elTang_1, h_NonDamTang_0, h_NonDamTang_1, S,NonDamTangPred,elTangPred, D, Eplast, false, DSDE, B0, B1, B2, B3, B4, B5, Eplast_l); + compute_local_values(E0Tensor, E1Tensor, h_stress_0, h_stress_1, h_elTang_0, h_elTang_1, h_NonDamTang_0, h_NonDamTang_1, S,NonDamTangPred,elTangPred, D, Eplast, false, DSDE, B0, B1, B2, B3, B4, B5, Eplast_l); //to have D always increasing for (int i=0;i<3;i++){ @@ -3186,7 +3176,7 @@ void NonlocalDamageTorchANNBasedDG3DMaterialLaw::stress(IPVariable* ipv, const I E1Tensor_plus(i,j)=0.5*(F_plus(i,j)+Ft_plus(i,j))-I(i,j); } } - RNNstress_stiff(E0Tensor, E1Tensor_plus, h_stress_0, h_stress_tmp, h_elTang_0, h_elTang_tmp, h_NonDamTang_0, h_NonDamTang_tmp, S_plus,NonDamTangPred_plus,elTangPred_plus, D_plus, Eplast_plus, false, DSDE, B0, B1, B2, B3, B4, B5, Eplast_l_plus); + compute_local_values(E0Tensor, E1Tensor_plus, h_stress_0, h_stress_tmp, h_elTang_0, h_elTang_tmp, h_NonDamTang_0, h_NonDamTang_tmp, S_plus,NonDamTangPred_plus,elTangPred_plus, D_plus, Eplast_plus, false, DSDE, B0, B1, B2, B3, B4, B5, Eplast_l_plus); //beginning step 3.3.1: computation of DEplastDE and DEplast_lDE @@ -3279,7 +3269,7 @@ void NonlocalDamageTorchANNBasedDG3DMaterialLaw::stress(IPVariable* ipv, const I //end step 3.3 } }else{ //be careful: it is the differentiation automatic case that does not work for now - RNNstress_stiff(E0Tensor, E1Tensor, h_stress_0, h_stress_1, h_elTang_0, h_elTang_1, h_NonDamTang_0, h_NonDamTang_1, S,NonDamTangPred,elTangPred, D, Eplast, true, DSDE, B0, B1, B2, B3, B4, B5, Eplast_l); + compute_local_values(E0Tensor, E1Tensor, h_stress_0, h_stress_1, h_elTang_0, h_elTang_1, h_NonDamTang_0, h_NonDamTang_1, S,NonDamTangPred,elTangPred, D, Eplast, true, DSDE, B0, B1, B2, B3, B4, B5, Eplast_l); } } //end step 3 @@ -5430,9 +5420,93 @@ void NonlocalDamageTorchANNBasedDG3DMaterialLaw::stress(IPVariable* ipv, const I #if defined(HAVE_TORCH) -void NonlocalDamageTorchANNBasedDG3DMaterialLaw::RNNstress_stiff(const STensor3& E0Tensor, const STensor3& E1Tensor, const torch::Tensor& h_stress_0, torch::Tensor& h_stress_1, const torch::Tensor& h_elTang_0, torch::Tensor& h_elTang_1, const torch::Tensor& h_NonDamTang_0, torch::Tensor& h_NonDamTang_1, STensor3& S, +void NonlocalDamageTorchANNBasedDG3DMaterialLaw::compute_local_values(const STensor3& E0Tensor, const STensor3& E1Tensor, const torch::Tensor& h_stress_0, torch::Tensor& h_stress_1, const torch::Tensor& h_elTang_0, torch::Tensor& h_elTang_1, const torch::Tensor& h_NonDamTang_0, torch::Tensor& h_NonDamTang_1, STensor3& S, STensor43& NonDamTangPred,STensor43& elTangPred, STensor43& D, STensor3& Eplast, const bool stiff, fullMatrix<double>& DSDE, const STensor3& B0, const STensor3& B1, const STensor3& B2, const STensor3& B3, const STensor3& B4, const STensor3& B5, STensor3& Eplast_l) +{ + torch::Tensor h_stress_tmp_0 = h_stress_0; + torch::Tensor h_elTang_tmp_0 = h_elTang_0; + torch::Tensor h_NonDamTang_tmp_0 = h_NonDamTang_0; + + torch::Tensor h_stress_tmp_1 = torch::zeros({1, 1, _numberOfInternalVariables_stress}); + torch::Tensor h_elTang_tmp_1 = torch::zeros({1, 1, _numberOfInternalVariables_elTang}); + torch::Tensor h_NonDamTang_tmp_1 = torch::zeros({1, 1, _numberOfInternalVariables_NonDamTang}); + + STensor3 E_tmp_0 = E0Tensor; + STensor3 E_tmp_1 = E1Tensor; + + STensor3 dE; + for (int i=0;i<3;i++){ + for (int j=0;j<3;j++){ + dE(i,j)=E1Tensor(i,j)-E0Tensor(i,j); + } + } + + //beginning of finding the maximal strain increment + double max_incr=0.; + for (int i=0;i<3;i++){ + for (int j=0;j<3;j++){ + if (abs(dE(i,j))>max_incr){ + max_incr=abs(dE(i,j)); + } + } + } + //end of finding the maximal strain increment + + int nb_substep=ceil(max_incr/_incrlimit); //the number of substeps + + STensor3 dEsubstep; + for (int i=0;i<3;i++){ + for (int j=0;j<3;j++){ + dEsubstep(i,j)=dE(i,j)/nb_substep; + } + } + + for (int s=1;s<nb_substep;s++){ + E_tmp_1 = E_tmp_0+dEsubstep; + RNNstress_stiff(E_tmp_0, E_tmp_1, h_stress_tmp_0, h_stress_tmp_1, h_elTang_tmp_0, h_elTang_tmp_1, h_NonDamTang_tmp_0, h_NonDamTang_tmp_1, S,NonDamTangPred,elTangPred, false, DSDE); + E_tmp_0 = E_tmp_1; + h_stress_tmp_0 = h_stress_tmp_1; + h_elTang_tmp_0 = h_elTang_tmp_1; + h_NonDamTang_tmp_0 = h_NonDamTang_tmp_1; + } + + E_tmp_1 = E1Tensor; + RNNstress_stiff(E_tmp_0, E_tmp_1, h_stress_tmp_0, h_stress_tmp_1, h_elTang_tmp_0, h_elTang_tmp_1, h_NonDamTang_tmp_0, h_NonDamTang_tmp_1, S,NonDamTangPred,elTangPred, false, DSDE); + + h_stress_1 = h_stress_tmp_1; + h_elTang_1 = h_elTang_tmp_1; + h_NonDamTang_1 = h_NonDamTang_tmp_1; + + computation_D(NonDamTangPred, elTangPred, D); //computation of D + computation_Eplast(E1Tensor, S, elTangPred, Eplast); //computation of Eplast + computation_Eplast_l(B0, B1, B2, B3, B4, B5, Eplast, Eplast_l); //computation of Eplast_l +} + + + +void NonlocalDamageTorchANNBasedDG3DMaterialLaw::RNNstress_stiff(const STensor3& E0Tensor, const STensor3& E1Tensor, const torch::Tensor& h_stress_0, torch::Tensor& h_stress_1, const torch::Tensor& h_elTang_0, torch::Tensor& h_elTang_1, const torch::Tensor& h_NonDamTang_0, torch::Tensor& h_NonDamTang_1, STensor3& S, + STensor43& NonDamTangPred,STensor43& elTangPred, const bool stiff, fullMatrix<double>& DSDE) { + + //beginning check strain increments: we check if the strain increments are below the limit increment that the RNN can handle, for the moment it is done for a 2D RNN with only epsilon_XX, epsilon_YY and epsilon_XY as inputs (added on 25/05/25) + //normally with the subStepping, it shouldn't happen + double dExx; + double dEyy; + double dExy; + dExx=E1Tensor(0,0)-E0Tensor(0,0); + dEyy=E1Tensor(1,1)-E0Tensor(1,1); + dExy=E1Tensor(0,1)-E0Tensor(0,1); + if (abs(dExx)>_incrlimit){ + std::cout << "Warning: beyond the limit increment for epsilon_XX: " << dExx << "\n"; + } + if (abs(dEyy)>_incrlimit){ + std::cout << "Warning: beyond the limit increment for epsilon_YY: " << dEyy << "\n"; + } + if (abs(dExy)>_incrlimit){ + std::cout << "Warning: beyond the limit increment for epsilon_XY: " << dExy << "\n"; + } + //end check for strain increments + vector<float> E_vec(_numberOfInput),E0_vec(_numberOfInput); //the current and the previous vectors torch::Tensor E_norm, E0_norm,dE_norm; //the normalized values of E, E0 et de dG (dE_norm) if(!stiff){torch::NoGradGuard no_grad;} @@ -5569,11 +5643,6 @@ void NonlocalDamageTorchANNBasedDG3DMaterialLaw::RNNstress_stiff(const STensor3& h_NonDamTang_1 = outputs_NonDamTang->elements()[1].toTensor(); InverseNormalize_NonDamTang(NonDamTang_norm, NonDamTangPred); - - - computation_D(NonDamTangPred, elTangPred, D); //computation of D - computation_Eplast(E1Tensor, S, elTangPred, Eplast); //computation of Eplast - computation_Eplast_l(B0, B1, B2, B3, B4, B5, Eplast, Eplast_l); //computation of Eplast_l /*if (_RNN) diff --git a/dG3D/src/nonLocalDamageDG3DMaterialLaw.h b/dG3D/src/nonLocalDamageDG3DMaterialLaw.h index 4450c2cab..06a8d460f 100644 --- a/dG3D/src/nonLocalDamageDG3DMaterialLaw.h +++ b/dG3D/src/nonLocalDamageDG3DMaterialLaw.h @@ -912,6 +912,7 @@ class NonlocalDamageTorchANNBasedDG3DMaterialLaw : public dG3DMaterialLaw{ bool _NeedExtraNorm; bool _DoubleInput; int _numNonlocalVar; + double _incrlimit; //the maximal strain increment with which your RNN trained can predict std::vector< CLengthLaw * > cLLaw; materialLaw *_mecalocalLaw; bool _RNN; @@ -1182,8 +1183,9 @@ class NonlocalDamageTorchANNBasedDG3DMaterialLaw : public dG3DMaterialLaw{ void computation_Eplast_l(const STensor3& B0, const STensor3& B1, const STensor3& B2, const STensor3& B3, const STensor3& B4, const STensor3& B5, const STensor3& Eplast, STensor3& Eplast_l); void computation_D_l(const STensor43& A0, const STensor43& A1, const STensor43& A2, const STensor43& A3, const STensor43& A4, const STensor43& A5, const STensor43& A6, const STensor43& A7, const STensor43& A8, const STensor43& A9, const STensor43& A10, const STensor43& A11, const STensor43& A12, const STensor43& A13, const STensor43& A14, const STensor43& A15, const STensor43& A16, const STensor43& A17, const STensor43& A18, const STensor43& A19, const STensor43& A20, const STensor43& D, STensor43& D_l); void computation_D_nl__Eplast_nl(const STensor43& A0, const STensor43& A1, const STensor43& A2, const STensor43& A3, const STensor43& A4, const STensor43& A5, const STensor43& A6, const STensor43& A7, const STensor43& A8, const STensor43& A9, const STensor43& A10, const STensor43& A11, const STensor43& A12, const STensor43& A13, const STensor43& A14, const STensor43& A15, const STensor43& A16, const STensor43& A17, const STensor43& A18, const STensor43& A19, const STensor43& A20, const STensor3& B0, const STensor3& B1, const STensor3& B2, const STensor3& B3, const STensor3& B4, const STensor3& B5, const STensor43& D, const STensor3& Eplast, STensor3& Eplast_nl, STensor43& D_nl, nonLocalDamageTorchANNDG3DIPVariableDG3DIPVariable* ipvcur); - void RNNstress_stiff(const STensor3& E0Tensor, const STensor3& E1Tensor, const torch::Tensor& h_stress_0, torch::Tensor& h_stress_1, const torch::Tensor& h_elTang_0, torch::Tensor& h_elTang_1, const torch::Tensor& h_NonDamTang_0, torch::Tensor& h_NonDamTang_1, STensor3& S, + void compute_local_values(const STensor3& E0Tensor, const STensor3& E1Tensor, const torch::Tensor& h_stress_0, torch::Tensor& h_stress_1, const torch::Tensor& h_elTang_0, torch::Tensor& h_elTang_1, const torch::Tensor& h_NonDamTang_0, torch::Tensor& h_NonDamTang_1, STensor3& S, STensor43& NonDamTangPred,STensor43& elTangPred, STensor43& D, STensor3& Eplast, const bool stiff, fullMatrix<double>& DSDE, const STensor3& B0, const STensor3& B1, const STensor3& B2, const STensor3& B3, const STensor3& B4, const STensor3& B5, STensor3& Eplast_l); + void RNNstress_stiff(const STensor3& E0Tensor, const STensor3& E1Tensor, const torch::Tensor& h_stress_0, torch::Tensor& h_stress_1, const torch::Tensor& h_elTang_0, torch::Tensor& h_elTang_1, const torch::Tensor& h_NonDamTang_0, torch::Tensor& h_NonDamTang_1, STensor3& S, STensor43& NonDamTangPred,STensor43& elTangPred, const bool stiff, fullMatrix<double>& DSDE); //the function in whichn we compute the values predicted by RNN #endif #endif //SWIG -- GitLab