PSCF v1.4.0
Pscf::Correlation::Mixture< WT > Class Template Reference

Correlations in a homogeneous ideal gas mixture. More...

#include <Mixture.h>

Public Member Functions

 Mixture ()
 Default constructor.
 Mixture (MixtureBase< WT > const &mixture)
 Constructor.
 ~Mixture ()
 Destructor.
void associate (MixtureBase< WT > const &mixture)
 Create an association with a Mixture.
void allocate ()
 Allocate private data structures, set immutable private data.
void setup ()
 Set mutable private data.
void computeOmega (int ma, int mb, Array< double > const &kSq, Array< double > &correlations) const
 Compute ideal gas correlation functions for a monomer type pair.
void computeOmegaTotal (Array< double > const &kSq, Array< double > &correlations) const
 Compute total ideal gas density correlation functions.
Correlation::Polymer< WT > const & polymer (int i) const
 Return reference to a polymer species descriptor.
MixtureBase< WT > const & mixture () const
 Return reference to a descriptor for the associated mixture.
bool isAllocated () const
 Has this Mixture been previously allocated?

Detailed Description

template<typename WT>
class Pscf::Correlation::Mixture< WT >

Correlations in a homogeneous ideal gas mixture.

Definition at line 30 of file pscf/correlation/Mixture.h.

Constructor & Destructor Documentation

◆ Mixture() [1/2]

template<typename WT>
Pscf::Correlation::Mixture< WT >::Mixture ( )

Default constructor.

Definition at line 27 of file pscf/correlation/Mixture.tpp.

◆ Mixture() [2/2]

template<typename WT>
Pscf::Correlation::Mixture< WT >::Mixture ( MixtureBase< WT > const & mixture)

Constructor.

Parameters
mixtureassocated MixtureBase object

Definition at line 35 of file pscf/correlation/Mixture.tpp.

References mixture().

◆ ~Mixture()

template<typename WT>
Pscf::Correlation::Mixture< WT >::~Mixture ( )

Destructor.

Definition at line 43 of file pscf/correlation/Mixture.tpp.

Member Function Documentation

◆ associate()

template<typename WT>
void Pscf::Correlation::Mixture< WT >::associate ( MixtureBase< WT > const & mixture)

Create an association with a Mixture.

Parameters
mixtureassociated MixtureBase

Definition at line 50 of file pscf/correlation/Mixture.tpp.

References mixture(), and UTIL_CHECK.

◆ allocate()

template<typename WT>
void Pscf::Correlation::Mixture< WT >::allocate ( )

Allocate private data structures, set immutable private data.

This function may only be called once, after reading the Mixture section of a parameter file. It requires knowledge of immutable properties of a mixture, such as the number of monomer types, the number of polymer species, and the monomer type id for each block of each polymer.

Definition at line 60 of file pscf/correlation/Mixture.tpp.

References mixture(), and UTIL_CHECK.

◆ setup()

template<typename WT>
void Pscf::Correlation::Mixture< WT >::setup ( )

Set mutable private data.

This function calls Pscf::Correlation::Polymer:setup for all polymer species, using the current statistical segment length values. By doing so, it computes properties that depend on the following mutable properties of a mixture: monomer statistical segment lengths, species volume fractions, polymer block lengths, and solvent species sizes.

This function must be called after allocate and before any correlation function computations, and may be called repeatedly.

Definition at line 82 of file pscf/correlation/Mixture.tpp.

◆ computeOmega()

template<typename WT>
void Pscf::Correlation::Mixture< WT >::computeOmega ( int ma,
int mb,
Array< double > const & kSq,
Array< double > & correlations ) const

Compute ideal gas correlation functions for a monomer type pair.

On return, each element of array "correlations" contains the correlation function for monomers of types ma and mb for a value of squared wavenumber given by the corresponding element of kSq.

Parameters
ma1st monomer type index (in)
mb2nd monomer type index (in)
kSqarray of squared wavenumber values (in)
correlationsarray of correlation function values (out)

Definition at line 110 of file pscf/correlation/Mixture.tpp.

◆ computeOmegaTotal()

template<typename WT>
void Pscf::Correlation::Mixture< WT >::computeOmegaTotal ( Array< double > const & kSq,
Array< double > & correlations ) const

Compute total ideal gas density correlation functions.

On return, each element of the array "correlations" contains the total density-density correlation function at a value of squared wavenumber given by the corresponding element of kSq.

Parameters
kSqarray of squared wavenumber values (in)
correlationsarray of correlation function values (out)

Definition at line 214 of file pscf/correlation/Mixture.tpp.

References Util::Array< Data >::capacity(), mixture(), Pscf::Species< WT >::phi(), polymer(), Pscf::SolventSpecies< WT >::size(), and UTIL_CHECK.

◆ polymer()

template<typename WT>
Correlation::Polymer< WT > const & Pscf::Correlation::Mixture< WT >::polymer ( int i) const
inline

Return reference to a polymer species descriptor.

Parameters
iindex for polymer species

Definition at line 143 of file pscf/correlation/Mixture.h.

References UTIL_CHECK.

Referenced by computeOmegaTotal().

◆ mixture()

template<typename WT>
MixtureBase< WT > const & Pscf::Correlation::Mixture< WT >::mixture ( ) const
inline

Return reference to a descriptor for the associated mixture.

Definition at line 151 of file pscf/correlation/Mixture.h.

Referenced by allocate(), associate(), computeOmegaTotal(), and Mixture().

◆ isAllocated()

template<typename WT>
bool Pscf::Correlation::Mixture< WT >::isAllocated ( ) const
inline

Has this Mixture been previously allocated?

Definition at line 156 of file pscf/correlation/Mixture.h.


The documentation for this class was generated from the following files: