1#ifndef PRDC_ENVIRONMENT_H
2#define PRDC_ENVIRONMENT_H
11#include <pscf/environment/EnvironmentBase.h>
12#include <rp/solvers/Mixture.h>
13#include <util/containers/FSArray.h>
104 template <
int D,
class TT>
130 double stress(
int paramId)
const;
175 template <
int D,
class TT>
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.
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.
Periodic fields and crystallography.
PSCF package top-level namespace.