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

A junction or chain end in a block polymer. More...

#include <Vertex.h>

Public Member Functions

 Vertex ()
 Constructor. More...
 
 ~Vertex ()
 Destructor. More...
 
void setId (int id)
 Set the integer identifier of this vertex. More...
 
void addBlock (BlockDescriptor const &block)
 Add block to the list of attached blocks. More...
 
int id () const
 Get the id of this vertex. More...
 
int size () const
 Get the number of attached blocks. More...
 
Pair< int > const & inPropagatorId (int i) const
 Get the block and direction of an incoming propagator. More...
 
Pair< int > const & outPropagatorId (int i) const
 Get the block and direction of an outgoing propagator. More...
 

Detailed Description

A junction or chain end in a block polymer.

Definition at line 25 of file Vertex.h.

Constructor & Destructor Documentation

◆ Vertex()

Pscf::Vertex::Vertex ( )

Constructor.

Definition at line 18 of file Vertex.cpp.

◆ ~Vertex()

Pscf::Vertex::~Vertex ( )

Destructor.

Definition at line 27 of file Vertex.cpp.

Member Function Documentation

◆ setId()

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

Set the integer identifier of this vertex.

Parameters
ididentifier

Definition at line 34 of file Vertex.cpp.

References id().

◆ addBlock()

void Pscf::Vertex::addBlock ( BlockDescriptor const &  block)

Add block to the list of attached blocks.

Preconditions: The id for this vertex must have been set, vertex ids must have been set for the block, and the id of this vertex must match one of the ids for the two vertices attached to the block.

Parameters
blockattached BlockDescriptor object

Definition at line 40 of file Vertex.cpp.

References Pscf::BlockDescriptor::id(), UTIL_THROW, and Pscf::BlockDescriptor::vertexId().

◆ id()

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

Get the id of this vertex.

Definition at line 102 of file Vertex.h.

Referenced by setId().

◆ size()

int Pscf::Vertex::size ( ) const
inline

◆ inPropagatorId()

Pair< int > const & Pscf::Vertex::inPropagatorId ( int  i) const
inline

Get the block and direction of an incoming propagator.

The first element of the integer pair is the block id, and the second is a direction id which is 0 if this vertex is vertex 1 of the block, and 1 if this vertex is vertex 0.

Parameters
iindex of incoming propagator
Returns
Pair<int> containing block index, direction index

Definition at line 109 of file Vertex.h.

Referenced by Pscf::PolymerTmpl< Block >::makePlan(), Pscf::PolymerTmpl< Block >::readParameters(), and Pscf::Fd1d::FieldIo::writeVertexQ().

◆ outPropagatorId()

Pair< int > const & Pscf::Vertex::outPropagatorId ( int  i) const
inline

Get the block and direction of an outgoing propagator.

The first element of the integer pair is the block id, and the second is a direction id which is 0 if this vertex is vertex 0 of the block, and 1 if this vertex is vertex 1.

Parameters
iindex of incoming propagator
Returns
Pair<int> containing block index, direction index

Definition at line 113 of file Vertex.h.


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