12 #ifndef QMCPLUSPLUS_SPACEGRID_INPUT_H 13 #define QMCPLUSPLUS_SPACEGRID_INPUT_H 16 #include <unordered_map> 28 class EnergyDensityTests;
53 using LabelSet = std::vector<std::string_view>;
70 attributes = {
"label",
"grid",
"p1",
"p2",
"scale"};
71 strings = {
"label",
"p1",
"p2"};
75 void setFromStreamCustom(
const std::string& ename,
const std::string& name, std::istringstream& svalue)
override;
83 static std::any
makeAxis(xmlNodePtr cur, std::string& value_label)
88 return space_grid_axis;
119 reals = {
"fraction"};
127 static std::any
makeOrigin(xmlNodePtr cur, std::string& value_label)
130 value_label =
"origin";
131 return space_grid_origin;
156 std::any
assignAnyEnum(
const std::string& name)
const override;
181 void checkAxes(std::vector<std::any>& axes);
std::array< std::string, OHMMS_DIM > axis_labels_
std::unordered_set< std::string > strings
std::unordered_set< std::string > reals
void checkAxes(std::vector< std::any > &axes)
CoordForm get_coord_form() const
helper functions for EinsplineSetBuilder
SpaceGridInputSection input_section_
const LabelSet & get_axes_label_set() const
axes_label_set accessor, avoids a bunch of switch statements at must be used because std::unordered_m...
const std::string & get_origin_p1() const
Real get_origin_fraction() const
void setFromStreamCustom(const std::string &ename, const std::string &name, std::istringstream &svalue) override
Derived class can overrides this to do custom parsing of the element values for Custom elements These...
static const std::unordered_map< std::string, std::any > lookup_input_enum_value
std::array< std::string, OHMMS_DIM > axis_p1s_
std::any makeSpaceGridInput(xmlNodePtr cur, std::string &value_label)
factory function for a SpaceGridInput
std::string get_label() const
static std::any makeAxis(xmlNodePtr cur, std::string &value_label)
AxisGrid< Real > get_grid() const
std::string get_p2() const
SpaceGridAxisInput(xmlNodePtr cur)
const SpaceGridAxisInputSection & get_input()
std::unordered_set< std::string > custom
std::array< AxisGrid< Real >, OHMMS_DIM > axis_grids_
const std::array< AxisGrid< Real >, OHMMS_DIM > & get_axis_grids() const
std::unordered_set< std::string > delegates
const std::array< std::string, OHMMS_DIM > & get_axis_labels() const
SpaceGridAxisInputSection input_section_
std::any assignAnyEnum(const std::string &name) const override
Derived class overrides this to get proper assignment of scoped enum values.
SpaceGridOriginInputSection()
std::unordered_set< std::string > attributes
std::array< std::string, OHMMS_DIM > axis_p2s_
std::vector< std::string_view > LabelSet
const std::string & get_p1() const
static const LabelSet ax_cylindrical
SpaceGridInput(xmlNodePtr cur)
static const std::unordered_map< CoordForm, LabelSet > axes_label_sets
const std::string & get_origin_p2() const
void checkParticularValidity() override
Do validation for a particular subtype of InputSection Called by check_valid.
static std::any makeOrigin(xmlNodePtr cur, std::string &value_label)
The AxisGrid data structure and the ParseGridInput factor parsing in a manner usable in acustom handl...
std::unordered_set< std::string > required
static const LabelSet ax_spherical
const std::array< Real, OHMMS_DIM > & get_axis_scales() const
std::array< Real, OHMMS_DIM > axis_scales_
const std::string & get_p2() const
const std::array< std::string, OHMMS_DIM > & get_axis_p1s() const
const Real get_fraction() const
static const LabelSet ax_cartesian
std::unordered_set< std::string > multiple
SpaceGridOriginInput(xmlNodePtr cur)
Input section provides basic parsing and a uniform method of access to the raw parsed input...
void registerDelegate(const std::string &tag, DelegateHandler delegate_handler)
register factory function for delegate input
std::string section_name
"Name" of the input section, you must define this in the subtype and the ename, name, type, or method must match.
SpaceGridOriginInputSection input_section_
SpaceGridAxisInputSection()
const std::array< std::string, OHMMS_DIM > & get_axis_p2s() const
std::string get_p1() const
std::unordered_set< std::string > enums
list of enum inputs which allow a finite set of strings to map to enum values The enum class types an...