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

Removed the "search around point" strategy when we provide a background mesh.

(Now that we can have several fields, it's much better to specify another default
field for when a search fails.)
parent 211a39ae
No related branches found
No related tags found
No related merge requests found
// $Id: BackgroundMesh.cpp,v 1.27 2007-11-08 19:29:50 geuzaine Exp $
// $Id: BackgroundMesh.cpp,v 1.28 2007-11-09 08:07:53 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -184,7 +184,7 @@ double BGM_MeshSize(GEntity *ge, double U, double V, double X, double Y, double
double lc;
if(!lc_field.empty() && !CTX.mesh.constrained_bgmesh){
if(l4 < MAX_LC && !CTX.mesh.constrained_bgmesh){
// use the fields unconstrained by other characteristic lengths
lc = l4 * CTX.mesh.lc_factor;
}
......
// $Id: Field.cpp,v 1.7 2007-09-24 08:14:29 geuzaine Exp $
// $Id: Field.cpp,v 1.8 2007-11-09 08:07:53 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -268,9 +268,11 @@ double PostViewField::operator()(double x, double y, double z)
if(view_index < 0 || view_index >= (int)PView::list.size()) return MAX_LC;
double l = 0.;
double fact[9] = {0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, 0.1};
if(!octree->searchScalar(x, y, z, &l, 0)){
// try really hard to find an element around the point
// uncomment the following to try really hard to find an element
// around the point
/*
double fact[9] = {0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, 0.1};
for(int i = 0; i < 9; i++){
double eps = CTX.lc * fact[i];
if(octree->searchScalar(x + eps, y, z, &l, 0)) break;
......@@ -288,6 +290,7 @@ double PostViewField::operator()(double x, double y, double z)
if(octree->searchScalar(x - eps, y - eps, z + eps, &l, 0)) break;
if(octree->searchScalar(x - eps, y + eps, z + eps, &l, 0)) break;
}
*/
}
if(l <= 0) return MAX_LC;
return l;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment