From 7e5ce140633e9ade3d39978a3ee861cd1f7b6cff Mon Sep 17 00:00:00 2001 From: Emilie Marchandise <emilie.marchandise@uclouvain.be> Date: Wed, 20 Jun 2012 17:41:30 +0000 Subject: [PATCH] corrected previous commit on centrelines --- Mesh/CenterlineField.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Mesh/CenterlineField.cpp b/Mesh/CenterlineField.cpp index 8bb92f1ca0..63ccf47137 100644 --- a/Mesh/CenterlineField.cpp +++ b/Mesh/CenterlineField.cpp @@ -1215,7 +1215,7 @@ void Centerline::operator() (double x, double y, double z, SMetric3 &metr, GEnt double rho = radMax; double hwall_n = thickness/20.; double hwall_t = 2*M_PI*rho/nbPoints; - double hfar = radMax/8.; + double hfar = radMax/4.; double lc_a = 3.*hwall_t; //dir_a = direction along the centerline @@ -1240,7 +1240,7 @@ void Centerline::operator() (double x, double y, double z, SMetric3 &metr, GEnt lc_t = std::min(lc_t, CTX::instance()->mesh.lcMax); //curvature metric - SMetric3 curvMetric; + SMetric3 curvMetric, curvMetric1, curvMetric2; if (ds <= thickness){ metr = metricBasedOnSurfaceCurvature(dMin, dMax, cMin, cMax, radMax, beta, lc_n, lc_t, hwall_t); @@ -1248,11 +1248,14 @@ void Centerline::operator() (double x, double y, double z, SMetric3 &metr, GEnt else if (ds > thickness && onInOutlets){ metr = buildMetricTangentToCurve(dir_n,lc_n,lc_t); } - else if (ds > thickness && onInOutlets){ + else if (ds > thickness && !onInOutlets){ + //metr = buildMetricTangentToCurve(dir_n,lc_n,lc_t); //curvMetric = metricBasedOnSurfaceCurvature(dMin, dMax, cMin, cMax, radMax, beta, lc_n, lc_t, hwall_t); - curvMetric = buildMetricTangentToCurve(dir_n,lc_n,lc_n); //lc_t - //metr = SMetric3(1./(lc_a*lc_a), 1./(lc_n*lc_n),1./(lc_n*lc_n), dir_a, dir_a1, dir_a2); - metr = SMetric3(1./(lc_a*lc_a), 1./(lc_n*lc_n), 1./(lc_n*lc_n), dir_a, dir_n, dir_cross); + curvMetric1 = buildMetricTangentToCurve(dir_n,lc_n,lc_a); //lc_t + curvMetric2 = buildMetricTangentToCurve(dir_cross,lc_t,lc_a); //lc_t + curvMetric = intersection(curvMetric1,curvMetric2); + //metr = SMetric3(1./(lc_a*lc_a), 1./(hfar*hfar),1./(hfar*hfar), dir_a, dir_a1, dir_a2); + metr = SMetric3(1./(lc_a*lc_a), 1./(lc_n*lc_n), 1./(lc_t*lc_t), dir_a, dir_n, dir_cross); metr = intersection_conserveM1(metr,curvMetric); //metr = intersection(metr,curvMetric); } -- GitLab