CollectionMaster::CollectVectorInstance Class Reference

#include <CollectionMaster.h>

List of all members.

Public Member Functions

 CollectVectorInstance (void)
 CollectVectorInstance (int s)
void free ()
int notfree ()
void reset (int s)
void append (CollectVectorMsg *msg, int max_index)
int ready (void)

Public Attributes

int seq
Lattice lattice
ResizeArray< Vectordata
ResizeArray< FloatVectorfdata


Detailed Description

Definition at line 189 of file CollectionMaster.h.


Constructor & Destructor Documentation

CollectionMaster::CollectVectorInstance::CollectVectorInstance ( void   )  [inline]

Definition at line 193 of file CollectionMaster.h.

00193 : seq(-10) { ; }

CollectionMaster::CollectVectorInstance::CollectVectorInstance ( int  s  )  [inline]

Definition at line 195 of file CollectionMaster.h.

References reset().

00195 { reset(s); }


Member Function Documentation

void CollectionMaster::CollectVectorInstance::append ( CollectVectorMsg msg,
int  max_index 
) [inline]

Definition at line 209 of file CollectionMaster.h.

References CollectVectorMsg::aid, CollectVectorMsg::aid_size, ResizeArray< Elem >::begin(), data, CollectVectorMsg::data, CollectVectorMsg::data_size, fdata, CollectVectorMsg::fdata, CollectVectorMsg::fdata_size, and ResizeArray< Elem >::resize().

00210     {
00211       AtomID *a = msg->aid;
00212       Vector *d = msg->data;
00213       FloatVector *fd = msg->fdata;
00214       int size = msg->aid_size;
00215       if ( msg->data_size ) {
00216         data.resize(max_index);
00217         Vector *ptr = data.begin();
00218         for( int i = 0; i < size; ++i ) { ptr[a[i]] = d[i]; }
00219       }
00220       if ( msg->fdata_size ) {
00221         fdata.resize(max_index);
00222         FloatVector *ptr = fdata.begin();
00223         for( int i = 0; i < size; ++i ) { ptr[a[i]] = fd[i]; }
00224       }
00225       --remaining;
00226     }

void CollectionMaster::CollectVectorInstance::free (  )  [inline]

Definition at line 197 of file CollectionMaster.h.

Referenced by CollectionMaster::disposeForces(), CollectionMaster::disposePositions(), CollectionMaster::disposeVelocities(), CollectionMaster::startNextRoundOutputForce(), CollectionMaster::startNextRoundOutputPos(), and CollectionMaster::startNextRoundOutputVel().

00197 { seq = -10; }

int CollectionMaster::CollectVectorInstance::notfree (  )  [inline]

Definition at line 198 of file CollectionMaster.h.

00198 { return ( seq != -10 ); }

int CollectionMaster::CollectVectorInstance::ready ( void   )  [inline]

Definition at line 228 of file CollectionMaster.h.

00228 { return ( ! remaining ); }

void CollectionMaster::CollectVectorInstance::reset ( int  s  )  [inline]

Definition at line 200 of file CollectionMaster.h.

References data, fdata, NAMD_bug(), PatchMap::Object(), and ResizeArray< Elem >::resize().

Referenced by CollectVectorInstance().

00200                       {
00201         if ( s == -10 ) NAMD_bug("seq == free in CollectionMaster");
00202         seq = s;
00203         remaining = (PatchMap::Object())->numNodesWithPatches(); 
00204         data.resize(0);
00205         fdata.resize(0);
00206     }


Member Data Documentation

ResizeArray<Vector> CollectionMaster::CollectVectorInstance::data

Definition at line 233 of file CollectionMaster.h.

Referenced by append(), CollectionMaster::disposeForces(), CollectionMaster::disposePositions(), CollectionMaster::disposeVelocities(), and reset().

ResizeArray<FloatVector> CollectionMaster::CollectVectorInstance::fdata

Definition at line 234 of file CollectionMaster.h.

Referenced by append(), CollectionMaster::disposePositions(), and reset().

Lattice CollectionMaster::CollectVectorInstance::lattice

Definition at line 231 of file CollectionMaster.h.

Referenced by CollectionMaster::disposePositions().

int CollectionMaster::CollectVectorInstance::seq

Definition at line 230 of file CollectionMaster.h.

Referenced by CollectionMaster::disposeForces(), CollectionMaster::disposePositions(), CollectionMaster::disposeVelocities(), CollectionMaster::startNextRoundOutputForce(), CollectionMaster::startNextRoundOutputPos(), CollectionMaster::startNextRoundOutputVel(), and CollectionMaster::wrapCoorFinished().


The documentation for this class was generated from the following file:
Generated on Wed Nov 22 01:17:19 2017 for NAMD by  doxygen 1.4.7