12#include <util/param/ParamComposite.h>
13#include <rpc/solvers/Mixture.h>
14#include <rpc/field/Domain.h>
15#include <rpc/field/WFieldContainer.h>
16#include <rpc/field/CFieldContainer.h>
17#include <rpc/field/Mask.h>
18#include <prdc/crystal/UnitCell.h>
19#include <pscf/chem/PolymerModel.h>
20#include <util/misc/FileMaster.h>
24 template <
typename T,
int N>
class FSArray;
31 template <
int D>
class RField;
40 template <
int D>
class Sweep;
53 using namespace Prdc::Cpu;
152 virtual void readParam(std::istream& in);
211 void compute(
bool needStress =
false);
246 int iterate(
bool isContinuation =
false);
617 bool isAllocatedGrid_;
622 bool isAllocatedBasis_;
638 void allocateFieldsGrid();
643 void allocateFieldsBasis();
653 void readEcho(std::istream& in, std::string&
string)
const;
663 void readEcho(std::istream& in,
double& value)
const;
679 return *mixtureModifierPtr_;
687 return *interactionPtr_;
695 return *interactionPtr_;
706 {
return (environmentPtr_); }
713 return *environmentPtr_;
721 return *environmentPtr_;
743 {
return (iteratorPtr_); }
750 return *iteratorPtr_;
758 return *iteratorPtr_;
764 {
return (sweepPtr_); }
769 {
return (simulatorPtr_); }
776 return *simulatorPtr_;
784 return *simulatorPtr_;
790 {
return fileMaster_; }
795 {
return fileMaster_; }
835 #ifndef RPC_SYSTEM_TPP
Flory-Huggins excess free energy model.
Field of real double precision values on an FFT mesh.
Base class mask and external field generator for variable-cell SCFT.
Base template for UnitCell<D> classes, D=1, 2 or 3.
A list of c fields stored in both basis and r-grid format.
Spatial domain for a periodic structure with real fields, on a CPU.
Factory for subclasses of Environment.
Factory for subclasses of Iterator.
Base class for iterative solvers for SCF equations.
A field to which the total density is constrained.
Parameter modifier for an associated Mixture.
Solver and descriptor for a mixture of polymers and solvents.
Computes SCFT free energies.
Factory for subclasses of Simulator.
Field theoretic simulator (base class).
Default Factory for subclasses of Sweep.
Solve a sequence of SCFT problems along a line in parameter space.
Main class, representing one complete system.
Mask< D > & mask()
Get the mask (non-const).
int iterate(bool isContinuation=false)
Iteratively solve a SCFT problem.
void compute(bool needStress=false)
Solve the modified diffusion equation once, without iteration.
void clearCFields()
Mark c-fields and free energy as outdated or invalid.
void setOptions(int argc, char **argv)
Process command line options.
Simulator< D > & simulator()
Get the Simulator (non-const).
void writeTimers(std::ostream &out) const
Write timer information to an output stream.
void readCommands()
Read and process commands from the default command file.
void simulate(int nStep)
Perform a field theoretic simulation (PS-FTS).
MixtureModifier< D > & mixtureModifier()
Get the MixtureModifier (non-const).
Iterator< D > & iterator()
Get the Iterator (non-const).
FileMaster & fileMaster()
Get the FileMaster (non-const).
bool hasIterator() const
Does this system have an Iterator?
ScftThermo< D > & scft()
Get the ScftThermo object (non-const).
void setUnitCell(UnitCell< D > const &unitCell)
Set parameters of the associated unit cell.
CFieldContainer< D > const & c() const
Get the monomer concentration (c) fields (const).
void clearTimers()
Clear timers.
bool hasSimulator() const
Does this system have a Simulator?
WFieldContainer< D > & w()
Get the chemical potential (w) fields (non-const).
virtual void readParameters(std::istream &in)
Read body of parameter block (without opening and closing lines).
void writeParamNoSweep(std::ostream &out) const
Write partial parameter file to an ostream.
void sweep()
Sweep in parameter space, solving an SCF problem at each point.
void computeStress()
Compute SCFT stress.
bool hasSweep() const
Does this system have a Sweep?
void clearUnitCellData()
Notify System members that unit cell parameters have been modified.
bool hasEnvironment() const
Does this system have an Environment?
Environment & environment()
Get the Environment (non-const).
Domain< D > const & domain() const
Get the Domain (const).
void readParam()
Read input parameters from default param file.
WFieldContainer< D > & h()
Get the external potential (h) fields (non-const).
Interaction & interaction()
Get the Interaction (non-const).
Mixture< D > const & mixture() const
Get the Mixture (const).
A container of fields stored in both basis and r-grid format.
A fixed capacity (static) contiguous array with a variable logical size.
A FileMaster manages input and output files for a simulation.
ParamComposite()
Constructor.
#define UTIL_ASSERT(condition)
Assertion macro suitable for debugging serial or parallel code.
Type
Scoped enumeration of polymer model types.
Fields and FFTs for periodic boundary conditions (CPU)
Periodic fields and crystallography.
Real periodic fields, SCFT and PS-FTS (CPU).
PSCF package top-level namespace.
Utility classes for scientific computation.