PSCF v1.4.0
rp/scft/sweep/LinearSweep.h
1#ifndef RP_LINEAR_SWEEP_H
2#define RP_LINEAR_SWEEP_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include "Sweep.h" // base class
12#include "SweepParameter.h" // member
13#include <util/containers/DArray.h> // member
14#include <util/global.h>
15#include <iostream>
16
17namespace Pscf {
18namespace Rp {
19
20 using namespace Util;
21
28 template <int D, class T>
29 class LinearSweep : public T::Sweep
30 {
31 public:
32
38 void readParameters(std::istream& in);
39
45 void setup();
46
54 void setParameters(double s);
55
61 void outputSummary(std::ostream& out);
62
63 protected:
64
70 LinearSweep(typename T::System& system);
71
72 ~LinearSweep() = default;
73
74 // Inherited protected members
75 using SweepT = typename T::Sweep;
76 using SweepT::system;
77
78 private:
79
80 // Typename aliases
81 using SweepParameterT = typename T::SweepParameter;
82 using BasisFieldStateT = typename T::BasisFieldState;
83 using SweepTmplT = SweepTmpl< BasisFieldStateT >;
84
86 int nParameter_;
87
89 DArray< SweepParameterT > parameters_;
90
91 };
92
93}
94}
95#endif
LinearSweep(typename T::System &system)
Constructor.
void readParameters(std::istream &in)
Read parameters from param file.
void setParameters(double s)
Set state parameters before solving an SCFT problem.
void setup()
Setup operation at the beginning of a sweep.
void outputSummary(std::ostream &out)
Output data to a running summary.
File containing preprocessor macros for error handling.
Class templates for real-valued periodic fields.
PSCF package top-level namespace.