28 std::string write_report;
29 std::string save_memory;
32 attrib.
add(write_report,
"report");
33 attrib.
add(save_memory,
"save_memory");
40 xmlNodePtr element = cur->xmlChildrenNode;
41 while (element != NULL)
43 std::string ename((
const char*)element->name);
44 if (ename ==
"parameter")
52 else if (name ==
"grid")
57 else if (name ==
"corner")
62 else if (name ==
"center")
67 else if (name ==
"cell")
72 else if (name ==
"test_moves")
75 element = element->next;
93 if (write_report ==
"yes")
98 if (save_memory ==
"yes")
120 for (
int d = 0; d <
DIM; ++d)
126 for (
int d = 0; d <
DIM; ++d)
130 gdims[0] = npoints / grid[0];
131 for (
int d = 1; d <
DIM; ++d)
132 gdims[d] = gdims[d - 1] / grid[d];
134 return {corner, grid, gdims, npoints};
void set(const Tensor< TT, D > &lat)
set the lattice vector from the command-line options
a class that defines a supercell in D-dimensional Euclean space.
helper functions for EinsplineSetBuilder
if(!okay) throw std xmlNodePtr node
bool put(xmlNodePtr cur)
assign attributes to the set
std::string myName_
name of this Estimator
CrystalLattice< OHMMS_PRECISION, OHMMS_DIM > lattice
MakeReturn< UnaryNode< FnCeil, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t ceil(const Vector< T1, C1 > &l)
Tensor<T,D> class for D by D tensor.
class to handle a set of attributes of an xmlNode
This a subclass for runtime errors that will occur on all ranks.
bool have_dr_
these are necessary for calculateDerivedParameters
std::string getXMLAttributeValue(const xmlNodePtr cur, const std::string_view name)
get the value string for attribute name if name is unfound in cur you get an empty string back this i...
TinyVector< int, DIM > grid_
bool putContent(T &a, xmlNodePtr cur)
replaces a's value with the first "element" in the "string" returned by XMLNodeString{cur}.
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
void readXML(xmlNodePtr cur)
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
SpinDensityInput(xmlNodePtr node)
DerivedParameters calculateDerivedParameters(const Lattice &lattice) const
Derived parameters of SpinDensity.