OpenAtom  Version1.5a
CP_State_GSpacePlane Class Reference

2D chare array [nchareG][nstates] Handles the electronic structure in Fourier space (referred to as GSpace). More...

#include <CP_State_GSpacePlane.h>

Inheritance diagram for CP_State_GSpacePlane:
CBase_CP_State_GSpacePlane

Public Member Functions

 CP_State_GSpacePlane (int, int, int, int, int, int, UberCollection)
 Constructor for GSpacePlane. More...
 
 CP_State_GSpacePlane (CkMigrateMessage *m)
 
void completeRDMAhandshake (RDMASetupConfirmationMsg< RDMApair_GSP_PC > *msg)
 Gets called from the PairCalc data receivers to confirm the setup of an RDMA link. More...
 
void pup (PUP::er &)
 
void acceptPairCalcAIDs (pcSetupMsg *msg)
 
void initGSpace (int, complex *, int, complex *, int, int, int, int, int, int, int)
 This method is used to accept the state data from some initializing routine. More...
 
void launchAtoms ()
 Atoms are launched by allDoneCpForces when all after ALL planes and states have reported. More...
 
void launchOrthoT ()
 = dynamics triggers send of orthoT to asymm calc when psi is done
 
void doFFT ()
 This method is used to start the forward ffts in the CP_State_GSpacePlanes. More...
 
void startNewIter ()
 
void sendPsi ()
 Send the psi out to symm PC. More...
 
void sendPsiV ()
 send psi velocities More...
 
void screenOutputPsi (int)
 output a few select psi values for post processing validation More...
 
void sendLambda ()
 After my CP forces have arrived : sendLambda. More...
 
void makePCproxies ()
 
void doneRedPsiIntegrate ()
 When all red psi have arrived, complete their integration.
 
void sendRedPsi ()
 send red psi More...
 
void combineForcesGetEke ()
 
void integrateModForce ()
 Integrate the forces. More...
 
void contributeFileOutput ()
 In this function data is written to files the simpliest way possible.
 
void unpackFileOutput (GStateOutMsg *msg)
 
void writeOutputFile ()
 
void unpackIFFT (GSIFFTMsg *)
 Entry Method. This is used to receive data from all the corresponding RealSpacePlanes, upon which the inverse FFTs are triggered. More...
 
void doIFFT ()
 
void unpackNewPsi (CkReductionMsg *msg)
 
void unpackNewPsi (partialResultMsg *msg)
 Accept partial results when symm PC s sending to us directly. More...
 
void doNewPsi ()
 All Psi have arrived, finish the new Psi process. More...
 
void collectFileOutput (GStateOutMsg *msg)
 
void unpackNewPsiV (CkReductionMsg *msg)
 
void unpackNewPsiV (partialResultMsg *msg)
 
void doNewPsiV ()
 process all the PsiV data More...
 
void psiCgOvlap (CkReductionMsg *msg)
 Entry method to resume execution after computing reduction over all planes and states to form psiCgOvlap (cg only) and magforPsi. More...
 
void unpackLambda (CkReductionMsg *msg)
 
void unpackLambda (partialResultMsg *msg)
 
void doLambda ()
 When all the inputs have arrived, complete the lambda computation. More...
 
void unpackRedPsi (GSRedPsiMsg *msg)
 = More...
 
void initBeadCookie (ICCookieMsg *m)
 
void minimizeSync (ICCookieMsg *m)
 
void computeCgOverlap ()
 If minimization : compute lambda matrix (Lagrange multipliers) modify forces using the lambda matrix compute the |force|^2 = fovlap. More...
 
void sendFFTData ()
 Send result to realSpacePlane : perform the transpose Force data cannot be overwritten due to all to all nature of comm. More...
 
void setExitFlag ()
 
void readFile ()
 In this function data is read from files, and sent to the corresponding G-space planes. More...
 
void computeEnergies (int p, double d)
 Once All chares have completed energy computation and reduction, this storage routine is invoked. More...
 
void startFFT (CkReductionMsg *msg)
 
void sendRedPsiV ()
 
void unpackRedPsiV (GSRedPsiMsg *msg)
 
void doneRedPsiVIntegrate ()
 when all red psi velocities are in, integrate
 
void screenPrintWallTimes ()
 
void acceptNewTemperature (double temp)
 

Public Attributes

int istate_ind
 My state index.
 
int iplane_ind
 My plane index.
 
int ibead_ind
 
int kpoint_ind
 
int itemper_ind
 
int ispin_ind
 
int iteration
 
