Skip to content
Snippets Groups Projects
Commit 36472905 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix logic for unconstrained bgmesh
parent 99858565
No related branches found
No related tags found
No related merge requests found
// $Id: BackgroundMesh.cpp,v 1.23 2007-09-04 13:47:02 remacle Exp $ // $Id: BackgroundMesh.cpp,v 1.24 2007-09-06 16:04:25 geuzaine Exp $
// //
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// //
...@@ -184,15 +184,15 @@ double BGM_MeshSize(GEntity *ge, double U, double V, double X, double Y, double ...@@ -184,15 +184,15 @@ double BGM_MeshSize(GEntity *ge, double U, double V, double X, double Y, double
double l3 = CTX.lc; double l3 = CTX.lc;
double l4 = lc_field.empty() ? MAX_LC : lc_field(X, Y, Z); double l4 = lc_field.empty() ? MAX_LC : lc_field(X, Y, Z);
// use the field unconstrained by other characteristic lengths
if(l4 < MAX_LC && !CTX.mesh.constrained_bgmesh)
return l4 * CTX.mesh.lc_factor;
if(CTX.mesh.lc_from_curvature && ge->dim() < 3) if(CTX.mesh.lc_from_curvature && ge->dim() < 3)
l1 = LC_MVertex_CURV(ge, U, V); l1 = LC_MVertex_CURV(ge, U, V);
if(l4 < MAX_LC && CTX.mesh.constrained_bgmesh)
return std::min(l4,l1) * CTX.mesh.lc_factor;
if(ge->dim() < 2) if(ge->dim() < 2)
l2 = LC_MVertex_PNTS(ge, U, V); l2 = LC_MVertex_PNTS(ge, U, V);
// printf("l1 = %12.5E l2 = %12.5E l4 = %12.5E\n",l1,l2,l4); // printf("l1 = %12.5E l2 = %12.5E l4 = %12.5E\n",l1,l2,l4);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment