1#ifndef RP_RAMP_PARAMETER_H
2#define RP_RAMP_PARAMETER_H
11#include <util/containers/DArray.h>
99 template <
int D,
class T>
131 void update(
double newVal);
136 std::string
type()
const;
197 template <
class Archive>
222 enum ParamType { Block, Chi, Kuhn, Phi_Polymer, Phi_Solvent,
223 Mu_Polymer, Mu_Solvent, Solvent, Cell_Param,
224 Lambda_Pert, Vmonomer, Null};
242 typename T::Simulator* simulatorPtr_;
245 typename T::System* systemPtr_;
252 void readParamType(std::istream& in);
264 void set_(
double newVal);
268 template <
int U,
class V>
272 template <
int U,
class V>
284 template <
int D,
class T>
286 RampParameter<D,T>& param);
294 template <
int D,
class T>
296 RampParameter<D,T>
const & param);
300 template <
int D,
class T>
301 template <
class Archive>
303 const unsigned int version)
308 for (
int i = 0; i < nId_; ++i) {
319 template <
int D,
class T>
324 param.readParamType(in);
327 if (param.nId_ > 0) {
328 for (
int i = 0; i < param.nId_; ++i) {
342 template <
int D,
class T>
348 if (param.nId_ > 0) {
349 for (
int i = 0; i < param.nId_; ++i) {
354 out << param.change_;
Class for storing data about an individual linear ramp parameter.
RampParameter()
Default constructor.
int nId() const
Number of indices associated with this type of parameter.
std::string type() const
Return a string representation of the parameter type.
double current()
Get the current system parameter value.
int id(int i) const
Get id for a sub-object or element to which this is applied.
void serialize(Archive ar, const unsigned int version)
Serialize to or from an archive.
~RampParameter()=default
Destructor.
void writeParamType(std::ostream &out) const
Write the parameter type to an output stream.
void getInitial()
Get and store initial value this parameters.
void setSimulator(typename T::Simulator &simulator)
Set the simulator and system associated with this object.
double change() const
Get the total change planned for this parameter during ramp.
double initial() const
Get the initial system parameter value.
void update(double newVal)
Update the corresponding parameter value in the System.
Dynamically allocatable contiguous array template.
File containing preprocessor macros for error handling.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
void serializeEnum(Archive &ar, T &data, const unsigned int version=0)
Serialize an enumeration value.
Class templates for real-valued periodic fields.
PSCF package top-level namespace.
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.