~ubuntu-branches/ubuntu/raring/rheolef/raring-proposed

« back to all changes in this revision

Viewing changes to nfem/plib/geo_trace_move.cc

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito, Pierre Saramito, Sylvestre Ledru
  • Date: 2012-05-14 14:02:09 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120514140209-dzbdlidkotyflf9e
Tags: 6.1-1
[ Pierre Saramito ]
* New upstream release 6.1 (minor changes):
  - support arbitrarily polynomial order Pk
  - source code supports g++-4.7 (closes: #671996)

[ Sylvestre Ledru ]
* update of the watch file

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
    check_macro (dis_ie != std::numeric_limits<size_type>::max(), "invalid ray computation");
62
62
    return dis_ie;
63
63
  }
64
 
  // x was outside Omega ?
65
 
  error_macro ("invalid trace_move");
 
64
  // x was outside Omega ? most of the time, y is exactly on the boundary:
 
65
  // dirty hack: project y on the bbox of the boundary:
 
66
  //  - this works in 1d when Omega is simply connected
 
67
  //  - this works in 2d & 3d when Omega is a rectangle or a paralellotope...
 
68
  // TODO: boundary projection in the multi-connected case with: y = omega.nearest(x+v)
 
69
  for (size_t i = 0; i < _dimension; i++) {
 
70
    y[i] = (v[i] < 0) ? _xmin[i] : _xmax[i];
 
71
  }
 
72
  dis_ie = _locator.seq_locate (*this,y);
 
73
  if (dis_ie != std::numeric_limits<size_type>::max()) {
 
74
    return dis_ie;
 
75
  } 
 
76
  // machine precision problem ?
 
77
  error_macro ("invalid dis_trace_move");
66
78
  return std::numeric_limits<size_type>::max();
67
79
}
68
80
template <class T, class M>