PSCF v1.1
pspc/sweep/LinearSweep.h
1#ifndef PSPC_LINEAR_SWEEP_H
2#define PSPC_LINEAR_SWEEP_H
3
4/*
5* PSCF - Polymer Self-Consistent Field Theory
6*
7* Copyright 2016 - 2022, 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 Pspc {
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
40
46 void readParameters(std::istream& in);
47
52 void setup();
53
60 void setParameters(double s);
61
67 void outputSummary(std::ostream& out);
68
69 protected:
70
71 using Sweep<D>::system;
72 using Sweep<D>::hasSystem;
73
74 private:
76 int nParameter_;
77
79 DArray< SweepParameter<D> > parameters_;
80
81 };
82
83 #ifndef PSPC_LINEAR_SWEEP_TPP
84 // Suppress implicit instantiation
85 extern template class LinearSweep<1>;
86 extern template class LinearSweep<2>;
87 extern template class LinearSweep<3>;
88 #endif
89
90}
91}
92#endif
A sweep in parameter space where one or more parameters change linearly with the sweep variable.
void setup()
Setup operation at the beginning of a sweep.
void setParameters(double s)
Set the state before an iteration.
void readParameters(std::istream &in)
Read parameters from param file.
void outputSummary(std::ostream &out)
Output data to a running summary.
Solve a sequence of problems along a line in parameter space.
bool hasSystem()
Has an association with the parent System been set?
System< D > & system()
Return the parent system by reference.
Main class for SCFT simulation of one system.
Definition: pspc/System.h:76
double s(int i) const
Get the value of s for a stored solution, with i = 0 most recent.
Definition: SweepTmpl.h:90
Dynamically allocatable contiguous array template.
Definition: DArray.h:32
File containing preprocessor macros for error handling.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
Definition: accumulators.mod:1