Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

GlobalMasterTcl Class Reference

#include <GlobalMasterTcl.h>

Inheritance diagram for GlobalMasterTcl:

GlobalMaster List of all members.

Public Member Functions

 GlobalMasterTcl ()
 ~GlobalMasterTcl ()

Protected Member Functions

virtual void calculate ()

Constructor & Destructor Documentation

GlobalMasterTcl::GlobalMasterTcl  ) 
 

Definition at line 465 of file GlobalMasterTcl.C.

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

00465                                  {
00466   DebugM(3,"Constructing GlobalMasterTcl\n");
00467 #ifdef NAMD_TCL
00468   interp = 0;
00469 #endif
00470   reduction = ReductionMgr::Object()->willSubmit(REDUCTIONS_BASIC);
00471   initialize();
00472   DebugM(2,"Done constructing ("<<requestedGroups().size()<<" initial groups)\n");
00473 }

GlobalMasterTcl::~GlobalMasterTcl  ) 
 

Definition at line 475 of file GlobalMasterTcl.C.

References DebugM.

00475                                   {
00476   DebugM(3,"Destructing GlobalMasterTcl\n");
00477 #ifdef NAMD_TCL
00478 /*
00479   if ( interp ) Tcl_DeleteInterp(interp);
00480 */
00481 #endif
00482   delete reduction;
00483 }


Member Function Documentation

void GlobalMasterTcl::calculate  )  [protected, virtual]
 

Reimplemented from GlobalMaster.

Definition at line 565 of file GlobalMasterTcl.C.

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

00565                                 {
00566   DebugM(4,"Calculating forces on master\n");
00567 
00568   /* clear out the requested forces first! */
00569   modifyAppliedForces().resize(0);
00570   modifyForcedAtoms().resize(0);
00571   modifyGroupForces().setall(Vector(0,0,0));
00572 
00573 #ifdef NAMD_TCL
00574   // Call interpreter to calculate forces
00575 
00576   char cmd[129];  int code;
00577   strcpy(cmd,"calcforces");  code = Tcl_Eval(interp,cmd);
00578   const char *result = Tcl_GetStringResult(interp);
00579   if (*result != 0) CkPrintf("TCL: %s\n",result);
00580   if (code != TCL_OK) {
00581     const char *errorInfo = Tcl_GetVar(interp,"errorInfo",0);
00582     NAMD_die(errorInfo);
00583   }
00584 #endif
00585 
00586   reduction->submit();
00587 
00588 }


The documentation for this class was generated from the following files:
Generated on Fri May 25 04:07:22 2012 for NAMD by  doxygen 1.3.9.1