Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #77 from YetAnotherTomek/disk

Disk
  • Loading branch information...
commit 2d5d5ac219245be2f38e39a9ea2f8d407b1a5c67 2 parents 4ce18c7 + f9eaccb
@YetAnotherTomek YetAnotherTomek authored
Showing with 5 additions and 5 deletions.
  1. +4 −4 Disk.hpp
  2. +1 −1  pair.py
View
8 Disk.hpp
@@ -193,9 +193,9 @@ min_dist_proj_to_edge(Disk<T_> const& obj,
* defined by the vectors unitR and unit_z, where unitR is
* choosen such that unitR and unit_z define a plane in which
* pos lies. */
- const std::pair<length_type, length_type> r_z(to_internal(obj, pos));
+ const boost::array<typename Disk<T_>::length_type, 2> r_z(to_internal(obj, pos));
/* Then compute distance to radial edge. */
- const length_type dr(r_z.first - obj.radius());
+ const length_type dr(r_z[0] - obj.radius());
if (dr < 0) return -dr;
else return 0;
@@ -230,10 +230,10 @@ allows_interaction_from(Disk<T_> const& obj, typename Disk<T_>::position_type co
{
typedef typename Disk<T_>::length_type length_type;
- std::pair<length_type, length_type> r_z(to_internal(obj, pos));
+ const boost::array<typename Disk<T_>::length_type, 2> r_z(to_internal(obj, pos));
// Return true if the projection of pos is within the disk's radius
- return ( r_z.first <= obj.radius() );
+ return ( r_z[0] <= obj.radius() );
}
View
2  pair.py
@@ -636,7 +636,7 @@ def do_back_transform(cls, com, iv, D1, D2, radius1, radius2, structure1, struct
assert(2.0*abs(pos1_orth*pos2_orth) < (l_iv*l_iv)) # That should never fail!
iv_safety = 1.0/( 1.0 - 2.0*abs(pos1_orth*pos2_orth)/(l_iv*l_iv) )
# Recalculate the interparticle vector and new positions
- iv_rescaled = iv_safety * iv
+ iv_rescaled = iv_safety * iv
pos1 = com - iv_rescaled * (D1 / D_tot)
pos2 = com + iv_rescaled * (D2 / D_tot)
Please sign in to comment.
Something went wrong with that request. Please try again.