Hex: src/io.h Source File

| Hex 2.2 Hydrogen-electron collision solver

io.h
Go to the documentation of this file.
1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
2 // //
3 // / / / / __ \ \ / / //
4 // / /__ / / / _ \ \ \/ / //
5 // / ___ / | |/_/ / /\ \ //
6 // / / / / \_\ / / \ \ //
7 // //
8 // //
9 // Copyright (c) 2016, Jakub Benda, Charles University in Prague //
10 // //
11 // MIT License: //
12 // //
13 // Permission is hereby granted, free of charge, to any person obtaining a //
14 // copy of this software and associated documentation files (the "Software"), //
15 // to deal in the Software without restriction, including without limitation //
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense, //
17 // and/or sell copies of the Software, and to permit persons to whom the //
18 // Software is furnished to do so, subject to the following conditions: //
19 // //
20 // The above copyright notice and this permission notice shall be included //
21 // in all copies or substantial portions of the Software. //
22 // //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS //
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //
26 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, //
27 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF //
28 // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //
29 // //
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31
32 #ifndef HEX_IO_H
33 #define HEX_IO_H
34
35 #include <cstdio>
36 #include <fstream>
37 #include <vector>
38 #include <string>
39
40 #include "hex-arrays.h"
41
42 #include "bspline.h"
43 #include "luft.h"
44 #include "parallel.h"
45
57 class CommandLine
58 {
59 public:
60
74 typedef enum {
76 StgNone = 0x00,
78 StgRadial = 0x01,
80 StgSolve = 0x02,
82 StgExtract = 0x04
83 } HexEcsStg;
84
85 // constructor
86 CommandLine (int argc, char* argv[])
87 : writegrid(false), zipdata(), parallel(false), preconditioner("ILU"),
88 droptol(1e-8), itinerary(StgNone), outofcore(false), cont(false), wholematrix(false), cache_all_radint(true), cache_own_radint(true),
89 itertol(1e-8), prec_itertol(1e-8), parallel_precondition(false), gpu_large_data(false),
90 lightweight_full(false), lightweight_radial_cache(false), shared_scratch(false), reuse_dia_blocks(false),
91 kpa_simple_rad(false), ocl_platform(0), ocl_device(0), factorizer("umfpack"), groupsize(1),
92 parallel_factorization(false), parallel_extraction(true), ilu_max_iter(10), max_sub_iter(0), fail_on_sub_iter(true),
93 carry_initial_guess(false), gpu_multiply(false), extract_extrapolate(false), extract_rho(-1), extract_rho_begin(-1), extract_samples(-1),
94 refine_solution(false), map_solution(), map_solution_target(), ssor(-1), noluupdate(false), coupling_limit(1000),
95 gpu_host_multiply(false), mumps_outofcore(false), mumps_verbose(0), kpa_drop(-1), write_intermediate_solutions(false),
96 fast_bessel(false), hyb_additional_levels(0), multigrid_depth(0), multigrid_coarse_prec(0), dom_x_panels(1), dom_y_panels(1),
97 dom_preconditioner("ILU"), dom_sweeps(-1), scratch(std::getenv("SCRATCHDIR") ? std::getenv("SCRATCHDIR") : "."), analytic_eigenstates(false),
98 runtime_postprocess(false), sub_prec_verbose(false)
99 {
100 // get command line options
101 parse(argc, argv);
102
103 // run the whole sequence if nothing specified
104 if (itinerary == StgNone)
105 itinerary = StgRadial | StgSolve | StgExtract;
106 }
107
109 void parse (int argc, char* argv[]);
110
111 //
112 // public attributes
113 //
114
116 std::ifstream inputfile;
117
118 // Write grid layout to a VTK file.
119 bool writegrid;
120
122 struct s_zipdata
123 {
124 // default constructor
125 s_zipdata () : file(), Xmin(-1), Ymin(-1), Xmax(-1), Ymax(-1), nX(-1), nY(-1) {}
126
127 std::string file;
128 Real Xmin, Ymin, Xmax, Ymax;
129 int nX, nY;
130 }
131 zipdata;
132
134 bool parallel;
135
137 std::string preconditioner;
138
140 Real droptol;
141
143 int itinerary;
144
146 bool outofcore;
147
149 bool cont;
150
152 bool wholematrix;
153
155 bool cache_all_radint;
156 bool cache_own_radint;
157
159 Real itertol;
160
162 Real prec_itertol;
163
165 bool parallel_precondition;
166
168 bool gpu_large_data;
169
171 bool lightweight_full, lightweight_radial_cache;
172
174 bool shared_scratch;
175
177 bool reuse_dia_blocks;
178
180 bool kpa_simple_rad;
181
183 unsigned ocl_platform;
184
186 unsigned ocl_device;
187
189 std::string factorizer;
190
192 int groupsize;
193
195 int parallel_factorization;
196
198 int parallel_extraction;
199
201 int ilu_max_iter;
202
204 int max_sub_iter;
205
207 bool fail_on_sub_iter;
208
210 bool carry_initial_guess;
211
213 bool gpu_multiply;
214
216 bool extract_extrapolate;
217
219 Real extract_rho;
220
222 Real extract_rho_begin;
223
225 int extract_samples;
226
228 bool refine_solution;
229
231 std::vector<std::string> map_solution;
232
234 std::string map_solution_target;
235
237 Real ssor;
238
240 bool noluupdate;
241
243 int coupling_limit;
244
246 bool gpu_host_multiply;
247
249 bool mumps_outofcore;
250
252 int mumps_verbose;
253
255 Real kpa_drop;
256
258 bool write_intermediate_solutions;
259
261 bool fast_bessel;
262
264 int hyb_additional_levels;
265
267 int multigrid_depth;
268
270 int multigrid_coarse_prec;
271
273 int dom_x_panels, dom_y_panels;
274
276 std::string dom_preconditioner;
277
279 int dom_sweeps;
280
282 std::string scratch;
283
285 bool analytic_eigenstates;
286
288 bool runtime_postprocess;
289
291 bool sub_prec_verbose;
292 };
293
321 class InputFile
322 {
323 public:
324
325 // constructor
326 InputFile (std::ifstream & inputfile)
327 {
328 // read inputfile
329 read(inputfile);
330
331 // maximal angular momentum (the same for both parities)
332 maxell = levels + L;
333 }
334
335 // read data from file
336 void read (std::ifstream & inputfile);
337
338 //
339 // public attributes
340 //
341
342 // B-spline order
343 int order;
344
345 // initial atomic principal quantum number
346 int ni;
347
348 // total angular momentum
349 int L;
350
351 // total parity
352 int Pi;
353
354 // 'nL', the limit on number of coupled angular states;
355 // there will be 'nL * (L + 1 - Pi)' coupled angular state pairs
356 int levels;
357
358 // upper limit on the smaller of the one-electron angular momenta
359 int limit;
360
361 // maximal one-electron orbital quantum number
362 int maxell;
363
364 // total spins to calculate
365 iArray Spin;
366
367 // ECS rotation angle
368 Real ecstheta;
369
370 // weak magnetic field in atomic units (involved only perturbatively)
371 Real B;
372
373 // maximal energy (Ry) of states included in the asymptotic (outer) region
374 Real channel_max_E;
375
376 // real B-spline knots
377 rArray rknots;
378
379 // real B-spline knot projectile extention
380 rArray rknots_ext;
381
382 // complex-to-become knots (after rotation)
383 rArray cknots;
384
385 // total energies for which to solve the system
386 rArray Etot;
387
388 // maximal total energy
389 Real max_Etot;
390
391 // initial and final atomic states
392 std::vector<std::tuple<int,int,int>> instates, outstates;
393
394 // atom charge (must be positive integer)
395 Real Za;
396
397 // projectile charge (only sign)
398 Real Zp;
399
400 // whether to calculate just the inner problem (decided from the knot sequence)
401 bool inner_only;
402
403 // keep only l1 <= l2; this is useful for large total angular momenta for reduction of the angular basis
404 bool exchange;
405 };
406
414 class SolutionIO
415 {
416 public:
417
418 SolutionIO () {}
419
420 SolutionIO
421 (
422 int L, int S, int Pi,
423 int ni, int li, int mi,
424 Real E,
425 std::vector<std::pair<int,int>> const & ang,
426 std::vector<std::pair<int,int>> const & chann = std::vector<std::pair<int,int>>(),
427 std::string prefix = "psi"
428 ) : L_(L), S_(S), Pi_(Pi),
429 ni_(ni), li_(li), mi_(mi),
430 E_(E), ang_(ang), prefix_(prefix)
431 {
432 if (chann.empty())
433 {
434 // initialize channel counts to zero
435 chann_.resize(ang.size(), std::make_pair(0,0));
436 }
437 else
438 {
439 // check consistency of the parameters
440 if (ang.size() != chann.size())
441 HexException("Incompatible size of angular momentum pairs list and channel count list.");
442
443 // use the supplied channel counts
444 chann_ = chann;
445 }
446 }
447
449 static const int All = -1;
450
452 std::string name (int ill = SolutionIO::All) const
453 {
454 if (ill == -1)
455 return format("%s-%g-%d-%d-%d-%d-%d-%d.hdf", prefix_.c_str(), E_ + 1, L_, S_, Pi_, ni_, li_, mi_);
456 else
457 return format("%s-%g-%d-%d-%d-%d-%d-%d-(%d,%d).hdf", prefix_.c_str(), E_ + 1, L_, S_, Pi_, ni_, li_, mi_, ang_[ill].first, ang_[ill].second);
458 }
459
461 bool check (int ill, std::size_t & total_size) const
462 {
463 // look for specific solution segment file
464 if (ill != SolutionIO::All)
465 {
466 HDFFile fsingle (name(ill), HDFFile::readonly);
467 return fsingle.valid() ? fsingle.size("array")/2 : 0;
468 }
469
470 // look for all solution segment files
471 std::vector<std::size_t> size (ang_.size());
472 for (unsigned illp = 0; illp < ang_.size(); illp++)
473 {
474 HDFFile fsingle (name(illp), HDFFile::readonly);
475 size[illp] = (fsingle.valid() ? fsingle.size("array")/2 : 0);
476 }
477
478 // calculate total size
479 total_size = std::accumulate(size.begin(), size.end(), 0);
480
481 // check that all blocks existed
482 return std::find(size.begin(), size.end(), 0) == size.end();
483 }
484 bool check (int ill = SolutionIO::All) const
485 {
486 std::size_t total_size = 0;
487 return check(ill, total_size);
488 }
489
498 bool load (BlockArray<Complex> & solution, int ill = SolutionIO::All)
499 {
500 // check that the requested files are present
501 if (not check(ill))
502 return false;
503
504 // select segments
505 iArray segments_to_load = { ill };
506 if (ill == SolutionIO::All)
507 segments_to_load = linspace<int>(0, solution.size() - 1, solution.size());
508
509 // for all blocks to load
510 for (int i : segments_to_load)
511 {
512 //
513 // Either read from the whole monolithic solution file ...
514 //
515
516 HDFFile hdf (name(), HDFFile::readonly);
517 if (hdf.valid())
518 {
519 // get segment size
520 std::size_t segsize = hdf.size("array") / ang_.size();
521
522 // allocate memory
523 solution[i].resize(segsize);
524
525 // read data from the file
526 if (not hdf.read("array", solution[i].data(), segsize, i * segsize))
527 return false;
528
529 // dump to disk
530 if (not solution.inmemory())
531 {
532 solution.hdfsave(i);
533 solution[i].drop();
534 }
535 }
536
537 //
538 // ... or read from a solution segment.
539 //
540
541 else
542 {
543 // simply load the requested solution segment file
544 if (not solution[i].hdfload(name(i)))
545 return false;
546
547 // dump to disk
548 if (not solution.inmemory())
549 {
550 solution.hdfsave(i);
551 solution[i].drop();
552 }
553
554 // read numbers of channels
555 HDFFile hdf (name(i), HDFFile::readonly);
556 if (hdf.valid())
557 {
558 hdf.read("Nchan1", &chann_[i].first, 1);
559 hdf.read("Nchan2", &chann_[i].second, 1);
560 }
561 }
562 }
563
564 return true;
565 }
566
575 bool save (BlockArray<Complex> const & solution, int ill = SolutionIO::All) const
576 {
577 // select segments
578 iArray segments_to_save = { ill };
579 if (ill == SolutionIO::All)
580 segments_to_save = linspace<int>(0, solution.size() - 1, solution.size());
581
582 // for all segments
583 for (int iseg : segments_to_save)
584 {
585 // load data
586 if (not solution.inmemory())
587 const_cast<BlockArray<Complex>&>(solution).hdfload(iseg);
588
589 // write data
590 if (not save_segment(solution[iseg], iseg))
591 return false;
592
593 // unload data
594 if (not solution.inmemory())
595 const_cast<BlockArray<Complex>&>(solution)[iseg].drop();
596 }
597
598 // success
599 return true;
600 }
601
602 bool save_segment (const cArrayView solution, int ill) const
603 {
604 // open file
605 HDFFile hdf (name(ill), HDFFile::overwrite);
606
607 // check file status
608 if (not hdf.valid())
609 return false;
610
611 // write data
612 bool success = true;
613 success = (success and hdf.write("L", &L_, 1));
614 success = (success and hdf.write("S", &S_, 1));
615 success = (success and hdf.write("Pi", &Pi_, 1));
616 success = (success and hdf.write("ni", &ni_, 1));
617 success = (success and hdf.write("li", &li_, 1));
618 success = (success and hdf.write("mi", &mi_, 1));
619 success = (success and hdf.write("E", &E_, 1));
620 success = (success and hdf.write("l1", &ang_[ill].first, 1));
621 success = (success and hdf.write("l2", &ang_[ill].second, 1));
622 success = (success and hdf.write("Nchan1", &chann_[ill].first, 1));
623 success = (success and hdf.write("Nchan2", &chann_[ill].second, 1));
624 success = (success and hdf.write("array", solution.data(), solution.size()));
625 return success;
626 }
627
628 std::vector<std::pair<int,int>> const & channels () const { return chann_; }
629
630 private:
631
632 int L_, S_, Pi_, ni_, li_, mi_;
633 Real E_;
634 std::vector<std::pair<int,int>> ang_, chann_;
635 std::string prefix_;
636 };
637
655 void zip_solution
656 (
657 CommandLine const & cmd,
658 InputFile const & inp,
659 Parallel const & par,
660 Bspline const & bspline_inner,
661 Bspline const & bspline_full,
662 std::vector<std::pair<int,int>> const & ll
663 );
664
668 void write_grid
669 (
670 Bspline const & bspline,
671 std::string const & basename
672 );
673
674 #endif /* HEX_IO_H */
SolutionIO::check
bool check(int ill, std::size_t &total_size) const
Check that the file exists.
Definition: io.h:461
CommandLine::prec_itertol
Real prec_itertol
Tolerance for terminating block preconditioner.
Definition: io.h:162
CommandLine::extract_extrapolate
bool extract_extrapolate
Whether to radially extrapolate the extracted T-matrix.
Definition: io.h:216
zip_solution
void zip_solution(CommandLine const &cmd, InputFile const &inp, Parallel const &par, Bspline const &bspline_inner, Bspline const &bspline_full, std::vector< std::pair< int, int >> const &ll)
Convert solution to VTK file.
Definition: io.cpp:1107
CommandLine::max_sub_iter
int max_sub_iter
Maximal number of sub-preconditioner iterations.
Definition: io.h:204
CommandLine::analytic_eigenstates
bool analytic_eigenstates
Use analytic eigenstates instead of those obtained by diagonalization.
Definition: io.h:285
CommandLine::parallel
bool parallel
Whether to use MPI.
Definition: io.h:134
InputFile::Pi
int Pi
Definition: io.h:352
CommandLine::outofcore
bool outofcore
Whether to keep precomputed data only on disk and spare RAM.
Definition: io.h:146
CommandLine::ssor
Real ssor
Apply SSOR coupling.
Definition: io.h:237
write_grid
void write_grid(Bspline const &bspline, std::string const &basename)
Write grid to a VTK file.
Definition: io.cpp:1307
CommandLine::CommandLine
CommandLine(int argc, char *argv[])
Definition: io.h:86
CommandLine::dom_y_panels
int dom_y_panels
Definition: io.h:273
CommandLine::dom_preconditioner
std::string dom_preconditioner
Domain preconditioner.
Definition: io.h:276
CommandLine::cont
bool cont
Whether to continue out-of-core computation from last computed solution (needs corresponding ooc file...
Definition: io.h:149
CommandLine::cache_all_radint
bool cache_all_radint
Whether to keep radial integrals in memory.
Definition: io.h:155
CommandLine::hyb_additional_levels
int hyb_additional_levels
Additional levels to be solved by ILU preconditioner when using HYB preconditioner.
Definition: io.h:264
CommandLine::carry_initial_guess
bool carry_initial_guess
Whether to use previous-energy solution as an initial guess.
Definition: io.h:210
CommandLine::StgExtract
Extract the T-matrices.
Definition: io.h:82
CommandLine::itinerary
int itinerary
Which parts of the computation to run.
Definition: io.h:143
bspline.h
CommandLine::s_zipdata
A B-spline expansion of a solution to "zip". See Bspline::zip .
Definition: io.h:122
InputFile::inner_only
bool inner_only
Definition: io.h:401
CommandLine::mumps_outofcore
bool mumps_outofcore
MUMPS out of core.
Definition: io.h:249
CommandLine::parallel_factorization
int parallel_factorization
Allow parallel factorization.
Definition: io.h:195
Bspline
B-spline environment.
Definition: bspline.h:57
CommandLine::s_zipdata::nY
int nY
Definition: io.h:129
InputFile::ecstheta
Real ecstheta
Definition: io.h:368
luft.h
CommandLine::s_zipdata::nX
int nX
Definition: io.h:129
CommandLine::scratch
std::string scratch
Scratch directory for out-of-core data.
Definition: io.h:282
CommandLine::refine_solution
bool refine_solution
Load also existing solutions and check that they are within tolerance.
Definition: io.h:228
CommandLine::groupsize
int groupsize
Size of the local MPI communicator, used for distributed SuperLU.
Definition: io.h:192
CommandLine::s_zipdata::Ymax
Real Ymax
Definition: io.h:128
CommandLine::preconditioner
std::string preconditioner
Preconditioner to use.
Definition: io.h:137
CommandLine::factorizer
std::string factorizer
LU-factorizer.
Definition: io.h:189
SolutionIO::save
bool save(BlockArray< Complex > const &solution, int ill=SolutionIO::All) const
Write solution to disk.
Definition: io.h:575
CommandLine::fail_on_sub_iter
bool fail_on_sub_iter
Stop with error message when sub-preconditioner fails to converge.
Definition: io.h:207
CommandLine::write_intermediate_solutions
bool write_intermediate_solutions
Write intermediate solutions.
Definition: io.h:258
InputFile::Spin
iArray Spin
Definition: io.h:365
CommandLine::extract_samples
int extract_samples
Extraction averaging/extrapolation sample count.
Definition: io.h:225
SolutionIO
Solution input/output class.
Definition: io.h:414
CommandLine::map_solution_target
std::string map_solution_target
Target mapping basis.
Definition: io.h:234
SolutionIO::All
static const int All
All blocks flag.
Definition: io.h:449
CommandLine::itertol
Real itertol
Tolerance for terminating iterative solution.
Definition: io.h:159
CommandLine::lightweight_radial_cache
bool lightweight_radial_cache
Definition: io.h:171
CommandLine::kpa_simple_rad
bool kpa_simple_rad
Use simplified radial integral matrix for nested KPA iterations (experimental).
Definition: io.h:180
InputFile::Za
Real Za
Definition: io.h:395
CommandLine::gpu_host_multiply
bool gpu_host_multiply
Keep vectors in host memory when doing multiplication on GPU.
Definition: io.h:246
CommandLine
Command line parameters.
Definition: io.h:57
CommandLine::zipdata
struct CommandLine::s_zipdata zipdata
InputFile::exchange
bool exchange
Definition: io.h:404
SolutionIO::channels
std::vector< std::pair< int, int > > const & channels() const
Definition: io.h:628
CommandLine::fast_bessel
bool fast_bessel
Use faster Bessel function evaluation routine (not the Steed/Barnett) when calculating RHS...
Definition: io.h:261
CommandLine::s_zipdata::s_zipdata
s_zipdata()
Definition: io.h:125
CommandLine::gpu_multiply
bool gpu_multiply
Do the sparse matrix multiplication on the OpenCL device (memory intensive!).
Definition: io.h:213
InputFile::maxell
int maxell
Definition: io.h:362
CommandLine::mumps_verbose
int mumps_verbose
MUMPS diagnostic information.
Definition: io.h:252
CommandLine::ocl_device
unsigned ocl_device
Index of OpenCL device to use.
Definition: io.h:186
InputFile::ni
int ni
Definition: io.h:346
InputFile::rknots_ext
rArray rknots_ext
Definition: io.h:380
CommandLine::ocl_platform
unsigned ocl_platform
Index of OpenCL platform to use.
Definition: io.h:183
CommandLine::StgSolve
Solve the equations.
Definition: io.h:80
CommandLine::noluupdate
bool noluupdate
Keep calculated LU also for next energy.
Definition: io.h:240
parallel.h
CommandLine::reuse_dia_blocks
bool reuse_dia_blocks
Whether to use diagonal blocks as present in the scratch directory. (For debugging purposes only...
Definition: io.h:177
CommandLine::StgRadial
Compute only the radial integrals necessary for the construction of the equations.
Definition: io.h:78
CommandLine::runtime_postprocess
bool runtime_postprocess
Calculate T-matrices after every iteration.
Definition: io.h:288
InputFile::channel_max_E
Real channel_max_E
Definition: io.h:374
CommandLine::extract_rho
Real extract_rho
Extraction radius.
Definition: io.h:219
CommandLine::gpu_large_data
bool gpu_large_data
Keep large data in RAM instead of copying to the OpenCL compute device.
Definition: io.h:168
CommandLine::s_zipdata::file
std::string file
Definition: io.h:127
InputFile::InputFile
InputFile(std::ifstream &inputfile)
Definition: io.h:326
InputFile
Input parameters.
Definition: io.h:321
CommandLine::parse
void parse(int argc, char *argv[])
Read options from command line.
Definition: io.cpp:145
InputFile::max_Etot
Real max_Etot
Definition: io.h:389
CommandLine::writegrid
bool writegrid
Definition: io.h:119
InputFile::cknots
rArray cknots
Definition: io.h:383
SolutionIO::name
std::string name(int ill=SolutionIO::All) const
Get name of the solution file.
Definition: io.h:452
InputFile::order
int order
Definition: io.h:343
CommandLine::HexEcsStg
HexEcsStg
Stages of the computations.
Definition: io.h:74
InputFile::levels
int levels
Definition: io.h:356
CommandLine::lightweight_full
bool lightweight_full
Whether to avoid explicitly calculating big matrices and only apply them on the fly.
Definition: io.h:171
Parallel
MPI info.
Definition: parallel.h:50
CommandLine::map_solution
std::vector< std::string > map_solution
Map solution between different B-spline bases.
Definition: io.h:231
InputFile::Etot
rArray Etot
Definition: io.h:386
InputFile::L
int L
Definition: io.h:349
SolutionIO::save_segment
bool save_segment(const cArrayView solution, int ill) const
Definition: io.h:602
SolutionIO::SolutionIO
SolutionIO()
Definition: io.h:418
CommandLine::extract_rho_begin
Real extract_rho_begin
Radial distance where to start radial averaging/extrapolation of the T-matrix.
Definition: io.h:222
InputFile::outstates
std::vector< std::tuple< int, int, int > > outstates
Definition: io.h:392
CommandLine::wholematrix
bool wholematrix
Whether to load full matrix from scratch disk at once when calculating dot product (and not by parts)...
Definition: io.h:152
InputFile::Zp
Real Zp
Definition: io.h:398
SolutionIO::check
bool check(int ill=SolutionIO::All) const
Definition: io.h:484
InputFile::limit
int limit
Definition: io.h:359
CommandLine::multigrid_depth
int multigrid_depth
Depth of the geometric multigrid.
Definition: io.h:267
SolutionIO::load
bool load(BlockArray< Complex > &solution, int ill=SolutionIO::All)
Load the solution from disk.
Definition: io.h:498
CommandLine::coupling_limit
int coupling_limit
Maximal multipole considered by the coupled preconditioner.
Definition: io.h:243
CommandLine::s_zipdata::Ymin
Real Ymin
Definition: io.h:128
CommandLine::StgNone
Do not start any intensive computations.
Definition: io.h:76
CommandLine::multigrid_coarse_prec
int multigrid_coarse_prec
What preconditioner to use for solution of the coarse problem.
Definition: io.h:270
CommandLine::shared_scratch
bool shared_scratch
Whether to compute only a subset of radial integrals in shared scratch architecture.
Definition: io.h:174
CommandLine::ilu_max_iter
int ilu_max_iter
Maximal number of ILU iterations for hybrid preconditioner.
Definition: io.h:201
InputFile::B
Real B
Definition: io.h:371
CommandLine::s_zipdata::Xmin
Real Xmin
Definition: io.h:128
CommandLine::cache_own_radint
bool cache_own_radint
Definition: io.h:156
CommandLine::dom_sweeps
int dom_sweeps
Domain decomposition sweeps.
Definition: io.h:279
CommandLine::s_zipdata::Xmax
Real Xmax
Definition: io.h:128
CommandLine::parallel_precondition
bool parallel_precondition
Whether to use OpenMP parallelization to run preconditioner for several blocks simultaneously.
Definition: io.h:165
CommandLine::droptol
Real droptol
Drop tolerance for the ILU preconditioner.
Definition: io.h:140
CommandLine::inputfile
std::ifstream inputfile
Alternative name for the input file. Default is "hex.inp".
Definition: io.h:116
CommandLine::dom_x_panels
int dom_x_panels
Domain decomposition panels.
Definition: io.h:273
CommandLine::kpa_drop
Real kpa_drop
Whether to use drop tolerance for KPA preconditioner.
Definition: io.h:255
CommandLine::sub_prec_verbose
bool sub_prec_verbose
Verbosity of the sub-preconditioner.
Definition: io.h:291
CommandLine::parallel_extraction
int parallel_extraction
Allow parallel extraction.
Definition: io.h:198
InputFile::rknots
rArray rknots
Definition: io.h:377