NAMD
Public Member Functions | Protected Member Functions | List of all members
GlobalMasterTcl Class Reference

#include <GlobalMasterTcl.h>

Inheritance diagram for GlobalMasterTcl:
GlobalMaster

Public Member Functions

 GlobalMasterTcl ()
 
 ~GlobalMasterTcl ()
 
- Public Member Functions inherited from GlobalMaster
void processData (AtomIDList::iterator a_i, AtomIDList::iterator a_e, PositionList::iterator p_i, PositionList::iterator g_i, PositionList::iterator g_e, BigRealList::iterator gm_i, BigRealList::iterator gm_e, ForceList::iterator gtf_i, ForceList::iterator gtf_e, IntList::iterator goi_i, IntList::iterator goi_e, BigRealList::iterator gov_i, BigRealList::iterator gov_e, AtomIDList::iterator last_atoms_forced_i, AtomIDList::iterator last_atoms_forced_e, ForceList::iterator last_forces_i, AtomIDList::iterator, AtomIDList::iterator, ForceList::iterator)
 
bool changedAtoms ()
 
const AtomIDListrequestedAtoms ()
 
bool changedForces ()
 
const AtomIDListforcedAtoms ()
 
const ForceListappliedForces ()
 
bool changedGroups ()
 
const ResizeArray< AtomIDList > & requestedGroups ()
 
const ForceListgroupForces ()
 
bool changedGridObjs ()
 
const IntListrequestedGridObjs ()
 
const BigRealListgridObjForces ()
 
bool requestedTotalForces ()
 
void clearChanged ()
 
virtual ~GlobalMaster ()
 
void check () const
 
void setLattice (const Lattice *lat)
 

Protected Member Functions

virtual void calculate ()
 
- Protected Member Functions inherited from GlobalMaster
 GlobalMaster ()
 
AtomIDListmodifyRequestedAtoms ()
 
AtomIDListmodifyForcedAtoms ()
 
ForceListmodifyAppliedForces ()
 
ResizeArray< AtomIDList > & modifyRequestedGroups ()
 
ForceListmodifyGroupForces ()
 
IntListmodifyRequestedGridObjects ()
 
BigRealListmodifyGridObjForces ()
 
AtomIDList::const_iterator getAtomIdBegin ()
 
AtomIDList::const_iterator getAtomIdEnd ()
 
PositionList::const_iterator getAtomPositionBegin ()
 
PositionList::const_iterator getGroupPositionBegin ()
 
PositionList::const_iterator getGroupPositionEnd ()
 
ForceList::const_iterator getGroupTotalForceBegin ()
 
ForceList::const_iterator getGroupTotalForceEnd ()
 
IntList::const_iterator getGridObjIndexBegin ()
 
IntList::const_iterator getGridObjIndexEnd ()
 
BigRealList::const_iterator getGridObjValueBegin ()
 
BigRealList::const_iterator getGridObjValueEnd ()
 
AtomIDList::const_iterator getLastAtomsForcedBegin ()
 
AtomIDList::const_iterator getLastAtomsForcedEnd ()
 
ForceList::const_iterator getLastForcesBegin ()
 
AtomIDList::const_iterator getForceIdBegin ()
 
AtomIDList::const_iterator getForceIdEnd ()
 
ForceList::const_iterator getTotalForce ()
 
void requestTotalForce (bool yesno=true)
 
BigRealList::const_iterator getGroupMassBegin ()
 
BigRealList::const_iterator getGroupMassEnd ()
 

Additional Inherited Members

- Public Attributes inherited from GlobalMaster
int step
 
int old_num_groups_requested
 
- Protected Attributes inherited from GlobalMaster
bool totalForceRequested
 
const Latticelattice
 
AtomIDList::iterator atomIdBegin
 
AtomIDList::iterator atomIdEnd
 
PositionList::iterator atomPositionBegin
 
PositionList::iterator groupPositionBegin
 
PositionList::iterator groupPositionEnd
 
BigRealList::iterator groupMassBegin
 
BigRealList::iterator groupMassEnd
 
ForceList::iterator groupTotalForceBegin
 
ForceList::iterator groupTotalForceEnd
 
IntList::iterator gridObjIndexBegin
 
IntList::iterator gridObjIndexEnd
 
BigRealList::iterator gridObjValueBegin
 
BigRealList::iterator gridObjValueEnd
 
