1#ifndef PRDC_ENVIRONMENT_H
2#define PRDC_ENVIRONMENT_H
11#include <prdc/solvers/MixturePrdc.h>
12#include <pscf/environment/EnvironmentBase.h>
13#include <util/containers/FSArray.h>
104 template <
int D,
class PT,
class ST>
130 double stress(
int paramId)
const;
175 template <
int D,
class PT,
class ST>
179 if (hasStress_)
return;
188 for (
int i = 0; i < nParam_; ++i) {
189 if (flexibleParams[i]) {
199 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.
Environment()
Constructor.
~Environment()
Destructor.
void reset()
Sets needsUpdate() to true and hasStress() to false.
void computeStress(MixturePrdc< D, PT, ST > const &mixture, FSArray< bool, 6 > const &flexibleParams)
Compute and store the environment-modified SCFT stress.
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.
Solver and descriptor for a mixture of polymers and solvents.
bool hasStress() const
Has the stress been computed since the last MDE solution?
double stress(int parameterId) const
Get derivative of free energy w/ respect to a unit cell parameter.
A fixed capacity (static) contiguous array with a variable logical size.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Periodic fields and crystallography.
PSCF package top-level namespace.