NAMD
Public Member Functions | Public Attributes | List of all members
CollectionMgr::CollectVectorSequence Class Reference

#include <CollectionMgr.h>

Public Member Functions

CollectVectorInstancesubmitData (int seq, AtomIDList &i, ResizeArray< Vector > &d, int prec=2)
 

Public Attributes

ResizeArray
< CollectVectorInstance * > 
data
 

Detailed Description

Definition at line 100 of file CollectionMgr.h.

Member Function Documentation

CollectVectorInstance* CollectionMgr::CollectVectorSequence::submitData ( int  seq,
AtomIDList i,
ResizeArray< Vector > &  d,
int  prec = 2 
)
inline

Definition at line 107 of file CollectionMgr.h.

References data, CollectionMgr::CollectVectorInstance::notfree(), and CollectionMgr::CollectVectorInstance::seq.

Referenced by CollectionMgr::submitForces(), CollectionMgr::submitPositions(), and CollectionMgr::submitVelocities().

110  {
111  CollectVectorInstance **c = data.begin();
112  CollectVectorInstance **c_e = data.end();
113  for( ; c != c_e && (*c)->seq != seq; ++c );
114  if ( c == c_e )
115  {
116  c = data.begin();
117  for( ; c != c_e && (*c)->notfree(); ++c );
118  if ( c == c_e ) {
119  data.add(new CollectVectorInstance);
120  c = data.end() - 1;
121  }
122  (*c)->reset(seq,prec);
123  }
124 #ifdef MEM_OPT_VERSION
125  if ( (*c)->append(i, oRank, d) )
126 #else
127  if ( (*c)->append(i,d) )
128 #endif
129  {
130  return *c;
131  }
132  else
133  {
134  return 0;
135  }
136  }
ResizeArray< CollectVectorInstance * > data

Member Data Documentation

ResizeArray<CollectVectorInstance*> CollectionMgr::CollectVectorSequence::data

Definition at line 138 of file CollectionMgr.h.

Referenced by submitData().


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