Transop_ewald.c in progress

Former-commit-id: 44ee205aa767f4e285f7e17c817e9e9d802292b0
This commit is contained in:
Marek Nečada 2019-06-19 15:01:07 +03:00
parent 692f4ffe1f
commit f1456db691
1 changed files with 11 additions and 0 deletions

View File

@ -164,6 +164,7 @@ int main (int argc, char **argv) {
int retval = cmdline_parser(argc, argv, *args_info); int retval = cmdline_parser(argc, argv, *args_info);
if (retval) return retval; if (retval) return retval;
// Parse lattice vectors
const int latdim = args_info.base_vector_given; const int latdim = args_info.base_vector_given;
QPMS_ENSURE(latdim == 2, QPMS_ENSURE(latdim == 2,
"Sorry, only 2d lattices supported, but %d basis vectors were given\n", "Sorry, only 2d lattices supported, but %d basis vectors were given\n",
@ -183,6 +184,7 @@ int main (int argc, char **argv) {
const double refindex = args_info.refractive_index_arg; const double refindex = args_info.refractive_index_arg;
// Parse all particle positions
const int npart = args_info.particle_given; const int npart = args_info.particle_given;
if(!npart) ++npart; if(!npart) ++npart;
cart2_t part_positions[npart]; cart2_t part_positions[npart];
@ -197,6 +199,15 @@ int main (int argc, char **argv) {
i, gotnumbers, latdim); i, gotnumbers, latdim);
} }
QPMS_ENSURE(!args_info.k_omega_meshgrid_mode_counter != !args_info.k_omega_points_mode_counter,
"THIS IS A BUG. Only one mode ((k, ω) tuples, or k, ω lists) allowed.");
if (args_info.k_omega_meshgrid_mode_counter) { // grid mode
TODO;
} else if (args_info.k_omega_points_mode_counter) { // explic. point mode
TODO;
}
const double scuffomega = strtod(argv[7], NULL); const double scuffomega = strtod(argv[7], NULL);
//#ifdef KSTDIN //#ifdef KSTDIN
size_t kcount = 0; size_t kcount = 0;