AtomIDList::iterator lastAtomsForcedBegin
 
ForceList::iterator lastForcesBegin
 
AtomIDList::iterator lastAtomsForcedEnd
 
AtomIDList::iterator forceIdBegin
 
AtomIDList::iterator forceIdEnd
 
ForceList::iterator totalForceBegin
 
bool reqAtomsChanged
 
AtomIDList reqAtoms
 
bool appForcesChanged
 
AtomIDList fAtoms
 
ForceList appForces
 
bool reqGroupsChanged
 
ResizeArray< AtomIDListreqGroups
 
ForceList grpForces
 
bool reqGridObjsChanged
 
IntList reqGridObjs
 
BigRealList gridobjForces
 

Detailed Description

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 18 of file GlobalMasterTcl.h.

Constructor & Destructor Documentation

GlobalMasterTcl::GlobalMasterTcl ( )

Definition at line 523 of file GlobalMasterTcl.C.

References DebugM, ReductionMgr::Object(), REDUCTIONS_BASIC, GlobalMaster::requestedGroups(), and ReductionMgr::willSubmit().

523  {
524  DebugM(3,"Constructing GlobalMasterTcl\n");
525 #ifdef NAMD_TCL
526  interp = 0;
527 #endif
529  initialize();
530  DebugM(2,"Done constructing ("<<requestedGroups().size()<<" initial groups)\n");
531 }
#define DebugM(x, y)
Definition: Debug.h:59
SubmitReduction * willSubmit(int setID, int size=-1)
Definition: ReductionMgr.C:365
static ReductionMgr * Object(void)
Definition: ReductionMgr.h:278
const ResizeArray< AtomIDList > & requestedGroups()
Definition: GlobalMaster.C:149
GlobalMasterTcl::~GlobalMasterTcl ( )

Definition at line 533 of file GlobalMasterTcl.C.

References DebugM.

533  {
534  DebugM(3,"Destructing GlobalMasterTcl\n");
535 #ifdef NAMD_TCL
536 /*
537  if ( interp ) Tcl_DeleteInterp(interp);
538 */
539 #endif
540  delete reduction;
541 }
#define DebugM(x, y)
Definition: Debug.h:59

Member Function Documentation

void GlobalMasterTcl::calculate ( )
protectedvirtual

Reimplemented from GlobalMaster.

Definition at line 620 of file GlobalMasterTcl.C.

References DebugM, GlobalMaster::getGroupMassBegin(), GlobalMaster::getGroupMassEnd(), GlobalMaster::modifyAppliedForces(), GlobalMaster::modifyForcedAtoms(), GlobalMaster::modifyGroupForces(), NAMD_die(), ResizeArray< T >::resize(), ResizeArray< T >::setall(), and SubmitReduction::submit().

620  {
621  DebugM(4,"Calculating forces on master\n");
622 
623  /* clear out the requested forces first! */
627  modifyGroupForces().setall(Vector(0,0,0));
628 
629 #ifdef NAMD_TCL
630  // Call interpreter to calculate forces
631 
632  char cmd[129]; int code;
633  strcpy(cmd,"calcforces"); code = Tcl_Eval(interp,cmd);
634  const char *result = Tcl_GetStringResult(interp);
635  if (*result != 0) CkPrintf("TCL: %s\n",result);
636  if (code != TCL_OK) {
637  const char *errorInfo = Tcl_GetVar(interp,"errorInfo",0);
638  NAMD_die(errorInfo ? errorInfo : "Unknown Tcl error");
639  }
640 #endif
641 
642  reduction->submit();
643 
644 }
ForceList & modifyAppliedForces()
Definition: GlobalMaster.C:162
Definition: Vector.h:64
#define DebugM(x, y)
Definition: Debug.h:59
BigRealList::const_iterator getGroupMassEnd()
Definition: GlobalMaster.C:239
void setall(const Elem &elem)
Definition: ResizeArray.h:90
AtomIDList & modifyForcedAtoms()
Definition: GlobalMaster.C:157
void NAMD_die(const char *err_msg)
Definition: common.C:85
BigRealList::const_iterator getGroupMassBegin()
Definition: GlobalMaster.C:234
ForceList & modifyGroupForces()
Definition: GlobalMaster.C:167
void resize(int i)
Definition: ResizeArray.h:84
void submit(void)
Definition: ReductionMgr.h:323

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