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 globalMasterStep
 
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::GlobalMasterTcl ( )

Definition at line 524 of file GlobalMasterTcl.C.

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

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

◆ ~GlobalMasterTcl()

GlobalMasterTcl::~GlobalMasterTcl ( )

Definition at line 534 of file GlobalMasterTcl.C.

References DebugM.

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

Member Function Documentation

◆ calculate()

void GlobalMasterTcl::calculate ( )
protectedvirtual

Reimplemented from GlobalMaster.

Definition at line 621 of file GlobalMasterTcl.C.

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

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

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