diff --git a/NonLinearSolver/modelReduction/DeepMaterialNetworks.cpp b/NonLinearSolver/modelReduction/DeepMaterialNetworks.cpp index 07fbc4265ce7d72423706d7cd8549eac24c5aecd..27d6a83bf22fe7872d8c83f79f2b53fb5cbc2de4 100644 --- a/NonLinearSolver/modelReduction/DeepMaterialNetworks.cpp +++ b/NonLinearSolver/modelReduction/DeepMaterialNetworks.cpp @@ -722,7 +722,8 @@ void BimaterialHomogenization::computeBimaterial(const fullMatrix<double>& C1, c fullMatrix<double>* DCeffDnormal1,fullMatrix<double>* DCeffDnormal2, fullMatrix<double>* DCeffDnormal3) const { double tol = 1e-10; - if (C1.norm() < tol*C2.norm()) + double tolF = 1e-6; + if ((C1.norm() < tol*C2.norm()) || (f1 < tolF*f2)) { // C1 is void Ceff = C2; @@ -743,7 +744,7 @@ void BimaterialHomogenization::computeBimaterial(const fullMatrix<double>& C1, c fullMatrixOperation::allocateAndMakeZero(*DCeffDnormal3,Ceff.size1(),Ceff.size2()); }; } - else if (C2.norm() < tol*C1.norm()) + else if ((C2.norm() < tol*C1.norm()) || (f2 < tolF*f1)) { Ceff = C1; Ceff.scale(f1);