1#ifndef PSCF_INTERACTION_H
2#define PSCF_INTERACTION_H
11#include <util/param/ParamComposite.h>
12#include <util/containers/Array.h>
13#include <util/containers/Matrix.h>
129 double chi(
int i,
int j)
const;
159 void updateMembers();
166 {
return nMonomer_; }
172 {
return chi_(i, j); }
175 {
return chiInverse_(i, j); }
Flory-Huggins excess free energy model.
virtual double fHelmholtz(Array< double > const &c) const
Compute excess Helmholtz free energy per monomer.
virtual void computeDwDc(Array< double > const &c, Matrix< double > &dWdC) const
Compute second derivatives of free energy.
double chiInverse(int i, int j) const
Return one element of the inverse chi matrix.
virtual void readParameters(std::istream &in)
Read chi parameters.
DMatrix< double > const & chi() const
Return the chi matrix by const reference.
virtual void computeW(Array< double > const &c, Array< double > &w) const
Compute chemical potential from concentration.
virtual void computeC(Array< double > const &w, Array< double > &c, double &xi) const
Compute concentration from chemical potential fields.
void setChi(int i, int j, double chi)
Change one element of the chi matrix.
void setNMonomer(int nMonomer)
Set the number of monomer types.
Interaction()
Constructor.
virtual ~Interaction()
Destructor.
int nMonomer() const
Get number of monomer types.
virtual void computeXi(Array< double > const &w, double &xi) const
Compute Langrange multiplier xi from chemical potential fields.
Array container class template.
Dynamically allocated Matrix.
Two-dimensional array container template (abstract).
An object that can read multiple parameters from file.
File containing preprocessor macros for error handling.
PSCF package top-level namespace.
Utility classes for scientific computation.