Changeset ec8d4ac in sasmodels
- Timestamp:
- Jan 16, 2018 5:59:46 PM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 925b3b5
- Parents:
- 88096f5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_iq.c
r6aee3ab rec8d4ac 173 173 static double 174 174 qac_apply( 175 QACRotation rotation,175 QACRotation *rotation, 176 176 double qx, double qy, 177 177 double *qa_out, double *qc_out) 178 178 { 179 const double dqc = rotation .R31*qx + rotation.R32*qy;179 const double dqc = rotation->R31*qx + rotation->R32*qy; 180 180 // Indirect calculation of qab, from qab^2 = |q|^2 - qc^2 181 181 const double dqa = sqrt(-dqc*dqc + qx*qx + qy*qy); … … 246 246 static double 247 247 qabc_apply( 248 QABCRotation rotation,248 QABCRotation *rotation, 249 249 double qx, double qy, 250 250 double *qa_out, double *qb_out, double *qc_out) 251 251 { 252 *qa_out = rotation .R11*qx + rotation.R12*qy;253 *qb_out = rotation .R21*qx + rotation.R22*qy;254 *qc_out = rotation .R31*qx + rotation.R32*qy;252 *qa_out = rotation->R11*qx + rotation->R12*qy; 253 *qb_out = rotation->R21*qx + rotation->R22*qy; 254 *qc_out = rotation->R31*qx + rotation->R32*qy; 255 255 } 256 256 … … 453 453 // theta, phi, dtheta, dphi are defined below in projection to avoid repeated code. 454 454 #define BUILD_ROTATION() qac_rotation(&rotation, theta, phi, dtheta, dphi); 455 #define APPLY_ROTATION() qac_apply( rotation, qx, qy, &qa, &qc)455 #define APPLY_ROTATION() qac_apply(&rotation, qx, qy, &qa, &qc) 456 456 #define CALL_KERNEL() CALL_IQ_AC(qa, qc, local_values.table) 457 457 … … 467 467 local_values.table.psi = 0.; 468 468 #define BUILD_ROTATION() qabc_rotation(&rotation, theta, phi, psi, dtheta, dphi, local_values.table.psi) 469 #define APPLY_ROTATION() qabc_apply( rotation, qx, qy, &qa, &qb, &qc)469 #define APPLY_ROTATION() qabc_apply(&rotation, qx, qy, &qa, &qb, &qc) 470 470 #define CALL_KERNEL() CALL_IQ_ABC(qa, qb, qc, local_values.table) 471 471 #endif
Note: See TracChangeset
for help on using the changeset viewer.