00001
00002
00003
00004
00005
00006
00007 #ifndef _ReductionClients_
00008 #define _ReductionClients_
00009
00010
00011
00012
00013
00014
00015
00016 void doneCreatingPP(void *param, int dataSize, void *data) {
00017
00018 }
00019
00020
00021
00022
00023
00024
00025 void printEnergyHart(void *param, int dataSize, void *data){
00026 static double ehart = 0, eext = 0.0, ewd = 0.0;
00027
00028 ehart = ((double *)data)[0];
00029 eext = ((double *)data)[1];
00030 ewd = ((double *)data)[2];
00031
00032 CkPrintf("EHART = %5.8lf\n", ehart);
00033 CkPrintf("EExt = %5.8lf\n", eext);
00034 CkPrintf("EWALD_recip = %5.8lf\n", ewd);
00035
00036 gSpacePlaneProxy(0, 0).computeEnergies(ENERGY_EHART, ehart);
00037 gSpacePlaneProxy(0, 0).computeEnergies(ENERGY_EEXT, eext);
00038 gSpacePlaneProxy(0, 0).computeEnergies(ENERGY_EWD, ewd);
00039 }
00040
00041
00042
00043
00044
00045 void printEnergyEexc(void *param, int dataSize, void *data){
00046 static double eexc = 0;
00047 static double egga = 0;
00048
00049 egga = 0;
00050 eexc = 0;
00051
00052 eexc += ((double *)data)[0];
00053 egga += ((double *)data)[1];
00054
00055 CkPrintf("EEXC = %5.8lf\n", eexc);
00056 CkPrintf("EGGA = %5.8lf\n", egga);
00057 CkPrintf("EEXC+EGGA = %5.8lf\n", eexc+egga);
00058
00059 gSpacePlaneProxy(0, 0).computeEnergies(ENERGY_EEXC, eexc);
00060 gSpacePlaneProxy(0, 0).computeEnergies(ENERGY_EGGA, egga);
00061
00062 #define _GLENN_STUFF_OFF_
00063 #ifdef _GLENN_STUFF_
00064 CkPrintf("exiting in reductclients.h\n");CkExit();
00065 #endif
00066
00067 }
00068
00069
00070
00071
00072
00073 #endif
00074