6 #include "../wavepackets/hawp_commons.hpp" 7 #include "../wavepackets/shapes/shape_enumerator.hpp" 8 #include "../csv/hawp_coeffs_loader.hpp" 16 template<dim_t D,
class MultiIndex>
22 ScalarHaWp<D,MultiIndex>
operator()(YAML::Node
const& config)
24 if (config[
"dimensionality"] && D != config[
"dimensionality"].as<int>())
25 throw std::runtime_error(
"incompatible wavepacket. reason: dimensionality does not match");
27 if (config[
"n_components"] && 1 != config[
"n_components"].as<int>())
28 throw std::runtime_error(
"incompatible wavepacket. reason: number of components > 1");
30 if (1 != config[
"parameters"].size())
31 throw std::runtime_error(
"incompatible wavepacket. reason: number of parameter sets > 1");
33 if (1 != config[
"shapes"].size())
34 throw std::runtime_error(
"incompatible wavepacket. reason: number of shapes > 1");
41 ScalarHaWp<D,MultiIndex> wp;
42 wp.eps() = config[
"eps"].as<
double>();
46 wp.parameters() = paramset_decoder(config[
"parameters"][0]);
50 ShapeEnumerator<D,MultiIndex> shape_enumerator;
51 AbstractShape<D>* shape = shape_decoder(config[
"shapes"][0]);
52 wp.shape() = shape_enumerator.enumerate(shape);
Definition: hawp_scalar_decoder.hpp:17
Definition: coefficients_file_parser.cpp:10
unsigned logging_verbosity
Definition: hawp_scalar_decoder.hpp:20
Definition: hawp_paramset_decoder.hpp:16
ScalarHaWp< D, MultiIndex > operator()(YAML::Node const &config)
Definition: hawp_scalar_decoder.hpp:22
Definition: shape_decoder.hpp:18