1#ifndef PSCF_FLORY_HUGGINS_MIXTURE_TPP
2#define PSCF_FLORY_HUGGINS_MIXTURE_TPP
12#include "FhMolecule.h"
14#include <pscf/chem/MixtureBase.h>
15#include <pscf/chem/PolymerSpecies.h>
16#include <pscf/chem/SolventSpecies.h>
17#include <pscf/chem/Edge.h>
23 template <
typename WT>
62 for (i = 0; i < np; ++i) {
66 for (j = 0; j < nm; ++j) {
72 for (k = 0; k < nb; ++k) {
80 for (j = 0; j < nm; ++j) {
89 for (j = 0; j < nm; ++j) {
106 for (
int is = 0; is < ns; ++is) {
110 size = solvent.
size();
Descriptor for a block within a block polymer.
int monomerId() const
Get the monomer type id for this block.
double length() const
Get the length of this block, in the thread model.
void setMonomerId(int monomerId)
Set the monomer type id.
void setSize(double size)
Set the size of this clump.
FhMolecule & molecule(int id)
Get a molecule object (non-const reference).
void initialize(MixtureBase< WT > const &mixture)
Initialize to properties of a MixtureBase descriptor.
int nMolecule() const
Get number of molecule species (polymer + solvent).
int nMonomer() const
Get number of monomer types.
void setNMolecule(int nMolecule)
Set the number of molecular species and allocate memory.
void setNMonomer(int nMonomer)
Set the number of monomer types.
void setNClump(int nClump)
Set the number of clumps, and allocate memory.
FhClump & clump(int id)
Get a specified FhClump.
void computeSize()
Compute total molecule size by adding clump sizes.
Abstract descriptor for a mixture of polymer and solvent species.
virtual SolventSpecies< WT > const & solventSpecies(int id) const =0
Set a solvent solver object by const reference.
virtual PolymerSpecies< WT > const & polymerSpecies(int id) const =0
Get a PolymerSpecies by const reference.
int nSolvent() const
Get number of solvent (point particle) species.
int nPolymer() const
Get number of polymer species.
int nMonomer() const
Get number of monomer types.
Descriptor for a linear or acyclic branched block polymer.
virtual Edge & edge(int id)=0
Get a specified Edge (block descriptor) by non-const reference.
int nBlock() const
Number of blocks.
Descriptor for a solvent species.
double size() const
Get the size (number of monomers) in this solvent.
int monomerId() const
Get the monomer type id.
Dynamically allocatable contiguous array template.
void allocate(int capacity)
Allocate the underlying C array.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.