QMCPACK
LocalEnergyInput Class Reference
+ Collaboration diagram for LocalEnergyInput:

Classes

class  LocalEnergyInputSection
 

Public Types

using Consumer = LocalEnergyEstimator
 

Public Member Functions

 LocalEnergyInput ()=default
 
 LocalEnergyInput (xmlNodePtr cur)
 
bool get_use_hdf5 () const
 
const std::string & get_name () const
 
const std::string & get_type () const
 

Private Attributes

std::string name_
 
std::string type_ = "LocalEnergy"
 
LocalEnergyInputSection input_section_
 
bool use_hdf5_ = true
 

Detailed Description

Definition at line 44 of file ScalarEstimatorInputs.h.

Member Typedef Documentation

◆ Consumer

Definition at line 60 of file ScalarEstimatorInputs.h.

Constructor & Destructor Documentation

◆ LocalEnergyInput() [1/2]

LocalEnergyInput ( )
default

◆ LocalEnergyInput() [2/2]

LocalEnergyInput ( xmlNodePtr  cur)

Definition at line 37 of file ScalarEstimatorInputs.cpp.

References LocalEnergyInput::input_section_, LAMBDA_setIfInInput, qmcplusplus::lowerCase(), LocalEnergyInput::name_, qmcplusplus::readNameTypeLikeLegacy(), InputSection::readXML(), LocalEnergyInput::type_, and LocalEnergyInput::use_hdf5_.

38 {
41  auto setIfInInput = LAMBDA_setIfInInput;
42  setIfInInput(use_hdf5_, "hdf5");
43  if (lowerCase(type_) == "elocal")
44  type_ = "localenergy";
45 }
void readNameTypeLikeLegacy(InputSection &input_section_, std::string &name, std::string &type)
make input class state consistent with legacy ignoring the distinction between the name and type of e...
LocalEnergyInputSection input_section_
#define LAMBDA_setIfInInput
If tag is present in input_secution set its variable.
void readXML(xmlNodePtr cur)
Read variable values (initialize) from XML input, call checkValid.
std::string lowerCase(const std::string_view s)
++17

Member Function Documentation

◆ get_name()

const std::string& get_name ( ) const
inline

Definition at line 66 of file ScalarEstimatorInputs.h.

References LocalEnergyInput::name_.

66 { return name_; }

◆ get_type()

const std::string& get_type ( ) const
inline

◆ get_use_hdf5()

bool get_use_hdf5 ( ) const
inline

Definition at line 65 of file ScalarEstimatorInputs.h.

References LocalEnergyInput::use_hdf5_.

Member Data Documentation

◆ input_section_

LocalEnergyInputSection input_section_
private

Definition at line 72 of file ScalarEstimatorInputs.h.

Referenced by LocalEnergyInput::LocalEnergyInput().

◆ name_

std::string name_
private

◆ type_

std::string type_ = "LocalEnergy"
private

◆ use_hdf5_

bool use_hdf5_ = true
private

The documentation for this class was generated from the following files: