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 103 of file CollectionMgr.h.

Member Function Documentation

◆ submitData()

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

Definition at line 110 of file CollectionMgr.h.

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

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

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

Member Data Documentation

◆ data

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

Definition at line 140 of file CollectionMgr.h.

Referenced by submitData().


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