diff --git a/qpms/ewald.c b/qpms/ewald.c index e723a9c..b18ed13 100644 --- a/qpms/ewald.c +++ b/qpms/ewald.c @@ -245,7 +245,7 @@ int ewald32_sigma_long_points_and_shift ( const qpms_ewald32_constants_t *c, const double eta, const double k, const double unitcell_area, const size_t npoints, const point2d *Kpoints, - const point2d beta, // not needed + const point2d beta, const point2d particle_shift // target - src ) { @@ -269,7 +269,7 @@ int ewald32_sigma_long_points_and_shift ( // CHOOSE POINT BEGIN for (size_t i = 0; i < npoints; ++i) { // BEGIN POINT LOOP - // Only these following two lines differ from ewald32_sigma_long_points_and_shift()!!! + // Only these following two lines differ from ewald32_sigma_long_points_and_shift()!!! WTFCOMMENT?! const point2d K_pq = Kpoints[i]; const point2d beta_pq = {K_pq.x + beta.x, K_pq.y + beta.y}; const double rbeta_pq = cart2norm(beta_pq); diff --git a/qpms/ewald.h b/qpms/ewald.h index 0f95964..6810333 100644 --- a/qpms/ewald.h +++ b/qpms/ewald.h @@ -11,6 +11,8 @@ * according to: * [1] C.M. Linton, I. Thompson * Journal of Computational Physics 228 (2009) 1815–1829 + * [2] C.M.Linton + * SIAM Review Vol 52, No. 4, pp. 630–674 */ /* @@ -90,8 +92,17 @@ int ewald32_sr_integral(double r, double k, double n, double eta, double *result #include "lattices.h" +// General functions acc. to [2], sec. 4.6 – currently valid for 2D and 1D lattices in 3D space -int ewald32_sigma0(complex double *result, double *err, +int ewald3_sigma0(complex double *result, double *err, + const qpms_ewald32_constants_t *c, + double eta, double k +); + +/// !!!!!!!!!!!!!!! ZDE JSEM SKONČIL !!!!!!!!!!!!!!!!!!!!!!. + + +int ewald32_sigma0(complex double *result, double *err, // actually, this should be only alias for ewald3_sigma0 const qpms_ewald32_constants_t *c, double eta, double k ); diff --git a/qpms/lattices.h b/qpms/lattices.h index a5efd2f..074c834 100644 --- a/qpms/lattices.h +++ b/qpms/lattices.h @@ -99,6 +99,9 @@ static inline PGenSphReturnData PGenSph_next(PGenSph *g) { return g->c->next(g); } +static inline bool PGenSph_notDone(PGenSphReturnData data) { + return data.flags & PGEN_NOTDONE ? true : false; +} /* * Some basic lattice generators implementing the abstract interface above (implemented in latticegens.c).