13 #ifndef QMCPLUSPLUS_PARTICLE_BCONDS_3D_SOA_H 14 #define QMCPLUSPLUS_PARTICLE_BCONDS_3D_SOA_H 31 template<
typename PT,
typename RSOA,
typename DISPLSOA>
38 int flip_ind = 0)
const 43 const T* restrict px = R0.data(0);
44 const T* restrict py = R0.data(1);
45 const T* restrict pz = R0.data(2);
46 T* restrict dx = temp_dr.data(0);
47 T* restrict dy = temp_dr.data(1);
48 T* restrict dz = temp_dr.data(2);
49 #pragma omp simd aligned(temp_r, px, py, pz, dx, dy, dz: QMC_SIMD_ALIGNMENT) 50 for (
int iat = first; iat < last; ++iat)
52 dx[iat] = px[iat] - x0;
53 dy[iat] = py[iat] - y0;
54 dz[iat] = pz[iat] - z0;
55 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
66 int flip_ind = 0)
const 72 const T* restrict px = R0;
73 const T* restrict py = R0 + r0_stride;
74 const T* restrict pz = R0 + r0_stride * 2;
76 T* restrict dx = temp_dr;
77 T* restrict dy = temp_dr + padded_size;
78 T* restrict dz = temp_dr + padded_size * 2;
80 dx[iat] = px[iat] - x0;
81 dy[iat] = py[iat] - y0;
82 dz[iat] = pz[iat] - z0;
83 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
88 return std::sqrt(dx * dx + dy * dy + dz * dz);
97 T Linv0, L0, Linv1, L1, Linv2, L2,
r2max, dummy;
100 : Linv0(lat.OneOverLength[0]),
102 Linv1(lat.OneOverLength[1]),
104 Linv2(lat.OneOverLength[2]),
106 r2max(lat.CellRadiusSq),
110 template<
typename PT,
typename RSOA,
typename DISPLSOA>
117 int flip_ind = 0)
const 122 const T* restrict px = R0.data(0);
123 const T* restrict py = R0.data(1);
124 const T* restrict pz = R0.data(2);
125 T* restrict dx = temp_dr.data(0);
126 T* restrict dy = temp_dr.data(1);
127 T* restrict dz = temp_dr.data(2);
128 #pragma omp simd aligned(temp_r, px, py, pz, dx, dy, dz: QMC_SIMD_ALIGNMENT) 129 for (
int iat = first; iat < last; ++iat)
131 const T x = (px[iat] - x0) * Linv0;
132 const T y = (py[iat] - y0) * Linv1;
133 const T z = (pz[iat] - z0) * Linv2;
134 dx[iat] = L0 * (x - round(x));
135 dy[iat] = L1 * (y - round(y));
136 dz[iat] = L2 * (z - round(z));
137 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
142 const T* restrict R0,
148 int flip_ind = 0)
const 154 const T* restrict px = R0;
155 const T* restrict py = R0 + r0_stride;
156 const T* restrict pz = R0 + r0_stride * 2;
158 T* restrict dx = temp_dr;
159 T* restrict dy = temp_dr + padded_size;
160 T* restrict dz = temp_dr + padded_size * 2;
162 const T x = (px[iat] - x0) * Linv0;
163 const T y = (py[iat] - y0) * Linv1;
164 const T z = (pz[iat] - z0) * Linv2;
165 dx[iat] = L0 * (x - round(x));
166 dy[iat] = L1 * (y - round(y));
167 dz[iat] = L2 * (z - round(z));
168 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
176 dx = L0 * (x - round(x));
177 dy = L1 * (y - round(y));
178 dz = L2 * (z - round(z));
179 return std::sqrt(dx * dx + dy * dy + dz * dz);
190 T r00, r10, r20, r01, r11, r21, r02, r12,
r22;
191 T g00, g10, g20, g01, g11, g21, g02, g12,
g22;
213 template<
typename PT,
typename RSOA,
typename DISPLSOA>
220 int flip_ind = 0)
const 226 const T* restrict px = R0.data(0);
227 const T* restrict py = R0.data(1);
228 const T* restrict pz = R0.data(2);
230 T* restrict dx = temp_dr.data(0);
231 T* restrict dy = temp_dr.data(1);
232 T* restrict dz = temp_dr.data(2);
234 #pragma omp simd aligned(temp_r, px, py, pz, dx, dy, dz: QMC_SIMD_ALIGNMENT) 235 for (
int iat = first; iat < last; ++iat)
237 T displ_0 = px[iat] - x0;
238 T displ_1 = py[iat] - y0;
239 T displ_2 = pz[iat] - z0;
241 T ar_0 = displ_0 * g00 + displ_1 * g10 + displ_2 * g20;
242 T ar_1 = displ_0 * g01 + displ_1 * g11 + displ_2 * g21;
243 T ar_2 = displ_0 * g02 + displ_1 * g12 + displ_2 * g22;
251 dx[iat] = ar_0 * r00 + ar_1 * r10 + ar_2 * r20;
252 dy[iat] = ar_0 * r01 + ar_1 * r11 + ar_2 * r21;
253 dz[iat] = ar_0 * r02 + ar_1 * r12 + ar_2 * r22;
255 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
260 const T* restrict R0,
266 int flip_ind = 0)
const 272 const T* restrict px = R0;
273 const T* restrict py = R0 + r0_stride;
274 const T* restrict pz = R0 + r0_stride * 2;
276 T* restrict dx = temp_dr;
277 T* restrict dy = temp_dr + padded_size;
278 T* restrict dz = temp_dr + padded_size * 2;
280 T displ_0 = px[iat] - x0;
281 T displ_1 = py[iat] - y0;
282 T displ_2 = pz[iat] - z0;
284 T ar_0 = displ_0 * g00 + displ_1 * g10 + displ_2 * g20;
285 T ar_1 = displ_0 * g01 + displ_1 * g11 + displ_2 * g21;
286 T ar_2 = displ_0 * g02 + displ_1 * g12 + displ_2 * g22;
294 dx[iat] = ar_0 * r00 + ar_1 * r10 + ar_2 * r20;
295 dy[iat] = ar_0 * r01 + ar_1 * r11 + ar_2 * r21;
296 dz[iat] = ar_0 * r02 + ar_1 * r12 + ar_2 * r22;
298 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
303 T ar_0 = dx * g00 + dy * g10 + dz * g20;
304 T ar_1 = dx * g01 + dy * g11 + dz * g21;
305 T ar_2 = dx * g02 + dy * g12 + dz * g22;
313 dx = ar_0 * r00 + ar_1 * r10 + ar_2 * r20;
314 dy = ar_0 * r01 + ar_1 * r11 + ar_2 * r21;
315 dz = ar_0 * r02 + ar_1 * r12 + ar_2 * r22;
317 return std::sqrt(dx * dx + dy * dy + dz * dz);
330 T g00, g10, g20, g01, g11, g21, g02, g12,
g22;
331 T r00, r10, r20, r01, r11, r21, r02, r12,
r22;
353 for (
int i = 0; i < 3; ++i)
354 for (
int j = 0; j < 3; ++j)
355 rbt(i, j) = rb[i][j];
368 constexpr T minusone(-1);
371 for (
int idim = 0; idim < 3; idim++)
373 auto& corners_dim = corners[idim];
375 corners_dim[0] = zero;
376 corners_dim[1] = minusone * (rb[0][idim]);
377 corners_dim[2] = minusone * (rb[1][idim]);
378 corners_dim[3] = minusone * (rb[2][idim]);
379 corners_dim[4] = minusone * (rb[0][idim] + rb[1][idim]);
380 corners_dim[5] = minusone * (rb[0][idim] + rb[2][idim]);
381 corners_dim[6] = minusone * (rb[1][idim] + rb[2][idim]);
382 corners_dim[7] = minusone * (rb[0][idim] + rb[1][idim] + rb[2][idim]);
386 template<
typename PT,
typename RSOA,
typename DISPLSOA>
393 int flip_ind = 0)
const 399 const T* restrict px = R0.data(0);
400 const T* restrict py = R0.data(1);
401 const T* restrict pz = R0.data(2);
403 T* restrict dx = temp_dr.data(0);
404 T* restrict dy = temp_dr.data(1);
405 T* restrict dz = temp_dr.data(2);
407 const auto& cellx = corners[0];
408 const auto& celly = corners[1];
409 const auto& cellz = corners[2];
411 constexpr T minusone(-1);
413 #pragma omp simd aligned(temp_r, px, py, pz, dx, dy, dz: QMC_SIMD_ALIGNMENT) 414 for (
int iat = first; iat < last; ++iat)
416 const T flip = iat < flip_ind ? one : minusone;
417 const T displ_0 = (px[iat] - x0) * flip;
418 const T displ_1 = (py[iat] - y0) * flip;
419 const T displ_2 = (pz[iat] - z0) * flip;
421 const T ar_0 = -
std::floor(displ_0 * g00 + displ_1 * g10 + displ_2 * g20);
422 const T ar_1 = -
std::floor(displ_0 * g01 + displ_1 * g11 + displ_2 * g21);
423 const T ar_2 = -
std::floor(displ_0 * g02 + displ_1 * g12 + displ_2 * g22);
425 const T delx = displ_0 + ar_0 * r00 + ar_1 * r10 + ar_2 * r20;
426 const T dely = displ_1 + ar_0 * r01 + ar_1 * r11 + ar_2 * r21;
427 const T delz = displ_2 + ar_0 * r02 + ar_1 * r12 + ar_2 * r22;
429 T rmin = delx * delx + dely * dely + delz * delz;
432 for (
int c = 1; c < 8; ++c)
434 const T x = delx + cellx[c];
435 const T y = dely + celly[c];
436 const T z = delz + cellz[c];
437 const T r2 = x * x + y * y + z * z;
438 ic = (r2 < rmin) ? c : ic;
439 rmin = (r2 < rmin) ? r2 : rmin;
443 dx[iat] = flip * (delx + cellx[ic]);
444 dy[iat] = flip * (dely + celly[ic]);
445 dz[iat] = flip * (delz + cellz[ic]);
450 const T* restrict R0,
456 int flip_ind = 0)
const 462 const T* restrict px = R0;
463 const T* restrict py = R0 + r0_stride;
464 const T* restrict pz = R0 + r0_stride * 2;
466 T* restrict dx = temp_dr;
467 T* restrict dy = temp_dr + padded_size;
468 T* restrict dz = temp_dr + padded_size * 2;
470 const auto& cellx = corners[0];
471 const auto& celly = corners[1];
472 const auto& cellz = corners[2];
474 constexpr T minusone(-1);
477 const T flip = iat < flip_ind ? one : minusone;
478 const T displ_0 = (px[iat] - x0) * flip;
479 const T displ_1 = (py[iat] - y0) * flip;
480 const T displ_2 = (pz[iat] - z0) * flip;
482 const T ar_0 = -
std::floor(displ_0 * g00 + displ_1 * g10 + displ_2 * g20);
483 const T ar_1 = -
std::floor(displ_0 * g01 + displ_1 * g11 + displ_2 * g21);
484 const T ar_2 = -
std::floor(displ_0 * g02 + displ_1 * g12 + displ_2 * g22);
486 const T delx = displ_0 + ar_0 * r00 + ar_1 * r10 + ar_2 * r20;
487 const T dely = displ_1 + ar_0 * r01 + ar_1 * r11 + ar_2 * r21;
488 const T delz = displ_2 + ar_0 * r02 + ar_1 * r12 + ar_2 * r22;
490 T rmin = delx * delx + dely * dely + delz * delz;
493 for (
int c = 1; c < 8; ++c)
495 const T x = delx + cellx[c];
496 const T y = dely + celly[c];
497 const T z = delz + cellz[c];
498 const T r2 = x * x + y * y + z * z;
499 ic = (r2 < rmin) ? c : ic;
500 rmin = (r2 < rmin) ? r2 : rmin;
504 dx[iat] = flip * (delx + cellx[ic]);
505 dy[iat] = flip * (dely + celly[ic]);
506 dz[iat] = flip * (delz + cellz[ic]);
511 const auto& cellx = corners[0];
512 const auto& celly = corners[1];
513 const auto& cellz = corners[2];
515 const T ar_0 = -
std::floor(dx * g00 + dy * g10 + dz * g20);
516 const T ar_1 = -
std::floor(dx * g01 + dy * g11 + dz * g21);
517 const T ar_2 = -
std::floor(dx * g02 + dy * g12 + dz * g22);
519 const T delx = dx + ar_0 * r00 + ar_1 * r10 + ar_2 * r20;
520 const T dely = dy + ar_0 * r01 + ar_1 * r11 + ar_2 * r21;
521 const T delz = dz + ar_0 * r02 + ar_1 * r12 + ar_2 * r22;
523 T rmin = delx * delx + dely * dely + delz * delz;
525 for (
int c = 1; c < 8; ++c)
527 const T x = delx + cellx[c];
528 const T y = dely + celly[c];
529 const T z = delz + cellz[c];
530 const T r2 = x * x + y * y + z * z;
531 rmin = (r2 < rmin) ? r2 : rmin;
564 for (
int idim = 0; idim < 2; idim++)
566 auto& corners_dim = corners[idim];
568 corners_dim[0] = T(0);
569 corners_dim[1] = minusone * (rb[0][idim]);
570 corners_dim[2] = minusone * (rb[1][idim]);
571 corners_dim[3] = minusone * (rb[0][idim] + rb[1][idim]);
575 template<
typename PT,
typename RSOA,
typename DISPLSOA>
582 int flip_ind = 0)
const 588 const T* restrict px = R0.data(0);
589 const T* restrict py = R0.data(1);
590 const T* restrict pz = R0.data(2);
592 T* restrict dx = temp_dr.data(0);
593 T* restrict dy = temp_dr.data(1);
594 T* restrict dz = temp_dr.data(2);
596 const auto& cellx = corners[0];
597 const auto& celly = corners[1];
599 constexpr T minusone(-1);
601 #pragma omp simd aligned(temp_r, px, py, pz, dx, dy, dz: QMC_SIMD_ALIGNMENT) 602 for (
int iat = first; iat < last; ++iat)
604 const T flip = iat < flip_ind ? one : minusone;
605 const T displ_0 = (px[iat] - x0) * flip;
606 const T displ_1 = (py[iat] - y0) * flip;
607 const T delz = pz[iat] - z0;
609 const T ar_0 = -
std::floor(displ_0 * g00 + displ_1 * g10);
610 const T ar_1 = -
std::floor(displ_0 * g01 + displ_1 * g11);
612 const T delx = displ_0 + ar_0 * r00 + ar_1 * r10;
613 const T dely = displ_1 + ar_0 * r01 + ar_1 * r11;
615 T rmin = delx * delx + dely * dely;
618 for (
int c = 1; c < 4; ++c)
620 const T x = delx + cellx[c];
621 const T y = dely + celly[c];
622 const T r2 = x * x + y * y;
623 ic = (r2 < rmin) ? c : ic;
624 rmin = (r2 < rmin) ? r2 : rmin;
627 temp_r[iat] =
std::sqrt(rmin + delz * delz);
628 dx[iat] = flip * (delx + cellx[ic]);
629 dy[iat] = flip * (dely + celly[ic]);
635 const T* restrict R0,
641 int flip_ind = 0)
const 647 const T* restrict px = R0;
648 const T* restrict py = R0 + r0_stride;
649 const T* restrict pz = R0 + r0_stride * 2;
651 T* restrict dx = temp_dr;
652 T* restrict dy = temp_dr + padded_size;
653 T* restrict dz = temp_dr + padded_size * 2;
655 const auto& cellx = corners[0];
656 const auto& celly = corners[1];
658 constexpr T minusone(-1);
661 const T flip = iat < flip_ind ? one : minusone;
662 const T displ_0 = (px[iat] - x0) * flip;
663 const T displ_1 = (py[iat] - y0) * flip;
664 const T delz = pz[iat] - z0;
666 const T ar_0 = -
std::floor(displ_0 * g00 + displ_1 * g10);
667 const T ar_1 = -
std::floor(displ_0 * g01 + displ_1 * g11);
669 const T delx = displ_0 + ar_0 * r00 + ar_1 * r10;
670 const T dely = displ_1 + ar_0 * r01 + ar_1 * r11;
672 T rmin = delx * delx + dely * dely;
675 for (
int c = 1; c < 4; ++c)
677 const T x = delx + cellx[c];
678 const T y = dely + celly[c];
679 const T r2 = x * x + y * y;
680 ic = (r2 < rmin) ? c : ic;
681 rmin = (r2 < rmin) ? r2 : rmin;
684 temp_r[iat] =
std::sqrt(rmin + delz * delz);
685 dx[iat] = flip * (delx + cellx[ic]);
686 dy[iat] = flip * (dely + celly[ic]);
692 const auto& cellx = corners[0];
693 const auto& celly = corners[1];
695 const T ar_0 = -
std::floor(dx * g00 + dy * g10);
696 const T ar_1 = -
std::floor(dx * g01 + dy * g11);
698 const T delx = dx + ar_0 * r00 + ar_1 * r10;
699 const T dely = dy + ar_0 * r01 + ar_1 * r11;
701 T rmin = delx * delx + dely * dely;
703 for (
int c = 1; c < 4; ++c)
705 const T x = delx + cellx[c];
706 const T y = dely + celly[c];
707 const T r2 = x * x + y * y;
708 rmin = (r2 < rmin) ? r2 : rmin;
723 : Linv0(lat.OneOverLength[0]), L0(lat.Length[0]), Linv1(lat.OneOverLength[1]), L1(lat.Length[1])
726 template<
typename PT,
typename RSOA,
typename DISPLSOA>
733 int flip_ind = 0)
const 738 const T* restrict px = R0.data(0);
739 const T* restrict py = R0.data(1);
740 const T* restrict pz = R0.data(2);
741 T* restrict dx = temp_dr.data(0);
742 T* restrict dy = temp_dr.data(1);
743 T* restrict dz = temp_dr.data(2);
745 #pragma omp simd aligned(temp_r, px, py, pz, dx, dy, dz: QMC_SIMD_ALIGNMENT) 746 for (
int iat = first; iat < last; ++iat)
748 T x = (px[iat] - x0) * Linv0;
749 dx[iat] = L0 * (x - round(x));
750 T y = (py[iat] - y0) * Linv1;
751 dy[iat] = L1 * (y - round(y));
752 dz[iat] = pz[iat] - z0;
753 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
758 const T* restrict R0,
764 int flip_ind = 0)
const 770 const T* restrict px = R0;
771 const T* restrict py = R0 + r0_stride;
772 const T* restrict pz = R0 + r0_stride * 2;
774 T* restrict dx = temp_dr;
775 T* restrict dy = temp_dr + padded_size;
776 T* restrict dz = temp_dr + padded_size * 2;
778 T x = (px[iat] - x0) * Linv0;
779 dx[iat] = L0 * (x - round(x));
780 T y = (py[iat] - y0) * Linv1;
781 dy[iat] = L1 * (y - round(y));
782 dz[iat] = pz[iat] - z0;
783 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
790 dx = L0 * (x - round(x));
791 dy = L1 * (y - round(y));
792 return std::sqrt(dx * dx + dy * dy + dz * dz);
814 template<
typename PT,
typename RSOA,
typename DISPLSOA>
821 int flip_ind = 0)
const 827 const T* restrict px = R0.data(0);
828 const T* restrict py = R0.data(1);
829 const T* restrict pz = R0.data(2);
831 T* restrict dx = temp_dr.data(0);
832 T* restrict dy = temp_dr.data(1);
833 T* restrict dz = temp_dr.data(2);
835 #pragma omp simd aligned(temp_r, px, py, pz, dx, dy, dz: QMC_SIMD_ALIGNMENT) 836 for (
int iat = first; iat < last; ++iat)
838 T displ_0 = px[iat] - x0;
839 T displ_1 = py[iat] - y0;
841 T ar_0 = displ_0 * g00 + displ_1 * g10;
842 T ar_1 = displ_0 * g01 + displ_1 * g11;
849 dx[iat] = ar_0 * r00 + ar_1 * r10;
850 dy[iat] = ar_0 * r01 + ar_1 * r11;
851 dz[iat] = pz[iat] - z0;
853 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
858 const T* restrict R0,
864 int flip_ind = 0)
const 870 const T* restrict px = R0;
871 const T* restrict py = R0 + r0_stride;
872 const T* restrict pz = R0 + r0_stride * 2;
874 T* restrict dx = temp_dr;
875 T* restrict dy = temp_dr + padded_size;
876 T* restrict dz = temp_dr + padded_size * 2;
878 T displ_0 = px[iat] - x0;
879 T displ_1 = py[iat] - y0;
881 T ar_0 = displ_0 * g00 + displ_1 * g10;
882 T ar_1 = displ_0 * g01 + displ_1 * g11;
889 dx[iat] = ar_0 * r00 + ar_1 * r10;
890 dy[iat] = ar_0 * r01 + ar_1 * r11;
891 dz[iat] = pz[iat] - z0;
893 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
898 T ar_0 = dx * g00 + dy * g10;
899 T ar_1 = dx * g01 + dy * g11;
906 dx = ar_0 * r00 + ar_1 * r10;
907 dy = ar_0 * r01 + ar_1 * r11;
909 return std::sqrt(dx * dx + dy * dy + dz * dz);
922 template<
typename PT,
typename RSOA,
typename DISPLSOA>
929 int flip_ind = 0)
const 935 const T* restrict px = R0.data(0);
936 const T* restrict py = R0.data(1);
937 const T* restrict pz = R0.data(2);
939 T* restrict dx = temp_dr.data(0);
940 T* restrict dy = temp_dr.data(1);
941 T* restrict dz = temp_dr.data(2);
943 #pragma omp simd aligned(temp_r, px, py, pz, dx, dy, dz: QMC_SIMD_ALIGNMENT) 944 for (
int iat = first; iat < last; ++iat)
946 T x = (px[iat] - x0) * Linv0;
947 dx[iat] = L0 * (x - round(x));
948 dy[iat] = py[iat] - y0;
949 dz[iat] = pz[iat] - z0;
950 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
955 const T* restrict R0,
961 int flip_ind = 0)
const 967 const T* restrict px = R0;
968 const T* restrict py = R0 + r0_stride;
969 const T* restrict pz = R0 + r0_stride * 2;
971 T* restrict dx = temp_dr;
972 T* restrict dy = temp_dr + padded_size;
973 T* restrict dz = temp_dr + padded_size * 2;
975 T x = (px[iat] - x0) * Linv0;
976 dx[iat] = L0 * (x - round(x));
977 dy[iat] = py[iat] - y0;
978 dz[iat] = pz[iat] - z0;
979 temp_r[iat] =
std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
985 dx = L0 * (x - round(x));
986 return std::sqrt(dx * dx + dy * dy + dz * dz);
997 T r00, r10, r20, r01, r11, r21, r02, r12,
r22;
998 T g00, g10, g20, g01, g11, g21, g02, g12,
g22;
1021 r2max(lat.CellRadiusSq)
1023 const auto& cellx = nextcells[0];
1024 const auto& celly = nextcells[1];
1025 const auto& cellz = nextcells[2];
1028 for (
int i = -1; i <= 1; ++i)
1029 for (
int j = -1; j <= 1; ++j)
1030 for (
int k = -1; k <= 1; ++k)
1032 if (i == 0 && j == 0 && j == 0)
1034 cellx[ic] = i * r00 + j * r10 + k * r20;
1035 celly[ic] = i * r01 + j * r11 + k * r21;
1036 cellz[ic] = i * r02 + j * r12 + k * r22;
1041 template<
typename PT,
typename RSOA,
typename DISPLSOA>
1048 int flip_ind = 0)
const 1050 APP_ABORT(
"DTD_BConds<T,3,PPPX> not implemented");
1054 const T* restrict R0,
1057 T* restrict temp_dr,
1060 int flip_ind = 0)
const 1090 r2max(lat.CellRadiusSq)
1092 const auto& cellx = nextcells[0];
1093 const auto& celly = nextcells[1];
1094 const auto& cellz = nextcells[2];
1097 for (
int i = -1; i <= 1; ++i)
1098 for (
int j = -1; j <= 1; ++j)
1100 if (i == 0 && j == 0)
1102 cellx[ic] = i * r00 + j * r10;
1103 celly[ic] = i * r01 + j * r11;
1109 template<
typename PT,
typename RSOA,
typename DISPLSOA>
1116 int flip_ind = 0)
const 1118 APP_ABORT(
"DTD_BConds<T,3,PPNX> not implemented");
1122 const T* restrict R0,
1125 T* restrict temp_dr,
1128 int flip_ind = 0)
const 1141 #endif // OHMMS_PARTICLE_BCONDS_3D_H a class that defines a supercell in D-dimensional Euclean space.
void computeDistancesOffload(const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
TinyVector< TinyVector< T, 8 >, 3 > nextcells
DTD_BConds(const CrystalLattice< T, 3 > &lat)
helper functions for EinsplineSetBuilder
void computeDistances(const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
void computeDistancesOffload(const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
void computeDistances(const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
TinyVector< TinyVector< T, 26 >, 3 > nextcells
void computeDistances(const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
TinyVector< TinyVector< T, 4 >, 2 > corners
void computeDistancesOffload(const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
void computeDistances(const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
Tensor_t G
Reciprocal unit vectors. G(j,i) i=vector and j=x,y,z.
Declaration of CrystalLattice<T,D>
void computeDistancesOffload(const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
void computeDistancesOffload(const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
void computeDistances(const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
void computeDistances(const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
TinyVector< TinyVector< T, 8 >, 3 > corners
void computeDistances(const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
void computeDistancesOffload(const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
DTD_BConds(const CrystalLattice< T, 3 > &lat)
void computeDistancesOffload(const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
TinyVector< TinyVector< T, 3 >, 3 > rb
void computeDistances(const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
T computeDist(T dx, T dy, T dz) const
Tensor<T,D> class for D by D tensor.
void computeDistances(const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
void computeDistances(const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
DTD_BConds(const CrystalLattice< T, 3 > &lat)
constructor: doing nothing
void computeDistancesOffload(const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
void computeDistancesOffload(const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
SingleParticlePos a(int i) const
Provide interfaces familiar to fotran users.
T computeDist(T dx, T dy, T dz) const
T computeDist(T dx, T dy, T dz) const
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
DTD_BConds(const CrystalLattice< T, 3 > &lat)
void computeDistancesOffload(const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
void find_reduced_basis(TinyVector< TinyVector< T, 3 >, 3 > &rb)
T computeDist(T dx, T dy, T dz) const
T computeDist(T dx, T dy, T dz) const
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
Tensor< T, D > inverse(const Tensor< T, D > &a)
DTD_BConds(const CrystalLattice< T, 3 > &lat)
T computeDist(T dx, T dy, T dz) const
T computeDist(T dx, T dy, T dz) const
T computeDist(T dx, T dy, T dz) const
DTD_BConds(const CrystalLattice< T, 3 > &lat)
T computeDist(T dx, T dy, T dz) const
DTD_BConds(const CrystalLattice< T, 3 > &lat)
T computeDist(T dx, T dy, T dz) const
DTD_BConds(const CrystalLattice< T, 3 > &lat)
DTD_BConds(const CrystalLattice< T, 3 > &lat)
MakeReturn< UnaryNode< FnFloor, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t floor(const Vector< T1, C1 > &l)
DTD_BConds(const CrystalLattice< T, 3 > &lat)