1#ifndef RP_ENVIRONMENT_H
2#define RP_ENVIRONMENT_H
11#include <pscf/environment/EnvironmentBase.h>
12#include <rp/solvers/Mixture.h>
13#include <util/containers/FSArray.h>
113 template <
int D,
class TT>
139 double stress(
int paramId)
const;
184 template <
int D,
class TT>
188 if (hasStress_)
return;
197 for (
int i = 0; i < nParam_; ++i) {
198 if (flexibleParams[i]) {
208 stressIds_.append(i);
bool needsUpdate() const
Does this Environment need to be updated?
EnvironmentBase()
Constructor.
virtual double modifyStress(int paramId, double stress) const
Modify stress to account for Environment, for one lattice parameter.
void clearStress()
Mark the environment-modified stress as outdated.
Environment()
Constructor.
void reset()
Sets needsUpdate() to true and hasStress() to false.
double stress(int paramId) const
Return the environment-modified SCFT stress for one parameter.
bool hasStress() const
Has the stress been calculated?
void writeStress(std::ostream &out) const
Write the environment-modified SCFT stress.
void setNParams(int nParams)
Set the number of lattice parameters.
void computeStress(Rp::Mixture< D, TT > const &mixture, FSArray< bool, 6 > const &flexibleParams)
Compute and store the environment-modified SCFT stress.
Solver and descriptor for a mixture of polymers and solvents.
double stress(int parameterId) const
Get derivative of free energy w/ respect to a unit cell parameter.
bool hasStress() const
Has the stress been computed since the last MDE solution?
A fixed capacity (static) contiguous array with a variable logical size.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Code for programs that simulate real-valued periodic fields.
PSCF package top-level namespace.