PSCF v1.3
rpc/scft/sweep/LinearSweep.h
1#ifndef RPC_LINEAR_SWEEP_H
2#define RPC_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/global.h>
14#include <iostream>
15
16namespace Pscf {
17namespace Rpc {
18
19 template <int D> class System;
20
21 using namespace Util;
22
30 template <int D>
31 class LinearSweep : public Sweep<D>
32 {
33 public:
34
41
47 void readParameters(std::istream& in);
48
54 void setup();
55
63 void setParameters(double s);
64
70 void outputSummary(std::ostream& out);
71
72 // Inherited public members
75
76 protected:
77
78 // Inherited protected members
79 using Sweep<D>::system;
80 using Sweep<D>::hasSystem;
82
83 private:
84
86 int nParameter_;
87
89 DArray< SweepParameter<D> > parameters_;
90
91 };
92
93 #ifndef RPC_LINEAR_SWEEP_TPP
94 // Suppress implicit instantiation
95 extern template class LinearSweep<1>;
96 extern template class LinearSweep<2>;
97 extern template class LinearSweep<3>;
98 #endif
99
100}
101}
102#endif
FieldState for fields in symmetry-adapted basis format.
Sweep in which parameters vary linearly with sweep variable s.
void readParameters(std::istream &in)
Read parameters from param file.
void setup()
Setup operation at the beginning of a sweep.
void outputSummary(std::ostream &out)
Output data to a running summary.
void setParameters(double s)
Set state parameters before solving an SCFT problem.
LinearSweep(System< D > &system)
Constructor.
Sweep()
Default Constructor.
System< D > & system()
Return the parent system by reference.
bool hasSystem()
Does an association with the parent System exist?
Main class, representing one complete system.
Solve a sequence of problems along a path through parameter space.
Definition SweepTmpl.h:28
GArray< ParameterType > parameterTypes_
Definition SweepTmpl.h:105
Dynamically allocatable contiguous array template.
Definition DArray.h:32
DArrayParam< Type > & readDArray(std::istream &in, const char *label, DArray< Type > &array, int n)
Add and read a required DArray < Type > parameter.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
File containing preprocessor macros for error handling.
Real periodic fields, SCFT and PS-FTS (CPU).
Definition param_pc.dox:2
PSCF package top-level namespace.
Definition param_pc.dox:1