PSCF v1.1
pspg/sweep/LinearSweep.h
1#ifndef PSPG_LINEAR_SWEEP_H
2#define PSPG_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 Pspg {
18
19 template <int D> class System;
20
21 using namespace Util;
22
29 template <int D>
30 class LinearSweep : public Sweep<D>
31 {
32 public:
33
39
45 void readParameters(std::istream& in);
46
51 void setup();
52
59 void setParameters(double s);
60
66 void outputSummary(std::ostream& out);
67
68 protected:
69
70 using Sweep<D>::system;
71 using Sweep<D>::hasSystem;
72
73 private:
75 int nParameter_;
76
78 DArray< SweepParameter<D> > parameters_;
79
80 };
81
82 #ifndef PSPG_LINEAR_SWEEP_TPP
83 // Suppress implicit instantiation
84 extern template class LinearSweep<1>;
85 extern template class LinearSweep<2>;
86 extern template class LinearSweep<3>;
87 #endif
88
89}
90}
91#endif
Base class for a sweep in parameter space where parameters change linearly with the sweep variable.
void outputSummary(std::ostream &out)
Output data to a running summary.
void readParameters(std::istream &in)
Read parameters from param file.
void setParameters(double s)
Set the state before an iteration.
void setup()
Setup operation at the beginning of a sweep.
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 in SCFT simulation of one system.
Definition: pspg/System.h:71
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