1#ifndef RPG_LINEAR_SWEEP_TPP
2#define RPG_LINEAR_SWEEP_TPP
11#include "LinearSweep.h"
12#include <rpg/System.h>
32 this->read(in,
"nParameter", nParameter_);
33 parameters_.allocate(nParameter_);
37 for (
int i = 0; i < nParameter_; ++i) {
38 parameters_[i].setParameterTypesArray(
43 this->
template readDArray< SweepParameter<D> >(in,
"parameters", parameters_, nParameter_);
47 for (
int i = 0; i < nParameter_; ++i) {
48 if (parameters_[i].type() ==
"phi_polymer" || parameters_[i].type() ==
"phi_solvent") {
49 sum += parameters_[i].change();
66 for (
int i = 0; i < nParameter_; ++i) {
67 parameters_[i].setSystem(system());
68 parameters_[i].getInitial();
77 for (
int i = 0; i < nParameter_; ++i) {
78 newVal = parameters_[i].initial() + s*parameters_[i].change();
79 parameters_[i].update(newVal);
FieldState for fields in symmetry-adapted basis format.
void setup()
Setup operation at the beginning of a sweep.
void outputSummary(std::ostream &out)
Output data to a running summary.
void setParameters(double s)
Set the state before an iteration.
void readParameters(std::istream &in)
Read parameters from param file.
LinearSweep(System< D > &system)
Constructor.
Solve a sequence of problems along a line in parameter space.
virtual void readParameters(std::istream &in)
Read parameters from param file.
virtual void setup()
Setup 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.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.
Utility classes for scientific computation.