2d empty lattice modes pxd; fix a corner case.
Former-commit-id: aa33c85a6a0d2107caef752900690f471cc6350f
This commit is contained in:
parent
0f03509dde
commit
e910de936e
|
@ -941,7 +941,7 @@ void qpms_emptylattice2_modes_nearest(double target[2],
|
||||||
double *freqlist;
|
double *freqlist;
|
||||||
size_t n = qpms_emptylattice2_modes_maxfreq(&freqlist,
|
size_t n = qpms_emptylattice2_modes_maxfreq(&freqlist,
|
||||||
b1, b2, rtol, k, c, omega);
|
b1, b2, rtol, k, c, omega);
|
||||||
target[0] = freqlist[n-2];
|
target[0] = (n > 1) ? freqlist[n-2] : NAN;
|
||||||
target[1] = freqlist[n-1];
|
target[1] = freqlist[n-1];
|
||||||
free(freqlist);
|
free(freqlist);
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,6 +211,11 @@ cdef extern from "lattices.h":
|
||||||
double maxR, bint inc_maxR, PGen_1D_incrementDirection incdir)
|
double maxR, bint inc_maxR, PGen_1D_incrementDirection incdir)
|
||||||
int qpms_reduce_lattice_basis(double *b, size_t bsize, size_t ndim, double delta)
|
int qpms_reduce_lattice_basis(double *b, size_t bsize, size_t ndim, double delta)
|
||||||
|
|
||||||
|
size_t qpms_emptylattice2_modes_maxfreq(double **target_freqs, cart2_t b1_rec, cart2_t b2_rec,
|
||||||
|
double rtol, cart2_t k, double wave_speed, double maxomega)
|
||||||
|
size_t qpms_emptylattice2_modes_nearest(double *target_freqs, cart2_t b1_rec, cart2_t b2_rec,
|
||||||
|
double rtol, cart2_t k, double wave_speed, double omega)
|
||||||
|
|
||||||
|
|
||||||
cdef extern from "quaternions.h":
|
cdef extern from "quaternions.h":
|
||||||
qpms_quat_t qpms_quat_2c_from_4d(qpms_quat4d_t q)
|
qpms_quat_t qpms_quat_2c_from_4d(qpms_quat4d_t q)
|
||||||
|
|
Loading…
Reference in New Issue