[MOAB-dev] commit/MOAB: iulian07: be more tolerant with tree searching
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Apr 24 15:06:49 CDT 2014
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/acb91f8fdb36/
Changeset: acb91f8fdb36
Branch: master
User: iulian07
Date: 2014-04-24 22:03:02
Summary: be more tolerant with tree searching
the tolerances used for searching in coupler were too tight
for some real models.
And they were hardcoded :(
replace them with tolerances based on epsilon input by the user
more studies are needed here, but 1.e-10 was too tight, especially
if midnodes were created by cubit from mesh-based geometry
Affected #: 1 file
diff --git a/tools/mbcoupler/Coupler.cpp b/tools/mbcoupler/Coupler.cpp
index b868006..fbfd8fb 100644
--- a/tools/mbcoupler/Coupler.cpp
+++ b/tools/mbcoupler/Coupler.cpp
@@ -446,7 +446,12 @@ ErrorCode Coupler::locate_points(double *xyz, int num_points,
for (int i = 0; i < num_points; i++)
{
if (tl_tmp->vi_rd[3*i+1] == -1)
+ {
missing_pts++;
+#ifndef NDEBUG
+ printf(" %f %f %f\n", xyz[3*i], xyz[3*i+1], xyz[3*i+2] );
+#endif
+ }
else
if (tl_tmp->vi_rd[3*i]==(int)my_rank)
local_pts++;
@@ -668,7 +673,11 @@ ErrorCode Coupler::nat_param(double xyz[3],
if (epsilon) {
std::vector<double> dists;
std::vector<EntityHandle> leaves;
- result = myTree->distance_search(xyz, epsilon, leaves, 1.0e-10, 1.0e-6, &dists, NULL, &localRoot);
+ // two tolerances
+ result = myTree->distance_search(xyz, epsilon, leaves,
+ /*iter_tol*/ epsilon,
+ /*inside_tol*/ 10*epsilon,
+ &dists, NULL, &localRoot);
if (leaves.empty())
// not found returns success here, with empty list, just like case with no epsilon
return MB_SUCCESS;
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the moab-dev
mailing list