#include <ComputePatch.h>
Inheritance diagram for ComputePatch:

Public Member Functions | |
| ComputePatch (ComputeID c, PatchID pid) | |
| virtual | ~ComputePatch () |
| virtual void | initialize () |
| virtual void | atomUpdate () |
| virtual void | doWork () |
Protected Member Functions | |
| virtual void | doForce (CompAtom *p, Results *r)=0 |
Protected Attributes | |
| int | numAtoms |
| Patch * | patch |
|
||||||||||||
|
Definition at line 22 of file ComputePatch.C. References patch, and Compute::setNumPatches(). 00022 : Compute(c) { 00023 setNumPatches(1); 00024 patchID = p; 00025 patch = NULL; 00026 positionBox = NULL; 00027 forceBox = NULL; 00028 }
|
|
|
Definition at line 30 of file ComputePatch.C. References DebugM, numAtoms, PatchMap::Object(), PatchMap::patch(), Patch::unregisterForceDeposit(), and Patch::unregisterPositionPickup(). 00030 {
00031 DebugM(4, "~ComputePatch("<<cid<<") numAtoms("<<patchID<<") = "
00032 << numAtoms << "\n");
00033 if (positionBox != NULL) {
00034 PatchMap::Object()->patch(patchID)->unregisterPositionPickup(cid,
00035 &positionBox);
00036 }
00037 if (forceBox != NULL) {
00038 PatchMap::Object()->patch(patchID)->unregisterForceDeposit(cid,
00039 &forceBox);
00040 }
00041 }
|
|
|
Reimplemented from Compute. Definition at line 72 of file ComputePatch.C. References Patch::getNumAtoms(), numAtoms, and patch. 00072 {
00073 // How can we tell if BoxOwner has packed up and left? Need a mechanism
00074 // to handle this or do we assume the Boxes have been dumped?
00075 numAtoms = patch->getNumAtoms();
00076
00077 // DMK - Atom Separation (water vs. non-water)
00078 #if NAMD_SeparateWaters != 0
00079 numWaterAtoms = patch->getNumWaterAtoms();
00080 #endif
00081 }
|
|
||||||||||||
|
Implemented in ComputeCylindricalBC, ComputeNonbondedSelf, ComputeRestraints, and ComputeSphericalBC. Referenced by doWork(). |
|
|
Reimplemented from Compute. Definition at line 83 of file ComputePatch.C. References Box< Owner, Data >::close(), DebugM, doForce(), Box< Owner, Data >::open(), and patch. 00083 {
00084 CompAtom* p;
00085 Results* r;
00086
00087 DebugM(3,patchID << ": doWork() called.\n");
00088
00089 // Open up positionBox, forceBox
00090 p = positionBox->open();
00091 r = forceBox->open();
00092
00093 // Pass pointers to doForce
00094 #ifdef MEM_OPT_VERSION
00095 doForce(p, patch->getCompAtomExtInfo(), r);
00096 #else
00097 doForce(p,r);
00098 #endif
00099
00100 // Close up boxes
00101 positionBox->close(&p);
00102 forceBox->close(&r);
00103
00104 DebugM(2,patchID << ": doWork() completed.\n");
00105 }
|
|
|
Reimplemented from Compute. Reimplemented in ComputeNonbondedSelf. Definition at line 43 of file ComputePatch.C. References COMPUTE_HOME_PRIORITY, COMPUTE_PROXY_PRIORITY, DebugM, Patch::getNumAtoms(), Patch::getPatchID(), Compute::initialize(), NAMD_bug(), PatchMap::node(), numAtoms, PatchMap::Object(), PatchMap::patch(), patch, PATCH_PRIORITY, Patch::registerForceDeposit(), and Patch::registerPositionPickup(). Referenced by ComputeNonbondedSelf::initialize(). 00043 {
00044 // How can we tell if BoxOwner has packed up and left? Need a mechanism
00045 // to handle this or do we assume the Boxes have been dumped?
00046
00047 if (positionBox == NULL) { // We have yet to get boxes
00048 if (!(patch = PatchMap::Object()->patch(patchID))) {
00049 NAMD_bug("ComputePatch used with unknown patch.");
00050 }
00051 DebugM(3, "initialize(" << cid <<") patchid = "<<patch->getPatchID()<<"\n");
00052 positionBox = patch->registerPositionPickup(cid);
00053 forceBox = patch->registerForceDeposit(cid);
00054 }
00055 numAtoms = patch->getNumAtoms();
00056
00057 DebugM(3, "initialize("<<cid<<") numAtoms("<<patchID<<") = "
00058 << numAtoms << " patchAddr=" << patch << "\n");
00059 Compute::initialize();
00060
00061 int myNode = CkMyPe();
00062 if ( PatchMap::Object()->node(patchID) != myNode )
00063 {
00064 basePriority = COMPUTE_PROXY_PRIORITY + PATCH_PRIORITY(patchID);
00065 }
00066 else
00067 {
00068 basePriority = COMPUTE_HOME_PRIORITY + PATCH_PRIORITY(patchID);
00069 }
00070 }
|
|
|
Definition at line 35 of file ComputePatch.h. Referenced by atomUpdate(), initialize(), and ~ComputePatch(). |
|
|
Definition at line 47 of file ComputePatch.h. Referenced by atomUpdate(), ComputePatch(), doWork(), and initialize(). |
1.3.9.1