PSCF v1.5.0
run.h
1/*
2* PSCF - Polymer Self-Consistent Field
3*
4* Copyright 2015 - 2026, David Morse (morse012@um.edu) and co-authors
5* Distributed under the terms of the GNU General Public License.
6*/
7
8#include <rp/system/System.h>
9
10namespace Pscf {
11namespace Rp {
12
22 template <int D, class T>
23 int run(int argc, char **argv) {
24
25 // Construct System object for specific dimension D.
26 System<D,T> system;
27
28 // Process command line options
29 system.setOptions(argc, argv);
30
31 // Read parameters from default parameter file
32 system.readParam();
33
34 // Read command script to run system. Return 1 if a command
35 // failed (e.g., an ITERATE command that did not converge).
36 return system.readCommands();
37
38 }
39
40}
41}
42
Base class template for classes that represent a complete system.
int readCommands(std::istream &in)
Read and process commands from an input stream.
Definition System.tpp:486
virtual void readParam(std::istream &in)
Read input parameters (with opening and closing lines).
Definition System.tpp:468
void setOptions(int argc, char **argv)
Process command line options.
Definition System.tpp:248
int run(int argc, char **argv)
Function template for main pscf_rp* programs.
Definition run.h:23
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.