11#include <pspg/sweep/BasisFieldState.h>
12#include <pscf/sweep/SweepTmpl.h>
20 template <
int D>
class System;
100 virtual int solve(
bool isContinuation);
109 virtual void reset();
129 {
return (systemPtr_ != 0); }
135 {
return *systemPtr_; }
162 std::ofstream logFile_;
168 void outputSolution();
171 void outputSummary(std::ostream&);
FieldState for fields in symmetry-adapted basis format.
Solve a sequence of problems along a line in parameter space.
bool hasSystem()
Has an association with the parent System been set?
virtual void getSolution()
Update state(0) and output data after successful convergence.
bool writeCBasis_
Whether to write concentration field files in basis format.
System< D > & system()
Return the parent system by reference.
virtual void setParameters(double sNew)=0
Set non-adjustable system parameters to new values.
virtual int solve(bool isContinuation)
Call current iterator to solve SCFT problem.
virtual void readParameters(std::istream &in)
Read parameters from param file.
virtual void setup()
Setup operation at the beginning of a sweep.
bool writeCRGrid_
Whether to write real space concentration field files.
virtual void checkAllocation(BasisFieldState< D > &state)
Check allocation state of fields in one state, allocate if necessary.
virtual void reset()
Reset system to previous solution after iterature failure.
virtual void cleanup()
Cleanup operation at the beginning of a sweep.
void setSystem(System< D > &system)
Set association with parent System.
Sweep()
Default Constructor.
virtual void extrapolate(double sNew)
Create a guess for adjustable variables by continuation.
bool writeWRGrid_
Whether to write real space potential field files.
Main class in 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.