From 855e15c42a584dc7eb6937a73ac396a00f161fd0 Mon Sep 17 00:00:00 2001 From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be> Date: Thu, 23 Aug 2012 20:20:58 +0000 Subject: [PATCH] I did that commit because without it, the solver crashes : I initialize the partition to 1. In Blasius 2D , we control the number of elements. --- Mesh/meshMetric.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mesh/meshMetric.cpp b/Mesh/meshMetric.cpp index 59de16224e..75abd747e7 100644 --- a/Mesh/meshMetric.cpp +++ b/Mesh/meshMetric.cpp @@ -692,7 +692,7 @@ void meshMetric::scaleMetric( int nbElementsTarget, m.eig(V,S); S(0) = std::min(std::max(S(0),1/(hmax*hmax)),1/(hmin*hmin)); S(1) = std::min(std::max(S(1),1/(hmax*hmax)),1/(hmin*hmin)); - S(2) = std::min(std::max(S(2),1/(hmax*hmax)),1/(hmin*hmin)); + if (_dim == 3)S(2) = std::min(std::max(S(2),1/(hmax*hmax)),1/(hmin*hmin)); SVector3 t1 (V(0,0),V(1,0),V(2,0)); SVector3 t2 (V(0,1),V(1,1),V(2,1)); SVector3 t3 (V(0,2),V(1,2),V(2,2)); -- GitLab