PSCF v1.5.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 - 2026, David Morse (morse012@um.edu) and co-authors
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 {
18 namespace Rp {
19 template <int D, class T> class System;
20 template <int D, class T> class Sweep;
21 template <int D, class T> class BasisFieldState;
22 }
23}
24
25namespace Pscf {
26namespace Rp {
27
28 using namespace Util;
29
36 template <int D, class T>
37 class LinearSweep : public Sweep<D,T>
38 {
39 public:
40
47
48 ~LinearSweep() = default;
49
55 void readParameters(std::istream& in);
56
62 void setup();
63
71 void setParameters(double s);
72
78 void outputSummary(std::ostream& out);
79
80 protected:
81
82 // Inherited protected members
83 using SweepT = Sweep<D,T>;
84 using SweepT::system;
85
86 private:
87
88 // Typename aliases
89 using BasisFieldStateT = BasisFieldState<D,T>;
90 using SweepTmplT = SweepTmpl< BasisFieldStateT >;
91
93 int nParameter_;
94
96 DArray< SweepParameter<D,T> > parameters_;
97
98 };
99
100}
101}
102#endif
FieldState for fields in symmetry-adapted basis format.
void readParameters(std::istream &in)
Read parameters from param file.
void setParameters(double s)
Set state parameters before solving an SCFT problem.
System< D, T > & system()
Return the parent system by reference.
void setup()
Setup operation at the beginning of a sweep.
void outputSummary(std::ostream &out)
Output data to a running summary.
LinearSweep(System< D, T > &system)
Constructor.
Solve a sequence of SCFT problems along a line in parameter space.
Sweep()
Default constructor.
Definition Sweep.tpp:44
System< D, T > & system()
Return the parent system by reference.
Base class template for classes that represent a complete system.
Dynamically allocatable contiguous array template.
Definition DArray.h:32
File containing preprocessor macros for error handling.
Code for programs that simulate real-valued periodic fields.
Definition param_pc.dox:2
PSCF package top-level namespace.