8#include "LinearSweep.h"
27 read(in,
"nParameter", nParameter_);
28 parameters_.allocate(nParameter_);
32 for (
int i = 0; i < nParameter_; ++i) {
33 parameters_[i].setParameterTypesArray(
39 parameters_, nParameter_);
43 for (
int i = 0; i < nParameter_; ++i) {
44 if (parameters_[i].type() ==
"phi_polymer"
45 || parameters_[i].type() ==
"phi_solvent")
47 sum += parameters_[i].change();
60 for (
int i = 0; i < nParameter_; ++i) {
61 parameters_[i].setSystem(
system());
62 parameters_[i].getInitial();
70 for (
int i = 0; i < nParameter_; ++i) {
71 newVal = parameters_[i].initial() +
s*parameters_[i].change();
72 parameters_[i].update(newVal);
void readParameters(std::istream &in)
Read parameters from param file.
void outputSummary(std::ostream &out)
Output data to a running summary.
void setParameters(double s)
Set the state before an iteration.
LinearSweep(System &system)
Constructor.
void setup()
Setup operation at the beginning of a sweep.
Solve a sequence of problems along a line in parameter space.
virtual void readParameters(std::istream &in)
Read ns and baseFileName parameters.
virtual void setup()
Setup operation at beginning sweep.
const System & system() const
Get parent System by reference.
Main class in SCFT simulation of one system.
Solve a sequence of problems along a path through parameter space.
GArray< ParameterType > parameterTypes_
Dynamically allocatable contiguous array template.
DArrayParam< Type > & readDArray(std::istream &in, const char *label, DArray< Type > &array, int n)
Add and read a required DArray < Type > parameter.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.
Utility classes for scientific computation.