22 app_log() <<
" Entering ReferencePoints::put" << std::endl;
23 bool succeeded =
true;
26 std::string
coord =
"";
29 for (
int i = 0; i <
DIM; i++)
30 for (
int d = 0; d <
DIM; d++)
38 else if (
coord ==
"cartesian")
41 for (
int i = 0; i <
DIM; i++)
42 for (
int d = 0; d <
DIM; d++)
51 app_log() <<
" Valid coordinates must be provided for element reference_points." << std::endl;
53 app_log() <<
" Options are cell or cartesian." << std::endl;
58 app_log() <<
" reading reference_points contents" << std::endl;
60 for (
int i = 0; i < lines.size(); i++)
62 std::vector<std::string> tokens =
split(
strip(lines[i]),
" ");
63 if (tokens.size() !=
DIM + 1)
65 app_log() <<
" reference point has 4 entries, given " << tokens.size() <<
": " << lines[i] << std::endl;
71 for (
int d = 0; d <
DIM; d++)
108 for (
int i = 0; i < Psets.size(); i++)
113 std::stringstream ss;
124 os << indent +
"reference_points" << std::endl;
125 for (
const auto& [name, point] :
points)
127 os << indent +
" " << name <<
": " << point << std::endl;
129 os << indent +
"end reference_points" << std::endl;
135 h5desc.emplace_back(
hdf_path{
"reference_points"});
136 auto&
oh = h5desc.back();
137 for (
auto it =
points.cbegin(); it !=
points.cend(); ++it)
139 oh.
addProperty(const_cast<Point&>(it->second), it->first, file);
const std::string & getName() const
return the name
helper functions for EinsplineSetBuilder
size_t getTotalNum() const
bool put(xmlNodePtr cur, ParticleSet &P, std::vector< ParticleSet *> &Pref)
bool put(xmlNodePtr cur)
assign attributes to the set
void addProperty(T &p, const std::string &pname, hdf_archive &file)
add named property to describe the collectable this helper class handles
std::string strip(const std::string &s)
Specialized paritlce class for atomistic simulations.
std::vector< std::string > split(const std::string &s)
class to handle a set of attributes of an xmlNode
std::map< std::string, Point > points
double string2real(const std::string &s)
convert xmlNode contents into a std::string
void write_description(std::ostream &os, std::string &indent)
const auto & getLattice() const
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
void save(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const