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

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

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

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

Member Data Documentation

◆ data

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

Definition at line 143 of file CollectionMgr.h.

Referenced by submitData().


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