PSCF v1.1
Public Member Functions | Friends | List of all members
Pscf::Monomer Class Reference

Descriptor for a monomer or particle type. More...

#include <Monomer.h>

Public Member Functions

 Monomer ()
 Constructor. More...
 
void setId (int id)
 Set the integer index for this monomer type. More...
 
int id () const
 Unique integer index for monomer type. More...
 
double kuhn () const
 Statistical segment length (random walk step size). More...
 
void setKuhn (double kuhn)
 Set statistical segment length. More...
 
template<class Archive >
void serialize (Archive ar, const unsigned int version)
 Serialize to or from an archive. More...
 

Friends

std::istream & operator>> (std::istream &in, Monomer &monomer)
 istream extractor for a Monomer. More...
 
std::ostream & operator<< (std::ostream &out, const Monomer &monomer)
 ostream inserter for a Monomer. More...
 

Detailed Description

Descriptor for a monomer or particle type.

Iostream extractor (>>) and inserter (<<) operators are defined for a Monomer, allowing the description of a monomer to be read from or written to file like a primitive variable. The text representation contains only the value of the kuhn (statistical segment) length, as described here.

Data for all monomers in a system is normally read from a parameter file into an array-valued parameter named "monomers".

Definition at line 31 of file Monomer.h.

Constructor & Destructor Documentation

◆ Monomer()

Pscf::Monomer::Monomer ( )

Constructor.

Definition at line 13 of file Monomer.cpp.

Member Function Documentation

◆ setId()

void Pscf::Monomer::setId ( int  id)

Set the integer index for this monomer type.

Parameters
idnew value for index

Definition at line 18 of file Monomer.cpp.

References id().

◆ id()

int Pscf::Monomer::id ( ) const
inline

Unique integer index for monomer type.

Definition at line 112 of file Monomer.h.

Referenced by setId().

◆ kuhn()

double Pscf::Monomer::kuhn ( ) const
inline

Statistical segment length (random walk step size).

Definition at line 118 of file Monomer.h.

Referenced by setKuhn().

◆ setKuhn()

void Pscf::Monomer::setKuhn ( double  kuhn)
inline

Set statistical segment length.

Definition at line 126 of file Monomer.h.

References kuhn().

Referenced by Pscf::Fd1d::Mixture::setKuhn().

◆ serialize()

template<class Archive >
void Pscf::Monomer::serialize ( Archive  ar,
const unsigned int  version 
)

Serialize to or from an archive.

Parameters
arArchive object
versionarchive format version index

Definition at line 133 of file Monomer.h.

Friends And Related Function Documentation

◆ operator>>

std::istream & operator>> ( std::istream &  in,
Monomer monomer 
)
friend

istream extractor for a Monomer.

Parameters
ininput stream
monomerMonomer to be read from stream
Returns
modified input stream

Definition at line 24 of file Monomer.cpp.

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const Monomer monomer 
)
friend

ostream inserter for a Monomer.

Parameters
outoutput stream
monomerMonomer to be written to stream
Returns
modified output stream

Definition at line 34 of file Monomer.cpp.


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