PSCF v1.5.0
pscf_rpc.cpp
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/run.h>
9#include <pscf/crystal/getDimension.h>
10#include <pscf/backend/cpp/CPT.h>
11#include <iostream>
12
20int main(int argc, char **argv)
21{
22
23 // Extract the dimension of space from argument of -d option
24 int D = Pscf::getDimension(argc, argv);
25 std::cout << "dimension " << D << std::endl;
26
27 // The exit status is 1 if a command failed
28 if (1 == D) {
29 return Pscf::Rp::run<1, Pscf::CPT>(argc, argv);
30 } else
31 if (2 == D) {
32 return Pscf::Rp::run<2, Pscf::CPT>(argc, argv);
33 } else
34 if (3 == D) {
35 return Pscf::Rp::run<3, Pscf::CPT>(argc, argv);
36 } else {
37 std::cout << " Invalid dimension = " << D << std::endl;
38 return 1;
39 }
40
41}
int main(int argc, char **argv)
Main function for pscf_1d program.
Definition pscf_1d.cpp:20
int run(int argc, char **argv)
Function template for main pscf_rp* programs.
Definition run.h:23