# Commits

committed d649325

Fix for double precision.

• Participants

# include/serialfmm.h

`   void setBounds(Bodies &bodies) {`
`     startTimer("Set bounds");                                   // Start timer`
`     vec3Pair bounds = getBounds(bodies.begin(), bodies.end());  // Get Xmin (first) and Xmax (second) of domain`
`-    localXmin = bounds.first;                                   // Set local Xmin`
`-    localXmax = bounds.second;                                  // Set local Xmax`
`-    localCenter = (localXmax + localXmin) / 2;                  // Calculate center of domain`
`+    for (int d=0; d<3; d++) localXmin[d] = bounds.first[d];     // Set local Xmin`
`+    for (int d=0; d<3; d++) localXmax[d] = bounds.second[d];    // Set local Xmax`
`+    for (int d=0; d<3; d++) localCenter[d] = (localXmax[d] + localXmin[d]) / 2;// Calculate center of domain`
`     localRadius = 0;                                            // Initialize localRadius`
`     for (int d=0; d<3; d++) {                                   // Loop over dimensions`
`       localRadius = std::max(localCenter[d] - localXmin[d], localRadius);// Calculate min distance from center`

# include/types.h

` typedef std::pair<vec3,vec3> vec3Pair;                          //!< Pair of vec3`
` `
` // Compile-time parameters`
`-const int P = 3;                                                //!< Order of expansions`
`+const int P = 5;                                                //!< Order of expansions`
` const float EPS2 = .0;                                          //!< Softening parameter (squared)`
` #if COMkernel`
` const int MTERM = P*(P+1)*(P+2)/6-3;                            //!< Number of Cartesian mutlipole terms`