14 #ifndef OHMMS_PARTICLEUTILITY_H 15 #define OHMMS_PARTICLEUTILITY_H 23 template<
class PL,
class PV>
24 void convert(
const PL& lat,
const PV& pin, PV& pout)
26 if (pin.InUnit == pout.InUnit)
33 for (
int i = 0; i < pin.size(); i++)
34 pout[i] = lat.toCart(pin[i]);
39 for (
int i = 0; i < pin.size(); i++)
40 pout[i] = lat.toUnit(pin[i]);
48 template<
class PL,
class PV>
56 for (
int i = 0; i < pin.size(); i++)
57 pin[i] = lat.toCart(pin[i]);
61 template<
class PL,
class PV>
69 for (
int i = 0; i < pin.size(); i++)
70 pin[i] = lat.toUnit(pin[i]);
77 template<
class PL,
class PV>
84 for (
int i = 0; i < pin.size(); i++)
86 pout[i] = lat.BConds.wrap(pin[i]);
91 for (
int i = 0; i < pin.size(); i++)
92 pout[i] = lat.toCart(lat.BConds.wrap(pin[i]));
99 for (
int i = 0; i < pin.size(); i++)
100 pout[i] = lat.BConds.wrap(lat.toUnit(pin[i]));
104 for (
int i = 0; i < pin.size(); i++)
105 pout[i] = lat.toCart(lat.BConds.wrap(lat.toUnit(pin[i])));
helper functions for EinsplineSetBuilder
void convert(const PL &lat, const PV &pin, PV &pout)
void convert2Cart(const PL &lat, PV &pin)
void wrapAroundBox(const PL &lat, const PV &pin, PV &pout)
void convert2Unit(const PL &lat, PV &pin)