11#include <rpg/scft/sweep/BasisFieldState.h>
12#include <pscf/sweep/SweepTmpl.h>
18 template <
int D>
class System;
28 class Sweep :
public SweepTmpl< BasisFieldState<D> >
104 virtual int solve(
bool isContinuation);
113 virtual void reset();
133 {
return (systemPtr_ != 0); }
139 {
return *systemPtr_; }
166 std::ofstream logFile_;
172 void outputSolution();
175 void outputSummary(std::ostream&);
FieldState for fields in symmetry-adapted basis format.
virtual void getSolution()
Update state(0) and output data after successful convergence.
bool writeCBasis_
Whether to write concentration field files in basis format.
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 checkAllocation(BasisFieldState< D > &state)
Check allocation state of fields in one state, allocate if necessary.
virtual void extrapolate(double sNew)
Create a guess for adjustable variables by continuation.
virtual void setup()
Setup operation at the beginning of a sweep.
bool writeWRGrid_
Whether to write real space potential field files.
bool writeCRGrid_
Whether to write real space concentration field files.
bool hasSystem()
Has an association with the parent System been set?
virtual void reset()
Reset system to previous solution after iterature failure.
virtual void setParameters(double sNew)=0
Set non-adjustable system parameters to new values.
Sweep()
Default Constructor.
System< D > & system()
Return the parent system by reference.
void setSystem(System< D > &system)
Set association with parent System.
virtual void cleanup()
Cleanup operation at the beginning of a sweep.
Main class for calculations that represent one system.
Solve a sequence of problems along a path through parameter space.
void addParameterTypes(GArray< ParameterType > paramTypes)
BasisFieldState< D > & state(int i)
std::string baseFileName_
void setCoefficients(double sNew)
void addParameterType(std::string name, int nId, ParameterModifier &modifier)
int historyCapacity() const
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.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA)
Periodic fields and crystallography.
PSCF package top-level namespace.
Utility classes for scientific computation.