getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Markus Bürg
Subject: [Getfem-commits] (no subject)
Date: Mon, 11 Sep 2017 12:00:26 -0400 (EDT)

branch: mb_convex_quality_torus
commit 96f5398dd831c9bb16ffdc7ea8cb47a3d3b25855
Author: mb <address@hidden>
Date:   Mon Sep 11 18:00:14 2017 +0200

    In case of axisymmetry, resize G to original dimension. Pass original 
transformation to convex_quality_estimate.
---
 src/getfem_mesh.cc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/getfem_mesh.cc b/src/getfem_mesh.cc
index 510652f..ebced27 100644
--- a/src/getfem_mesh.cc
+++ b/src/getfem_mesh.cc
@@ -19,6 +19,7 @@
 
 ===========================================================================*/
 
+#include "getfem/bgeot_torus.h"
 #include "getfem/dal_singleton.h"
 #include "gmm/gmm_condition_number.h"
 #include "getfem/getfem_mesh.h"
@@ -408,7 +409,12 @@ namespace getfem {
   scalar_type  mesh::convex_quality_estimate(size_type ic) const {
     base_matrix G;
     bgeot::vectors_to_base_matrix(G, points_of_convex(ic));
-    return getfem::convex_quality_estimate(trans_of_convex(ic), G);
+    auto pgt = trans_of_convex(ic);
+    if (auto pgt_torus = dynamic_cast<const 
bgeot::torus_geom_trans*>(pgt.get())) {
+      pgt = pgt_torus->get_original_transformation();
+      G.resize(pgt->dim(), G.ncols());
+    }
+    return getfem::convex_quality_estimate(pgt, G);
   }
 
   scalar_type  mesh::convex_radius_estimate(size_type ic) const {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]