Skip to content
Snippets Groups Projects
Commit 2b3cbb61 authored by Van Dung NGUYEN's avatar Van Dung NGUYEN
Browse files

add fraction tolerance

parent 93d2637b
Branches
Tags
1 merge request!309Master
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment