36 void read(
const char* filename) {
37 std::ifstream
f(filename);
41 printf(
" Simulation parameters\n");
42 printf(
" ---------------------\n");
46 printf(
" comment %s ",tag.c_str());
49 if (ch ==
'\n')
break;
52 else if (tag ==
"L") {
54 printf(
" L = %.1f\n", L);
56 else if (tag ==
"Lsmall") {
58 printf(
" Lsmall = %.1f\n", Lsmall);
60 else if (tag ==
"Llarge") {
62 printf(
" Llarge = %.1f\n", Llarge);
64 else if (tag ==
"F") {
66 printf(
" F = %.6f\n", F);
68 else if (tag ==
"omega") {
70 printf(
" omega = %.6f\n", omega);
72 else if (tag ==
"ncycle") {
74 printf(
" ncycle = %.6f\n", ncycle);
76 else if (tag ==
"natom") {
78 printf(
" natom = %d\n", natom);
79 for (
int i=0; i<
natom; i++) {
80 f >> Z[i] >> R[i][0] >> R[i][1] >> R[i][2];
81 printf(
" atom %2d %.1f %10.6f %10.6f %10.6f\n", i, Z[i], R[i][0], R[i][1], R[i][2]);
84 else if (tag ==
"k") {
86 printf(
" k = %d\n", k);
88 else if (tag ==
"thresh") {
90 printf(
" thresh = %.1e\n", thresh);
92 else if (tag ==
"safety") {
94 printf(
" safety = %.1e\n", safety);
96 else if (tag ==
"cut") {
98 printf(
" cut = %.2f\n", cut);
100 else if (tag ==
"iState") {
102 printf(
" iState = %s\n", iState.c_str());
104 else if (tag ==
"prefix") {
106 printf(
" prefix = %s\n", prefix.c_str());
108 else if (tag ==
"ndump") {
110 printf(
" ndump = %d\n", ndump);
112 else if (tag ==
"nplot") {
114 printf(
" nplot = %d\n", nplot);
116 else if (tag ==
"nprint") {
118 printf(
" nprint = %d\n", nprint);
120 else if (tag ==
"nloadbal") {
122 printf(
" nloadbal = %d\n", nloadbal);
124 else if (tag ==
"nio") {
126 printf(
" nio = %d\n", nio);
128 else if (tag ==
"target_time") {
130 printf(
" target_time = %.3f\n", target_time);
132 else if (tag ==
"tScale") {
134 printf(
" tScale = %.5f\n", tScale);
142 template <
typename Archive>
144 ar & L & Lsmall & Llarge & F & omega & ncycle & natom &
Z;
146 ar & k & thresh & safety & cut & iState & prefix & ndump & nplot & nprint & nloadbal &
nio;
147 ar & target_time &
tScale;
182 if (n == 0)
return 0;
208 void loadList(
World& world, std::vector<std::string>& boundList, std::vector<std::string>& unboundList);
218 template <
typename T>
ProcessID owner(const Key< 3 > &key) const
Maps key to processor.
Definition: extra.h:180
std::complex< double > double_complex
Definition: lineplot.cc:16
A pmap that locates children on odd levels with their even level parents.
Definition: funcimpl.h:104
Function< T, NDIM > & truncate(double tol=0.0, bool fence=true)
Truncate the function with optional fence. Compresses with fence if not compressed.
Definition: mra.h:577
std::string str
Definition: extra.h:154
archive_array< T > wrap(const T *, unsigned int)
Factory function to wrap dynamically allocated pointer as typed archive_array.
Definition: archive.h:820
::std::string string
Definition: gtest-port.h:872
LevelPmap(World &world)
Definition: extra.h:177
NDIM & f
Definition: mra.h:2179
WF(const std::string &STR, const complex_functionT &FUNC)
Definition: extra.h:156
complex_functionT func
Definition: extra.h:155
const T1 &f1 return GTEST_2_TUPLE_() T(f0, f1)
double psi(const Vector< double, 3 > &r)
Definition: apps/ii/hatom_energy.cc:42
FLOAT a(int j, FLOAT z)
Definition: y1.cc:86
Level level() const
Definition: key.h:220
A parallel world with full functionality wrapping an MPI communicator.
Definition: worldfwd.h:416
std::size_t hashT
The hash value type.
Definition: worldhash.h:148
int Level
Definition: key.h:58
int ProcessID
Used to clearly identify process number/rank.
Definition: worldtypes.h:37
double_complex complexd
Definition: envelopedpulse.h:44
hashT hash() const
Definition: key.h:209
Interface to be provided by any process map.
Definition: worlddc.h:64
#define MADNESS_EXCEPTION(msg, value)
Definition: worldexc.h:88
LevelPmap()
Definition: extra.h:175
Key is the index for a node of the 2^NDIM-tree.
Definition: key.h:69