108 const double &s)
const {
115 gsl_integration_workspace *w = gsl_integration_workspace_alloc(
workspaceSize);
116 double resultX, resultY, absErrX, absErrY;
117 gsl_error_handler_t* err_default = gsl_set_error_handler_off();
123 *
gmsg <<
"Warning - failed to reach specified error " <<
error
124 <<
" in multipoleT coordinateTransform" << endl;
125 *
gmsg <<
" X " << errX <<
" absErr: " << absErrX <<
" s: " << s << endl;
126 *
gmsg <<
" Y " << errY <<
" absErr: " << absErrY <<
" s: " << s << endl;
128 gsl_integration_workspace_free(w);
129 gsl_set_error_handler(err_default);
130 std::vector<double> result;
131 result.push_back(resultX);
132 result.push_back(resultY);
137 const double &zlab) {
143 double eqn1 = (r_1[0] - xlab) * shat1[0] + (r_1[1] - zlab) * shat1[1];
144 double eqn2 = (r_2[0] - xlab) * shat2[0] + (r_2[1] - zlab) * shat2[1];
145 if (eqn1 * eqn2 > 0) {
153 while (n < 10000 && std::abs(s1 - s2) > 1e-12) {
154 double stemp = (s2 + s1) / 2;
157 double eqntemp = (r_temp[0] - xlab) * shattemp[0] +
158 (r_temp[1] - zlab) * shattemp[1];
161 }
else if (eqntemp < 0) {
185 std::vector<double> &coordinates,
186 const double &boundingBoxLength) {
187 std::vector<double> r_entrance =
190 double x = coordinates[0], z = coordinates[1];
191 coordinates[0] = x * shat[1] + z * shat[0] + r_entrance[0];
192 coordinates[1] = -x * shat[0] + z * shat[1] + r_entrance[1];