8#include "AmbdInteraction.h"
9#include <pscf/math/LuSolver.h>
56 for (i = 0; i < nMonomer_; ++i) {
57 for (j = 0; j < nMonomer_; ++j) {
58 chi_(i, j) = interaction.
chi(i, j);
59 chiInverse_(i, j) = interaction.
chiInverse(i, j);
66 for (i = 0; i < nMonomer_; ++i) {
68 for (j = 0; j < nMonomer_; ++j) {
69 p_(0,i) -= chiInverse_(j,i);
72 for (k = 0; k < nMonomer_; ++k) {
77 for (i = 0; i < nMonomer_; ++i) {
78 for (j = 0; j < nMonomer_; ++j) {
int nMonomer() const
Get number of monomer types.
AmbdInteraction()
Constructor.
void setNMonomer(int nMonomer)
Set number of monomers and allocate required memory.
void update(Interaction const &interaction)
Update all computed quantities.
virtual ~AmbdInteraction()
Destructor.
Flory-Huggins excess free energy model.
double chiInverse(int i, int j) const
Return one element of the inverse chi matrix.
DMatrix< double > const & chi() const
Return the chi matrix by const reference.
int nMonomer() const
Get number of monomer types.
void allocate(int capacity1, int capacity2)
Allocate memory for a matrix.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.
Utility classes for scientific computation.