PSCF v1.3.2
AmIterator.h
1#ifndef R1D_AM_ITERATOR_H
2#define R1D_AM_ITERATOR_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 <pscf/iterator/AmIteratorDArray.h> // base class template
12#include "Iterator.h" // base class template param
13#include <pscf/iterator/AmbdInteraction.h> // member
14
15namespace Pscf {
16namespace R1d {
17
18 // Forward declaration
19 class System;
20
21 using namespace Util;
22
31 class AmIterator : public AmIteratorDArray<Iterator>
32 {
33
34 public:
35
41 AmIterator(System& system);
42
47
53 void readParameters(std::istream& in) override;
54
55 protected:
56
62 void setup(bool isContinuation) override;
63
64 private:
65
67 AmbdInteraction interaction_;
68
69 // Non-virtual private function
70
74 bool isCanonical();
75
76 // Private virtual functions that interact with parent System
77
83 int nElements() override;
84
88 bool hasInitialGuess() override;
89
95 void getCurrent(DArray<double>& curr) override;
96
103 void evaluate() override;
104
110 void getResidual(DArray<double>& resid) override;
111
117 void update(DArray<double>& newGuess) override;
118
122 void outputToLog() override;
123
124 };
125
126} // namespace R1d
127} // namespace Pscf
128#endif
AmIteratorDArray()=default
Constructor.
Modified interaction to compute residual defn.
void readParameters(std::istream &in) override
Read all parameters and initialize.
AmIterator(System &system)
Constructor.
~AmIterator()
Destructor.
void setup(bool isContinuation) override
Setup iterator just before entering iteration loop.
Main class in SCFT simulation of one system.
Definition r1d/System.h:65
Dynamically allocatable contiguous array template.
Definition DArray.h:32
SCFT with real 1D fields.
PSCF package top-level namespace.