int iRecvRedPsi
 
int cleanExitCalled
 
bool doneDoingIFFT
 
CProxy_Ortho myOrtho
 A proxy for the my ortho chare array so I can interact with it.
 
int halfStepEvolve
 
int redPlane
 
int registrationFlag
 
int nrotation
 
int exitFlag
 
int exitFlagMin
 
int outputFlag
 
int iRecvRedPsiV
 
int iSentRedPsi
 
int iSentRedPsiV
 
int finishedCpIntegrate
 
int numRecvRedPsi
 
int iterRotation
 
int myBeadIndex
 
int myKptIndex
 
int myTemperIndex
 
int mySpinIndex
 
double ake_old
 
bool acceptedVPsi
 
const UberCollection thisInstance
 
CkSectionInfo beadCookie
 

Private Attributes

FILE * temperScreenFile
 
double * wallTimeArr
 
int gotHandles
 
int forwardTimeKeep
 
int backwardTimeKeep
 
int ireset_cg
 
int numReset_cg
 
int istart_typ_cp
 
int countIFFT
 
int countFileOut
 
int countRedPsi
 
int countRedPsiV
 
int ecount
 
int countPsi
 
int countVPsi
 
int countLambda
 
int * countPsiO
 
int * countVPsiO
 
int * countLambdaO
 
int AllPsiExpected
 
int AllLambdaExpected
 
int numRDMAlinksSymm
 The number of symmetric and asymmetric PCs that communicate with me.
 
int numRDMAlinksAsymm
 
int itemp
 
int jtemp
 
bool initialized
 
bool acceptedPsi
 
bool allAcceptedVPsi
 
bool doneNewIter
 
bool acceptedLambda
 
double ehart_total
 
double enl_total
 
double eke_total
 
double fictEke_total
 
double fmagPsi_total
 
double fmagPsi_total_old
 
double fmagPsi_total0
 
double fovlap
 
double fovlap_old
 
double egga_total
 
double eexc_total
 
double eext_total
 
double ewd_total
 
double total_energy
 
double cpuTimeNow
 
int gSpaceNumPoints
 
GStateSlab gs
 
int * tk_x
 
int * tk_y
 
int * tk_z
 
complextpsi
 
complextvpsi
 
CProxy_CP_State_RealSpacePlane real_proxy
 
CProxySection_PairCalculator * lambdaproxy
 
CProxySection_PairCalculator * lambdaproxyother
 
CProxySection_PairCalculator * psiproxy
 
CProxySection_PairCalculator * psiproxyother
 
PCCommManager symmPCmgr
 Manages communication with the symmetric paircalc array.
 
PCCommManager asymmPCmgr
 Manages communication with the asymmetric paircalc array.
 

Friends

class CP_State_ParticlePlane
 

Detailed Description

2D chare array [nchareG][nstates] Handles the electronic structure in Fourier space (referred to as GSpace).

Due to spherical cutoff sparsity, GSpace is rearranged into approximately equal size chunks nchareg. The number of chunks is a free parameter selected at runtime. A 2D chare array [nchareG][nstates] holding the electronic structure in Fourier space (referred to as GSpace). Due to spherical cutoff sparsity, GSpace is rearranged into approximately equal size chunks nchareg. The number of chunks is a free parameter selected at runtime.

This is a description of the 'life' of a CP_State_GSpacePlane object. At the beginning of the program, the constructor CP_State_GSpacePlane() is called, to initialize the CP_State_GSpacePlane array. The GSpaceSlab within the CP_State_GSpacePlane is initialized using the initGSpace(...) method.

To start off an iteration of program execution, the method doFFT() is called. As part of this method, the CP_State_GSpacePlane object does a forward 1-D fft on its slab of data, and sends off this data to the next stage in the computational loop. After this, the CP_State_GSpacePlane is idle, waiting for a message to trigger some computation/communication.

The idle period of the CP_State_GSpacePlane is terminated by a called to the method doIFFT(). In this method, the CP_State_GSpacePlane receives the partially processed data from the CP_State_RealSpacePlanes and performs 1-D inverse FFT on its slab of data. Then the calculation of the "S" matrix is started by calling the sendPsi() method

After the forces are calculated using the inverse FFT, a check is done to see if the forces from the particle calculations are ready. If so, the forces are added up. The sendPsi() method is not called until the forces from the particle calculations and the forces from the quantum computation are ready.

The object is idle until the corrected g-space data from orthonormalization is received through the acceptNewPsi() method.

Definition at line 118 of file CP_State_GSpacePlane.h.


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