11#include <pscf/sweep/SweepTmpl.h>
12#include <pspc/sweep/BasisFieldState.h>
13#include "SweepParameter.h"
98 virtual int solve(
bool isContinuation);
106 virtual void reset();
126 {
return (systemPtr_ != 0); }
132 {
return *systemPtr_; }
159 std::ofstream logFile_;
165 void outputSolution();
168 void outputSummary(std::ostream&);
FieldState for fields in symmetry-adapted basis format.
Solve a sequence of problems along a line in parameter space.
bool writeWRGrid_
Whether to write real space potential field files.
virtual void setup()
Setup operation at the beginning of a sweep.
bool writeCRGrid_
Whether to write real space concentration field files.
virtual int solve(bool isContinuation)
Call current iterator to solve SCFT problem.
bool writeCBasis_
Whether to write concentration field files in basis format.
void setSystem(System< D > &system)
Set association with parent System.
bool hasSystem()
Has an association with the parent System been set?
virtual void setParameters(double sNew)=0
Set non-adjustable system parameters to new values.
virtual void extrapolate(double sNew)
Create a guess for adjustable variables by continuation.
Sweep()
Default Constructor.
virtual void cleanup()
Cleanup operation at the beginning of a sweep.
virtual void reset()
Reset system to previous solution after iterature failure.
virtual void checkAllocation(BasisFieldState< D > &state)
Check allocation state of fields in one state, allocate if necessary.
virtual void getSolution()
Update state(0) and output data after successful convergence.
virtual void readParameters(std::istream &in)
Read parameters from param file.
System< D > & system()
Return the parent system by reference.
Main class for SCFT simulation of one system.
Solve a sequence of problems along a path through parameter space.
int historySize() const
Get the current number of stored previous states.
BasisFieldState< D > & state(int i)
Get reference to a stored state, with i=0 being most recent.
std::string baseFileName_
Base name for output files.
double c(int i) const
Get a coefficient of a previous state in a continuation.
void initialize()
Initialize variables that track history of solutions.
int nAccept() const
Get the number of converged solutions accepted thus far.
void setCoefficients(double sNew)
Compute coefficients of previous states for continuation.
double s(int i) const
Get the value of s for a stored solution, with i = 0 most recent.
int historyCapacity() const
Get the maximum number of stored previous states.
A fixed capacity (static) contiguous array with a variable logical size.
ScalarParam< Type > & readOptional(std::istream &in, const char *label, Type &value)
Add and read a new optional ScalarParam < Type > object.
File containing preprocessor macros for error handling.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.