12#include <util/param/ParamComposite.h>
13#include <rpg/solvers/Mixture.h>
14#include <rpg/field/Domain.h>
15#include <rpg/field/WFieldContainer.h>
16#include <rpg/field/CFieldContainer.h>
17#include <rpg/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::Cuda;
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 RPG_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 GPU.
Factory for subclasses of Environment.
Factory for subclasses of Iterator.
Base class for iterative solvers for SCF equations.
A field to which the total monomer concentration 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 problems along a line in parameter space.
Main class, representing one complete system.
void clearCFields()
Mark c-fields and free energy as outdated or invalid.
Simulator< D > & simulator()
Get the Simulator (non-const).
void clearUnitCellData()
Notify System members that unit cell parameters have been modified.
void readParam()
Read input parameters from default param file.
WFieldContainer< D > & w()
Get the chemical potential (w) fields (non-const).
ScftThermo< D > & scft()
Get the ScftThermo object (non-const).
void compute(bool needStress=false)
Solve the modified diffusion equation once, without iteration.
Mixture< D > const & mixture() const
Get the Mixture (const).
void writeParamNoSweep(std::ostream &out) const
Write partial parameter file to an ostream.
void readCommands()
Read and process commands from the default command file.
void computeStress()
Compute SCFT stress.
Domain< D > const & domain() const
Get the Domain (const).
Iterator< D > & iterator()
Get the Iterator (non-const).
virtual void readParameters(std::istream &in)
Read body of parameter block (without opening and closing lines).
Mask< D > & mask()
Get the mask (non-const).
void sweep()
Sweep in parameter space, solving an SCF problem at each point.
Environment & environment()
Get the Environment (non-const).
bool hasIterator() const
Does this system have an Iterator?
int iterate(bool isContinuation=false)
Iteratively solve a SCFT problem.
CFieldContainer< D > const & c() const
Get the monomer concentration (c) fields (const).
void setOptions(int argc, char **argv)
Process command line options.
bool hasSimulator() const
Does this system have a Simulator?
void clearTimers()
Clear timers.
bool hasEnvironment() const
Does this system have an Environment?
MixtureModifier< D > & mixtureModifier()
Get the MixtureModifier (non-const).
Interaction & interaction()
Get the Interaction (non-const).
bool hasSweep() const
Does this system have a Sweep?
void setUnitCell(UnitCell< D > const &unitCell)
Set parameters of the associated unit cell.
FileMaster & fileMaster()
Get the FileMaster (non-const).
WFieldContainer< D > & h()
Get the external potential (h) fields (non-const).
void simulate(int nStep)
Perform a field theoretic simulation (PS-FTS).
void writeTimers(std::ostream &out) const
Write timer information to an output stream.
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, FFTs, and utilities for periodic boundary conditions (CUDA)
Periodic fields and crystallography.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.
Utility classes for scientific computation.