OpenAtom  Version1.5a
Density

Computes electron density in real space, (exchange correlation energy) for transforming to CP_Rho_GSpacePlane which will utilize CP_Rho_GHartExt and CP_Rho_RHartExt (Hartree and external energies). More...

Classes

class  CP_Rho_RealSpacePlane
 
class  CP_Rho_GSpacePlane
 
class  CP_Rho_RHartExt
 
class  CP_Rho_GHartExt
 

Functions

int init_rho_chares (CPcharmParaInfo *sim, UberCollection thisInstance)
 Creating arrays CP_Rho_GSpacePlane, CP_Rho_GSpacePlaneHelper and CP_Rho_RealSpacePlane. More...
 
 CP_Rho_GHartExt::CP_Rho_GHartExt (int, int, int, int, int, UberCollection)
 This object just gets a rho message, computes GHartExt, and sends vks. More...
 
void CP_Rho_GHartExt::init ()
 Post constructor initialization /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
 CP_Rho_GHartExt::~CP_Rho_GHartExt ()
 Destructor /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.
 
void CP_Rho_GHartExt::pup (PUP::er &)
 
void CP_Rho_GHartExt::acceptData (RhoGHartMsg *msg)
 The density arrives from RhoGspace ONCE a time step /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_GHartExt::HartExtVksG ()
 Compute hartree eext and vks using the N^2 method /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_GHartExt::FFTVks ()
 Partly fft vks(gx,gy,gz) -> vks(gx,gy,z) More...
 
void CP_Rho_GHartExt::sendVks ()
 Send vks_hart_ext back to rho_real where fft(gx,gy) will be performed /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_GHartExt::registrationDone (CkReductionMsg *msg)
 = Make sure everyone is registered on the 1st time step
 
void CP_Rho_GHartExt::recvAtmSFFromRhoRHart (RhoGHartMsg *msg)
 Recv Atm SF from RhoRhart : Euler Exponential spline based method /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_GHartExt::FFTEesBck ()
 Finish FFting to G-space :: 2D) atmSF(gx,gy,z) -> atmSF(gx,gy,gz) More...
 
void CP_Rho_GHartExt::getHartEextEes ()
 compute HartreeEextEes More...
 
void CP_Rho_GHartExt::FFTEesFwd (int)
 Statr FFting to R-space atmSF(gx,gy,gz) -> atmSF(gx,gy,z) /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.
 
void CP_Rho_GHartExt::sendAtmSF (int)
 Send the SF data to back to Rhart to get atm forces /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_GHartExt::acceptAtmSFTot (int size, complex *inAtm)
 Collect the SF from all the atm type chares on chare 0 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_GHartExt::acceptVks (int size, complex *inVks)
 Collect the VKS from all the atm type chares on chare 1 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_GHartExt::exitForDebugging ()
 Glenn's special exit.
 
 CP_Rho_GSpacePlane::CP_Rho_GSpacePlane (int, int, int, bool, UberCollection)
 extern ComlibInstanceHandle mssInstance; More...
 
void CP_Rho_GSpacePlane::init ()
 post constructor initialization /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// More...
 
void CP_Rho_GSpacePlane::pup (PUP::er &p)
 
void CP_Rho_GSpacePlane::acceptRhoData (RhoGSFFTMsg *msg)
 RhoReal sends rho(gx,gy,z) here such that it is now decomposed with lines of constant gx,gy in funny order to load balance. More...
 
void CP_Rho_GSpacePlane::doRhoFFT ()
 Complete the FFT to give use Rho(gx,gy,gz) /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_GSpacePlane::launchNlG ()
 The density is here : Launch ees NL. More...
 
void CP_Rho_GSpacePlane::divRhoVksGspace ()
 invoke fft subroutine : doFwFFT() unpack do an FFT 1D along z rho(gx,gy,gz) parallelized in full z-lines with constant (gx,gy) invoke a transpose back to r-space More...
 
void CP_Rho_GSpacePlane::RhoGSendRhoR (int)
 
void CP_Rho_GSpacePlane::RhoGSendRhoRall ()
 
void CP_Rho_GSpacePlane::acceptWhiteByrd (RhoGSFFTMsg *)
 RhoReal sends rho(gx,gy,z) here such that it is now decomposed with lines of constant gx,gy in funny order to load balance. More...
 
void CP_Rho_GSpacePlane::acceptWhiteByrdAll (RhoGSFFTMsg *msg)
 RhoReal sends rho(gx,gy,z) here such that it is now decomposed with lines of constant gx,gy in funny order to load balance. More...
 
void CP_Rho_GSpacePlane::acceptWhiteByrd ()
 
void CP_Rho_GSpacePlane::ResumeFromSync ()
 
void CP_Rho_GSpacePlane::exitForDebugging ()
 Glenn's RhoReal exit.
 
 CP_Rho_RealSpacePlane::CP_Rho_RealSpacePlane (int, bool, int, int, int, UberCollection)
 This class (array) accepts the real space densities from all the states Performs lots of operations to get exc, eext energies and vks. More...
 
void CP_Rho_RealSpacePlane::init ()
 post constructor initialization More...
 
void CP_Rho_RealSpacePlane::pup (PUP::er &)
 Pup my variables for migration.
 
void CP_Rho_RealSpacePlane::acceptDensity (CkReductionMsg *)
 Data comes from StateRspacePlane once an algorithm step. More...
 
void CP_Rho_RealSpacePlane::handleDensityReduction ()
 Handle the memory cleanup and setting of flags when density has all arrived. More...
 
void CP_Rho_RealSpacePlane::launchEextRNlG ()
 The density is here : Launch ees NL and ees Ext routines. More...
 
void CP_Rho_RealSpacePlane::energyComputation ()
 Compute one part of the EXC energy using PINY CP_exc_calc. More...
 
void CP_Rho_RealSpacePlane::fftRhoRtoRhoG ()
 1) Perform FFT of density: Single Transpose method rho(x,y,z) —> rho(gx,gy,z) Double Transpose method rho(x,y,z) —> rho(gx,y,z) More...
 
void CP_Rho_RealSpacePlane::launchNLRealFFT ()
 Launch ees-nonlocal real here. More...
 
void CP_Rho_RealSpacePlane::sendPartlyFFTRyToGy (int iopt)
 Double Transpose Fwd Send : A(gx,y,z) on the way to A(gx,gy,z) Send so that (y,z) parallelism is switched to (gx,z) More...
 
void CP_Rho_RealSpacePlane::acceptRhoGradVksRyToGy (RhoGSFFTMsg *msg)
 Double Transpose Fwd Recv : A(gx,y,z) on the way to A(gx,gy,z) Recv so that (y,z) parallel switched to (gx,z) More...
 
void CP_Rho_RealSpacePlane::fftRhoRyToGy (int iopt)
 Double Transpose Fwd FFT : A(gx,y,z) -> A(gx,gy,z) More...
 
void CP_Rho_RealSpacePlane::sendPartlyFFTtoRhoG (int)
 The Tranpose to G-space : A(gx,gy,z) on the way to A(gx,gy,gz) Change parallel by gx,z to parallel by {gx,gy} We switch chare arrays here from RhoR to RhoG. More...
 
void CP_Rho_RealSpacePlane::sendPartlyFFTtoRhoGall ()
 
void CP_Rho_RealSpacePlane::acceptGradRhoVks (RhoRSFFTMsg *)
 Accept transpose data from RhoG : receive grad_rho(gy,gx,z) More...
 
void CP_Rho_RealSpacePlane::acceptGradRhoVksAll (RhoRSFFTMsg *msg)
 Accept transpose data from RhoG : receive grad_rho(gy,gx,z) More...
 
void CP_Rho_RealSpacePlane::sendPartlyFFTGxToRx (int)
 Double Transpose Bck Send : A(gx,y,z) on the way to A(x,y,z) Send so (gx,z) parallel -> (y,z) parallel. More...
 
void CP_Rho_RealSpacePlane::acceptRhoGradVksGxToRx (RhoGSFFTMsg *msg)
 Double Transpose Bck Recv : A(gx,y,z) on the way to A(x,y,z) Recv (gx,z) parallel -> (y,z) parallel. More...
 
void CP_Rho_RealSpacePlane::GradCorr ()
 The gradient of the density is now completed. More...
 
void CP_Rho_RealSpacePlane::whiteByrdFFT ()
 The white-bird term : First fwfft redefined delrho(r) to delrho(g) then send to RhoGspacePlane. More...
 
void CP_Rho_RealSpacePlane::acceptWhiteByrd (RhoRSFFTMsg *msg)
 The white bird vks correction is returned from RhoG : VksW(gx,gy,z) This routine recvs the transpose {gx,gy} to (gx,z) More...
 
void CP_Rho_RealSpacePlane::addWhiteByrdVks ()
 Add the VksWhiteByrd to VksTot : Set the done flag. More...
 
void CP_Rho_RealSpacePlane::acceptHartVks (RhoHartRSFFTMsg *)
 Accept hartExt transpose data : receive VksHartEext(gx,gy,z) gx,z is parallel. More...
 
void CP_Rho_RealSpacePlane::addHartEextVks ()
 Add the VksHartEext to VksTot : Set the done flag. More...
 
void CP_Rho_RealSpacePlane::RHartReport ()
 Under ees-eext Rhart chare reports its completion : Set the done flag.
 
void CP_Rho_RealSpacePlane::doMulticastCheck ()
 If all the parts of exc-eext-hart are done, invoke blast of vks to states. More...
 
void CP_Rho_RealSpacePlane::doMulticast ()
 Send vks back to the states /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_RealSpacePlane::exitForDebugging ()
 Glenn's RhoReal exit.
 
void CP_Rho_RealSpacePlane::ResumeFromSync ()
 
 CP_Rho_RHartExt::CP_Rho_RHartExt (int, int, int, int, int, UberCollection)
 This object just gets a rho message, computes GHartExt, and sends vks. More...
 
void CP_Rho_RHartExt::init ()
 
void CP_Rho_RHartExt::pup (PUP::er &p)
 
void CP_Rho_RHartExt::startEextIter ()
 Invoke by Rspace-density : Density has arrived in r-space and will soon arrive in g-space. More...
 
void CP_Rho_RHartExt::registrationDone (CkReductionMsg *msg)
 = Make sure everyone is registered on the 1st time step
 
void CP_Rho_RHartExt::computeAtmSF ()
 Start the real space part of the EES interpolation for atmSF(iatmTyp) /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_RHartExt::fftAtmSfRtoG ()
 FFT of SF(x,y,z,iatmTyp) -> SF(gx,gy,z,iatmTyp) More...
 
void CP_Rho_RHartExt::sendAtmSfRyToGy ()
 Double Transpose Fwd Send : A(gx,y,z) on the way to A(gx,gy,z) Send so that (y,z) parallelism is switched to (gx,z) More...
 
void CP_Rho_RHartExt::recvAtmSfRyToGy (RhoGHartMsg *msg)
 Double Transpose Fwd Recv : A(gx,y,z) on the way to A(gx,gy,z) Recv so that (y,z) parallel switched to (gx,z) More...
 
void CP_Rho_RHartExt::sendAtmSfRhoGHart ()
 Send SF(gx,gy,z,iatmTYP) to g-space whence the FFT will be completed. More...
 
void CP_Rho_RHartExt::recvAtmForcFromRhoGHart (RhoRHartMsg *msg)
 Hartree sends back atom forces from e-atm interation Depending on the flag, it is Ewald or e-atm interation. More...
 
void CP_Rho_RHartExt::fftAtmForcGtoR (int flagEwd)
 Complete the FFT : sf(gx,gy,z) ->sf(x,y,z) /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.
 
void CP_Rho_RHartExt::sendAtmForcGxToRx (int iopt)
 
void CP_Rho_RHartExt::recvAtmForcGxToRx (RhoGHartMsg *msg)
 
void CP_Rho_RHartExt::computeAtmForc (int)
 Get forces on atoms from Ewald or electrons /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////. More...
 
void CP_Rho_RHartExt::exitForDebugging ()
 Glenn's Rhart exit.
 

Variables

Config config
 
CkVec
< CProxy_CP_Rho_RealSpacePlane > 
UrhoRealProxy
 
CkVec< CProxy_CP_Rho_GHartExt > UrhoGHartExtProxy
 
CkVec
< CProxy_CP_State_GSpacePlane > 
UgSpacePlaneProxy
 
CkVec< CProxy_GSpaceDriver > UgSpaceDriverProxy
 
ComlibInstanceHandle commGInstance0
 
ComlibInstanceHandle commGInstance1
 
ComlibInstanceHandle commGInstance2
 
ComlibInstanceHandle commGInstance3
 
ComlibInstanceHandle commGByrdInstance
 
CProxy_ComlibManager mgrProxy
 
CkVec< CProxy_CP_Rho_GSpacePlane > UrhoGProxy
 
CkVec< CProxy_FFTcache > UfftCacheProxy
 

Detailed Description

Computes electron density in real space, (exchange correlation energy) for transforming to CP_Rho_GSpacePlane which will utilize CP_Rho_GHartExt and CP_Rho_RHartExt (Hartree and external energies).

This is a description of the "life" of a CP_Rho_GSpacePlane object.

Each plane may be further subdivided into subplanes at runtime for additional parallelism.

This is the description of the "life" of a CP_Rho_RealSpacePlane object.

At the start of the program, the constructor CP_Rho_RealSpacePlane() is called.

The CP_State_RealSpacePlanes send the squared magnitudes of the psi_r values using the acceptData() method. The squared magnitudes are summed across states. A copy of this data is made, inverse fft is done in the z and x directions and sent to rhoGDensity. The other copy is processed using CP_exc_calc. Then the CP_Rho_RealSpacePlane object waits for a reply from the RhoGDensity object.

The reply from RhoGDensity comes in the form of the method acceptDensityForSumming(). The data obtained from this reply is taken and forward fft in z and x directions is performed. The resulting data is summed with the result of CP_exc_calc. The sum is sent to the CP_State_RealSpacePlane objects.

At the start of the program, the constructor CP_Rho_GSpacePlane is called. The RealSpaceDensity objects send data to CP_Rho_GSpacePlane using the acceptData() method. Inverse ffts in z and x directions are performed before the data is received, so here inverse fft in y direction is performed. This data is processed using the CP_hart_eext_calc. Then forward fft in the y direction is performed and data is send back to RealSpaceDensity objects.

The CP_Rho_GSpacePlaneHelper objects essentially help to split the work involved in g-space density computation. They receive their share of the work through the method recvCP_Rho_GSpacePlanePart() and send the processed data back to CP_Rho_GSpacePlane objects using the recvProcessedPart() method.

Function Documentation

void CP_Rho_GHartExt::acceptAtmSFTot ( int  size,
complex inAtm 
)

Collect the SF from all the atm type chares on chare 0 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

Recv the contribs.

Once you have it all, compute the energy, contribute, fft back, send to Rhart

Definition at line 1110 of file CP_Rho_GHartExt.C.

References CP_Rho_GHartExt::FFTEesFwd(), and Config::nfreq_cplocal_eesewald.

Referenced by CP_Rho_GHartExt::getHartEextEes().

void CP_Rho_GHartExt::acceptData ( RhoGHartMsg msg)

The density arrives from RhoGspace ONCE a time step /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

Check the flow of control to see if we can use the data.

Copy out the data and flip arrival flag

If ees is off, go ahead with the N^2 method. If ees is on, either go ahead or chill depending on whether atmSF is here

Definition at line 364 of file CP_Rho_GHartExt.C.

References CP_Rho_GHartExt::getHartEextEes(), and CP_Rho_GHartExt::HartExtVksG().

void CP_Rho_RealSpacePlane::acceptDensity ( CkReductionMsg *  msg)

Data comes from StateRspacePlane once an algorithm step.

Here the density from all the states is added up. The data from all the states is received via an array section reduction. Nothing happens in this chare until the density arrives.

If we're not at the gamma point, there will be UberJmax of these. Otherwise there will be only 1.

Definition at line 374 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::handleDensityReduction().

void CP_Rho_RealSpacePlane::acceptGradRhoVks ( RhoRSFFTMsg msg)

Accept transpose data from RhoG : receive grad_rho(gy,gx,z)

Invoked 3 times per algorithm step : once for each grad_rho

Memory required is : rho_igx,rho_igy,rho_igz so stuff can come in any order : density and vks are needed later so no reusing for you. : VksHart can also arrive at any time and cannot be used here.

Unpack the message

Perform some error checking

unpack the data and delete the message

When you have all the data : finish the FFT back to real space

When you have rhoiRX,rhoiRY,rhoiRZ and Vks invoke gradient correction

Definition at line 1233 of file CP_Rho_RealSpacePlane.C.

References FFTcache::doRhoFFTGtoR_Rchare(), FFTcache::doRhoFFTGyToRy_Rchare(), CP_Rho_RealSpacePlane::GradCorr(), and CP_Rho_RealSpacePlane::sendPartlyFFTGxToRx().

void CP_Rho_RealSpacePlane::acceptGradRhoVksAll ( RhoRSFFTMsg msg)

Accept transpose data from RhoG : receive grad_rho(gy,gx,z)

Invoked 1 time per algorithm step : all grad_rho packed up

Memory required is : rho_igx,rho_igy,rho_igz so stuff can come in any order : density and vks are needed later so no reusing for you. : VksHart can also arrive at any time and cannot be used here.

Unpack the message

Perform some error checking

unpack the data and delete the message

When you have all the data : finish the FFT back to real space

When you have rhoiRX,rhoiRY,rhoiRZ and Vks invoke gradient correction

Definition at line 1389 of file CP_Rho_RealSpacePlane.C.

References FFTcache::doRhoFFTGtoR_Rchare(), FFTcache::doRhoFFTGyToRy_Rchare(), CP_Rho_RealSpacePlane::GradCorr(), and CP_Rho_RealSpacePlane::sendPartlyFFTGxToRx().

void CP_Rho_RealSpacePlane::acceptHartVks ( RhoHartRSFFTMsg msg)

Accept hartExt transpose data : receive VksHartEext(gx,gy,z) gx,z is parallel.

Since the message can come at any time memory, VksHart has to be ready to receive it.

Invoked once per algorithm step.

After the routine, VksHartEext(gx,gy,z)–> VksHarteext(x,y,z) and is added to Vkstot(x,y,z)

Local pointers

Copy out the hart-eext contrib to vks : iopt==0

fft the puppy if you've got it all : only atmtyp index=1 of ghart sends rho_real

Definition at line 2144 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::addHartEextVks(), FFTcache::doRhoFFTGtoR_Rchare(), FFTcache::doRhoFFTGyToRy_Rchare(), and CP_Rho_RealSpacePlane::sendPartlyFFTGxToRx().

void CP_Rho_GSpacePlane::acceptRhoData ( RhoGSFFTMsg msg)

RhoReal sends rho(gx,gy,z) here such that it is now decomposed with lines of constant gx,gy in funny order to load balance.

Nothing can return to this chare UNTIL this message is fully received and processed. Thus, we can receive into divRhox and use cache to post process

Set local pointers, constants,

Check for errors

upack the message : No need to zero, every value is set

when you have all the data, get moving

Definition at line 345 of file CP_Rho_GSpacePlane.C.

References CP_Rho_GSpacePlane::exitForDebugging().

void CP_Rho_RealSpacePlane::acceptRhoGradVksGxToRx ( RhoGSFFTMsg msg)

Double Transpose Bck Recv : A(gx,y,z) on the way to A(x,y,z) Recv (gx,z) parallel -> (y,z) parallel.

Invoked 5 times an algorithm step: case 1-3: Gradients case 0 : VksWhiteByrd case 4 : VksHarteext

Unpack the message

Do the FFT when you have all the parts

When you have completed an FFT, you have some choices of what to do next

Definition at line 1671 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::addHartEextVks(), CP_Rho_RealSpacePlane::addWhiteByrdVks(), FFTcache::doRhoFFTGxToRx_Rchare(), and CP_Rho_RealSpacePlane::GradCorr().

Referenced by CP_Rho_RealSpacePlane::sendPartlyFFTGxToRx().

void CP_Rho_RealSpacePlane::acceptRhoGradVksRyToGy ( RhoGSFFTMsg msg)

Double Transpose Fwd Recv : A(gx,y,z) on the way to A(gx,gy,z) Recv so that (y,z) parallel switched to (gx,z)

Invoked 4 times per algorithm step : case 0 rho(gx,y,z) : cast 1-3 gradRho(gx,y,z)

Definition at line 872 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::fftRhoRyToGy().

Referenced by CP_Rho_RealSpacePlane::sendPartlyFFTRyToGy().

void CP_Rho_GHartExt::acceptVks ( int  size,
complex inVks 
)

Collect the VKS from all the atm type chares on chare 1 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

Recv the contributions

When all the guys have reported, you can do the fft and then send vks to RhoReal

Definition at line 1173 of file CP_Rho_GHartExt.C.

References CP_Rho_GHartExt::FFTVks().

Referenced by CP_Rho_GHartExt::getHartEextEes().

void CP_Rho_RealSpacePlane::acceptWhiteByrd ( RhoRSFFTMsg msg)

The white bird vks correction is returned from RhoG : VksW(gx,gy,z) This routine recvs the transpose {gx,gy} to (gx,z)

Invoked once per algorithm step

After this routine, VksW(gx,gy,z) -> VksW(x,y,gz) and is added vksTot();

Local Pointers

Perform some error checking

unpack the data and delete the message : The density is free for use as scr

When you have all the messages, do the last fft, and add in the correction

Definition at line 1989 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::addWhiteByrdVks(), FFTcache::doRhoFFTGtoR_Rchare(), FFTcache::doRhoFFTGyToRy_Rchare(), and CP_Rho_RealSpacePlane::sendPartlyFFTGxToRx().

Referenced by CP_Rho_RealSpacePlane::sendPartlyFFTtoRhoG().

void CP_Rho_GSpacePlane::acceptWhiteByrd ( RhoGSFFTMsg msg)

RhoReal sends rho(gx,gy,z) here such that it is now decomposed with lines of constant gx,gy in funny order to load balance.

We cannot receive whitebyrds until every divRho sent above has been received and processed by RhoReal. Therefore, our divRho memory is safe and warm while it it processing in the routines before the send. It is also safe during the send

Error checking

unpack the message

If all chares for a gradient report, perform final FFT.

When all 3 gradients are in g-space, then you will ready for the next step.

Definition at line 864 of file CP_Rho_GSpacePlane.C.

References CP_Rho_GSpacePlane::acceptWhiteByrd(), and FFTcache::doRhoFFTRtoG_Gchare().

void CP_Rho_GSpacePlane::acceptWhiteByrd ( )

Set the timer and some options

Compute my whiteByrd : store it in divrhox

FFT my whitebyrd : which is stored in divRhox

End tracing and send whitebyrd back to Rhoreal space

Definition at line 1091 of file CP_Rho_GSpacePlane.C.

References RhoGSlab::createWhiteByrd(), FFTcache::doRhoFFTGtoR_Gchare(), and CP_Rho_GSpacePlane::RhoGSendRhoR().

Referenced by CP_Rho_GSpacePlane::acceptWhiteByrd(), CP_Rho_GSpacePlane::acceptWhiteByrdAll(), and CP_Rho_GSpacePlane::RhoGSendRhoR().

void CP_Rho_GSpacePlane::acceptWhiteByrdAll ( RhoGSFFTMsg msg)

RhoReal sends rho(gx,gy,z) here such that it is now decomposed with lines of constant gx,gy in funny order to load balance.

We cannot receive whitebyrds until every divRho sent above has been received and processed by RhoReal. Therefore, our divRho memory is safe and warm while it it processing in the routines before the send. It is also safe during the send

Error checking

unpack the message

If all chares for a gradient report, perform final FFT.

When all 3 gradients are in g-space, then you will ready for the next step.

Definition at line 977 of file CP_Rho_GSpacePlane.C.

References CP_Rho_GSpacePlane::acceptWhiteByrd(), and FFTcache::doRhoFFTRtoG_Gchare().

void CP_Rho_RealSpacePlane::addHartEextVks ( )

Add the VksHartEext to VksTot : Set the done flag.

Add the whitebyrd contrib to vks

Our we done yet?

Definition at line 2251 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::doMulticastCheck().

Referenced by CP_Rho_RealSpacePlane::acceptHartVks(), and CP_Rho_RealSpacePlane::acceptRhoGradVksGxToRx().

void CP_Rho_RealSpacePlane::addWhiteByrdVks ( )

Add the VksWhiteByrd to VksTot : Set the done flag.

Add the whitebyrd contrib to vks

Our we done yet?

Definition at line 2107 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::doMulticastCheck().

Referenced by CP_Rho_RealSpacePlane::acceptRhoGradVksGxToRx(), and CP_Rho_RealSpacePlane::acceptWhiteByrd().

void CP_Rho_RHartExt::computeAtmForc ( int  flagEwd)

Get forces on atoms from Ewald or electrons /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

Check for errors

set the variables to evaluate atom forces

If you aren't done, start another round.

If your are done, Tell rho real and reset yourself for the next time step

If your are done and debugging, exit

Definition at line 1107 of file CP_Rho_RHartExt.C.

References CP_Rho_RHartExt::computeAtmSF().

Referenced by CP_Rho_RHartExt::fftAtmForcGtoR(), and CP_Rho_RHartExt::recvAtmForcGxToRx().

void CP_Rho_RHartExt::computeAtmSF ( )

Start the real space part of the EES interpolation for atmSF(iatmTyp) /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

Look up some constants and fill the r-space grid

FFT the result to G-space

Definition at line 363 of file CP_Rho_RHartExt.C.

References CP_Rho_RHartExt::fftAtmSfRtoG(), and eesCache::queryCacheRHart().

Referenced by CP_Rho_RHartExt::computeAtmForc(), CP_Rho_RHartExt::registrationDone(), and CP_Rho_RHartExt::startEextIter().

CP_Rho_GHartExt::CP_Rho_GHartExt ( int  _ngridaEext,
int  _ngridbEext,
int  _ngridcEext,
int  _ees_eext_on,
int  _natmTyp,
UberCollection  _instance 
)

This object just gets a rho message, computes GHartExt, and sends vks.

heck for startup wackiness

Fetch and compute the useful variables : zero counters

= AtmTyp parallelization

= Decomposition rhoG lines into slices of size rhoGHelper

= Set up rho_gs : Carve out your rundescriptor : Make the k-vectors (donuts)

= Malloc your memory : more juice for ees_ext and yet to support atmtyp parallel

= Set some proxies, set the migratable flag

Definition at line 76 of file CP_Rho_GHartExt.C.

References getSplitDecomp(), and RhoGSlab::setKVectors().

CP_Rho_GSpacePlane::CP_Rho_GSpacePlane ( int  sizeX,
int  numRealSpace,
int  numRealSpaceDensity,
bool  _useCommlib,
UberCollection  _instance 
)

extern ComlibInstanceHandle mssInstance;

Set counters local variables

Deal with the run descriptors then malloc

Decompose your g-space further to create/define GHartEext Chare

Definition at line 65 of file CP_Rho_GSpacePlane.C.

References getSplitDecomp(), and RhoGSlab::setKVectors().

CP_Rho_RealSpacePlane::CP_Rho_RealSpacePlane ( int  xdim,
bool  _useCommlib,
int  _ees_eext_on,
int  _ngridcEext,
int  _rhokeeperid,
UberCollection  _instance 
)

This class (array) accepts the real space densities from all the states Performs lots of operations to get exc, eext energies and vks.

Get parameters from the globals/groups

Compute number of messages to be received

Parallelization

Set up the data class : mallocs rho,gradrho, etc.

Initialize counters, set booleans.myTime

trls bkc-transpose rho(gx,gy,z):gxy->gx/z

trls bkc-int-transpose rho(gx,y,z):gx/z->yz

trls fwd-int-transpose rho(gx,y,z):yz->gx/z

Migration

Definition at line 85 of file CP_Rho_RealSpacePlane.C.

CP_Rho_RHartExt::CP_Rho_RHartExt ( int  _ngrida,
int  _ngridb,
int  _ngridc,
int  _ees_eext_on,
int  _natmTyp,
UberCollection  _instance 
)

This object just gets a rho message, computes GHartExt, and sends vks.

Set some pareameters

Compute messages sizes and zero message counters

Parallelization

Definition at line 57 of file CP_Rho_RHartExt.C.

void CP_Rho_GSpacePlane::divRhoVksGspace ( )

invoke fft subroutine : doFwFFT() unpack do an FFT 1D along z rho(gx,gy,gz) parallelized in full z-lines with constant (gx,gy) invoke a transpose back to r-space

Setup up options, get box and -i*rho(g)

I) fft_gz(divRhoX), launch transpose to R-space

II) fft_gz(divRhoY), launch transpose to R-space

III) fft_gz(divRhoZ), launch transpose to R-space

Definition at line 591 of file CP_Rho_GSpacePlane.C.

References RhoGSlab::divRhoGdot(), FFTcache::doRhoFFTGtoR_Gchare(), CP_Rho_GSpacePlane::RhoGSendRhoR(), and CP_Rho_GSpacePlane::RhoGSendRhoRall().

Referenced by CP_Rho_GSpacePlane::doRhoFFT().

void CP_Rho_RealSpacePlane::doMulticast ( )

Send vks back to the states /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

Send vks back to the states in real space

Definition at line 2312 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::exitForDebugging().

Referenced by CP_Rho_RealSpacePlane::doMulticastCheck().

void CP_Rho_RealSpacePlane::doMulticastCheck ( )

If all the parts of exc-eext-hart are done, invoke blast of vks to states.

Definition at line 2296 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::doMulticast().

Referenced by CP_Rho_RealSpacePlane::addHartEextVks(), CP_Rho_RealSpacePlane::addWhiteByrdVks(), and CP_Rho_RealSpacePlane::RHartReport().

void CP_Rho_GSpacePlane::doRhoFFT ( )

Complete the FFT to give use Rho(gx,gy,gz) /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

I) Finish ffting the density into g-space : a)FFT b) Compress to sphere and store in data_out

II) Debug output

II) Communicate rho(g) to RHoGHartExt to compute eext and hart part of vks or print out that you are taking the day off

III) Start grad corr computations if necessary

kick off NL if its our job

Definition at line 445 of file CP_Rho_GSpacePlane.C.

References CP_Rho_GSpacePlane::divRhoVksGspace(), FFTcache::doRhoFFTRtoG_Gchare(), and CP_Rho_GSpacePlane::launchNlG().

void CP_Rho_RealSpacePlane::energyComputation ( )

Compute one part of the EXC energy using PINY CP_exc_calc.

This is done once an algorithm step

Perform exchange correlation computation (no grad corr here).

Invoke FFT to take rho(r) to rho(g) : do not over-write the density!!

Definition at line 573 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::fftRhoRtoRhoG(), and Config::nfreq_xcfnctl.

Referenced by CP_Rho_RealSpacePlane::handleDensityReduction().

void CP_Rho_RHartExt::fftAtmSfRtoG ( )

FFT of SF(x,y,z,iatmTyp) -> SF(gx,gy,z,iatmTyp)

= Do the FFT

= Do the communication if you are not debugging

Definition at line 417 of file CP_Rho_RHartExt.C.

References FFTcache::doEextFFTRtoG_Rchare(), FFTcache::doEextFFTRxToGx_Rchare(), CP_Rho_RHartExt::exitForDebugging(), CP_Rho_RHartExt::sendAtmSfRhoGHart(), and CP_Rho_RHartExt::sendAtmSfRyToGy().

Referenced by CP_Rho_RHartExt::computeAtmSF().

void CP_Rho_GHartExt::FFTEesBck ( )

Finish FFting to G-space :: 2D) atmSF(gx,gy,z) -> atmSF(gx,gy,gz)

Increment Counters set faux booleans

FFT yourself to heaven

If the density has arrived, you can get the energy otherwise chill

Definition at line 775 of file CP_Rho_GHartExt.C.

References CP_Rho_GHartExt::getHartEextEes().

Referenced by CP_Rho_GHartExt::registrationDone().

void CP_Rho_RealSpacePlane::fftRhoRtoRhoG ( )

1) Perform FFT of density: Single Transpose method rho(x,y,z) —> rho(gx,gy,z) Double Transpose method rho(x,y,z) —> rho(gx,y,z)

2) launch the real space part of the non-local

Routine invoked once an algorithm step.

FFT myself back to G-space part way

Launch the transpose :go directly to rhog if the 1 transpose method is on. : do an internal transpose if the 2 transpose method is on.

Launch non-local real space FFT : allow NL to advance after density works a bit Now that we have previously done our bit for the critical path through rhog

Definition at line 626 of file CP_Rho_RealSpacePlane.C.

References FFTcache::doRhoFFTRtoG_Rchare(), FFTcache::doRhoFFTRxToGx_Rchare(), CP_Rho_RealSpacePlane::exitForDebugging(), CP_Rho_RealSpacePlane::launchNLRealFFT(), CP_Rho_RealSpacePlane::sendPartlyFFTRyToGy(), and CP_Rho_RealSpacePlane::sendPartlyFFTtoRhoG().

Referenced by CP_Rho_RealSpacePlane::energyComputation().

void CP_Rho_RealSpacePlane::fftRhoRyToGy ( int  iopt)

Double Transpose Fwd FFT : A(gx,y,z) -> A(gx,gy,z)

Invoked 4 times per algorithm step : case 0 rho(gx,y,z) -> rho(gx,gy,z) cast 1-3 gradRho(gx,y,z)-> gradRho(gx,gy,z)

FFT myself back to G-space part way : e.g. along gy here

Send chunk to RhoGDensity

Definition at line 923 of file CP_Rho_RealSpacePlane.C.

References FFTcache::doRhoFFTRyToGy_Rchare(), CP_Rho_RealSpacePlane::exitForDebugging(), CP_Rho_RealSpacePlane::sendPartlyFFTtoRhoG(), and CP_Rho_RealSpacePlane::sendPartlyFFTtoRhoGall().

Referenced by CP_Rho_RealSpacePlane::acceptRhoGradVksRyToGy().

void CP_Rho_GHartExt::FFTVks ( )

Partly fft vks(gx,gy,gz) -> vks(gx,gy,z)

Perform the FFT(gx,gy,gz) to FFT(gx,gy,z)

Send partly ffted vks off to real space where FFT will be completed

Definition at line 493 of file CP_Rho_GHartExt.C.

References FFTcache::doHartFFTGtoR_Gchare(), and CP_Rho_GHartExt::sendVks().

Referenced by CP_Rho_GHartExt::acceptVks(), CP_Rho_GHartExt::getHartEextEes(), and CP_Rho_GHartExt::HartExtVksG().

void CP_Rho_GHartExt::getHartEextEes ( )

compute HartreeEextEes

Output and Error check

Compute eext energy, hartree, total SF and VKS

If you have SFtot get the ewald energy : A reduction is required when atmTyp parallel

Blast out the energies when done with atom type stuff : index=0 may have to wait

Perform the back FFT SF and SFtot to get atm forces and VKS to get e-forces

Definition at line 814 of file CP_Rho_GHartExt.C.

References CP_Rho_GHartExt::acceptAtmSFTot(), CP_Rho_GHartExt::acceptVks(), CP_Rho_GHartExt::FFTEesFwd(), CP_Rho_GHartExt::FFTVks(), Config::nfreq_cplocal_eesewald, and Config::nfreq_cplocal_eeshart.

Referenced by CP_Rho_GHartExt::acceptData(), and CP_Rho_GHartExt::FFTEesBck().

void CP_Rho_RealSpacePlane::GradCorr ( )

The gradient of the density is now completed.

You can compute the GGA-DFT functional now. Density is now available to be used as scratch.

Invoked once per algorithm step

Compute the gradient corrected functional : Density is toast after this.

Reduce the exchange correlation energy

output

Start the white bird puppy : back fft of rhoirx, rhoiry, rhoirz

Definition at line 1788 of file CP_Rho_RealSpacePlane.C.

References Config::nfreq_xcfnctl, and CP_Rho_RealSpacePlane::whiteByrdFFT().

Referenced by CP_Rho_RealSpacePlane::acceptGradRhoVks(), CP_Rho_RealSpacePlane::acceptGradRhoVksAll(), and CP_Rho_RealSpacePlane::acceptRhoGradVksGxToRx().

void CP_Rho_RealSpacePlane::handleDensityReduction ( )

Handle the memory cleanup and setting of flags when density has all arrived.

Set the flags : you are not done unless certain conditions apply.

Unpack into spread out form and delete the message

If debugging, generate output!

Compute the exchange correlation energy (density no-grad part)

2nd Launch real-space external-hartree and the G-space non-local The energy comp through RhoG is the more expensive critical path.

Definition at line 417 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::energyComputation(), and CP_Rho_RealSpacePlane::launchEextRNlG().

Referenced by CP_Rho_RealSpacePlane::acceptDensity().

void CP_Rho_GHartExt::HartExtVksG ( )

Compute hartree eext and vks using the N^2 method /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

Get the variables

compute vks(g) from hart eext and reduce eext and ehart

Reduce the energies computed then FFT Vks into Real space (part way)

Definition at line 419 of file CP_Rho_GHartExt.C.

References CP_Rho_GHartExt::FFTVks(), and Config::nfreq_cplocal_hartext.

Referenced by CP_Rho_GHartExt::acceptData().

void CP_Rho_RealSpacePlane::init ( )

post constructor initialization

make sections in the realSpacePlane array. These will be used when computing real-space densities and multicasting v_ks values

Definition at line 215 of file CP_Rho_RealSpacePlane.C.

References is_pow2(), and mCastGrpId.

void CP_Rho_GSpacePlane::init ( )

post constructor initialization /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

Set up proxies and set migration options

Definition at line 191 of file CP_Rho_GSpacePlane.C.

void CP_Rho_RHartExt::init ( )

Malloc data sets : Register in the cache

Set up proxies

Definition at line 143 of file CP_Rho_RHartExt.C.

References eesCache::registerCacheRHart().

void CP_Rho_GHartExt::init ( )

Post constructor initialization /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

= Register in the cache : contribute to a reduction to be sure everyone is done

= Set up periodicity corrections if necessary

= Set some proxies, set the migratable flag

Definition at line 234 of file CP_Rho_GHartExt.C.

References eesCache::registerCacheGHart().

int init_rho_chares ( CPcharmParaInfo sim,
UberCollection  thisInstance 
)

Creating arrays CP_Rho_GSpacePlane, CP_Rho_GSpacePlaneHelper and CP_Rho_RealSpacePlane.

Todo:
: valgrind complains of a tiny memleak here. Check if callbacks get destroyed properly.
Todo:
: valgrind complains of a tiny memleak here. Check if callbacks get destroyed properly.

Definition at line 1902 of file cpaimd.C.

void CP_Rho_RealSpacePlane::launchEextRNlG ( )

The density is here : Launch ees NL and ees Ext routines.

Do this once an algorithm step

Launch the external energy computation in r-space : rhart has the same rhoRsubplanes for simplicity.

Launch nonlocal g space if it wasn't done in RS Spread the launch over all the rhoRchares you can.

Definition at line 492 of file CP_Rho_RealSpacePlane.C.

Referenced by CP_Rho_RealSpacePlane::handleDensityReduction().

void CP_Rho_GSpacePlane::launchNlG ( )

The density is here : Launch ees NL.

Do this once an algorithm step

Launch the nonlocal energy computation

Definition at line 558 of file CP_Rho_GSpacePlane.C.

Referenced by CP_Rho_GSpacePlane::doRhoFFT().

void CP_Rho_RealSpacePlane::launchNLRealFFT ( )

Launch ees-nonlocal real here.

This routine can be called from any other routine except gradCorr(). GradCorr comp is optional (PINY option) e.g. it is not always computed.

Tell NLeesR its ok to compute its FFT. Otherwise we get no overlap Spread the launch over all the RhoR chares

Definition at line 703 of file CP_Rho_RealSpacePlane.C.

Referenced by CP_Rho_RealSpacePlane::fftRhoRtoRhoG().

void CP_Rho_RHartExt::recvAtmForcFromRhoGHart ( RhoRHartMsg msg)

Hartree sends back atom forces from e-atm interation Depending on the flag, it is Ewald or e-atm interation.

Perform some error checking

unpack the data and delete the message

When you have all the data : finish the FFT back to real space

Definition at line 753 of file CP_Rho_RHartExt.C.

References CP_Rho_RHartExt::fftAtmForcGtoR().

void CP_Rho_RHartExt::recvAtmForcGxToRx ( RhoGHartMsg msg)

Unpack the message

Do the FFT when you have all the parts

Definition at line 1021 of file CP_Rho_RHartExt.C.

References CP_Rho_RHartExt::computeAtmForc(), and FFTcache::doEextFFTGxToRx_Rchare().

Referenced by CP_Rho_RHartExt::sendAtmForcGxToRx().

void CP_Rho_GHartExt::recvAtmSFFromRhoRHart ( RhoGHartMsg msg)

Recv Atm SF from RhoRhart : Euler Exponential spline based method /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

Unpack the message

Unpack the message and then delete it atmSFT: numLines collections of lines of lth ngridcEext each with constant (gx,gy) Each message contains 1 pt on each line

Check for errors

No need to zero : Every value is set.

You must receive 1 message from each R-chare before continuing

Definition at line 664 of file CP_Rho_GHartExt.C.

References CP_Rho_GHartExt::exitForDebugging().

void CP_Rho_RHartExt::recvAtmSfRyToGy ( RhoGHartMsg msg)

Double Transpose Fwd Recv : A(gx,y,z) on the way to A(gx,gy,z) Recv so that (y,z) parallel switched to (gx,z)

Invoked natm_typ times per algorithm step :

Do the Y fft, invoke communication if not debugging

Debugging

Definition at line 577 of file CP_Rho_RHartExt.C.

References FFTcache::doEextFFTRyToGy_Rchare(), CP_Rho_RHartExt::exitForDebugging(), and CP_Rho_RHartExt::sendAtmSfRhoGHart().

Referenced by CP_Rho_RHartExt::sendAtmSfRyToGy().

void CP_Rho_GSpacePlane::RhoGSendRhoR ( int  iopt)

Local Pointers and Variables

Do a Comlib Dance

Send the message

Complete the commlib dance

Definition at line 647 of file CP_Rho_GSpacePlane.C.

References CP_Rho_GSpacePlane::acceptWhiteByrd().

Referenced by CP_Rho_GSpacePlane::acceptWhiteByrd(), and CP_Rho_GSpacePlane::divRhoVksGspace().

void CP_Rho_GSpacePlane::RhoGSendRhoRall ( )

Local Pointers and Variables

Send the message : no comlib

Definition at line 781 of file CP_Rho_GSpacePlane.C.

Referenced by CP_Rho_GSpacePlane::divRhoVksGspace().

void CP_Rho_RHartExt::sendAtmForcGxToRx ( int  iopt)

Launch the communication

Definition at line 930 of file CP_Rho_RHartExt.C.

References CP_Rho_RHartExt::recvAtmForcGxToRx().

Referenced by CP_Rho_RHartExt::fftAtmForcGtoR().

void CP_Rho_GHartExt::sendAtmSF ( int  flag)

Send the SF data to back to Rhart to get atm forces /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

start commlib

Send the message : 1 pt from each line to each chareR

end commlib

We are done when when have sent out all SFs and the Ewald total SF (index=0)

Definition at line 983 of file CP_Rho_GHartExt.C.

Referenced by CP_Rho_GHartExt::FFTEesFwd().

void CP_Rho_RHartExt::sendAtmSfRhoGHart ( )

Send SF(gx,gy,z,iatmTYP) to g-space whence the FFT will be completed.

== Perform the transpose and then the blast off the final 1D-FFT

Definition at line 654 of file CP_Rho_RHartExt.C.

Referenced by CP_Rho_RHartExt::fftAtmSfRtoG(), and CP_Rho_RHartExt::recvAtmSfRyToGy().

void CP_Rho_RHartExt::sendAtmSfRyToGy ( )

Double Transpose Fwd Send : A(gx,y,z) on the way to A(gx,gy,z) Send so that (y,z) parallelism is switched to (gx,z)

Launch the communication

Definition at line 492 of file CP_Rho_RHartExt.C.

References CP_Rho_RHartExt::recvAtmSfRyToGy().

Referenced by CP_Rho_RHartExt::fftAtmSfRtoG().

void CP_Rho_RealSpacePlane::sendPartlyFFTGxToRx ( int  iopt)

Double Transpose Bck Send : A(gx,y,z) on the way to A(x,y,z) Send so (gx,z) parallel -> (y,z) parallel.

Invoked 5 times an algorithm step: case 1-3: Gradients case 0 : VksWhiteByrd case 4 : VksHarteext

Launch the communication

Definition at line 1555 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::acceptRhoGradVksGxToRx().

Referenced by CP_Rho_RealSpacePlane::acceptGradRhoVks(), CP_Rho_RealSpacePlane::acceptGradRhoVksAll(), CP_Rho_RealSpacePlane::acceptHartVks(), and CP_Rho_RealSpacePlane::acceptWhiteByrd().

void CP_Rho_RealSpacePlane::sendPartlyFFTRyToGy ( int  iopt)

Double Transpose Fwd Send : A(gx,y,z) on the way to A(gx,gy,z) Send so that (y,z) parallelism is switched to (gx,z)

Invoked 4 times per algorithm step : case 0 density(gx,y,z) : cast 1-3 gradients(gx,y,z)

Launch the communication

Definition at line 752 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::acceptRhoGradVksRyToGy().

Referenced by CP_Rho_RealSpacePlane::fftRhoRtoRhoG(), and CP_Rho_RealSpacePlane::whiteByrdFFT().

void CP_Rho_RealSpacePlane::sendPartlyFFTtoRhoG ( int  iopt)

The Tranpose to G-space : A(gx,gy,z) on the way to A(gx,gy,gz) Change parallel by gx,z to parallel by {gx,gy} We switch chare arrays here from RhoR to RhoG.

Invoked 4 times per algorithm step : case 0 send rho(gx,gy,z) -> rho(gx,gy,z) in Rhog cast 1-3 send gradRho(gx,gy,z) -> gradRho(gx,gy,z) in Rhog

Send the partly FFTed array A(gx,gy,z), to rhoGSpacePlane : You then wait while RHOG works, sends back RhoIRalpha which you whitebyrdize You send back the whitebyrdized RhoIRalpha puppies to RhoGspacePlane. Whilst all this is going on, HartG is churning and will send you another part of Vks. All this requires keeping density, vks, div_rho_alpha and vkshart memory available at all times to receive messages.

Local pointers and variables

Commlib launch

Send the data

Commlib stop

Definition at line 1003 of file CP_Rho_RealSpacePlane.C.

References CP_Rho_RealSpacePlane::acceptWhiteByrd().

Referenced by CP_Rho_RealSpacePlane::fftRhoRtoRhoG(), CP_Rho_RealSpacePlane::fftRhoRyToGy(), and CP_Rho_RealSpacePlane::whiteByrdFFT().

void CP_Rho_RealSpacePlane::sendPartlyFFTtoRhoGall ( )

Local pointers and variables

Send the data

Definition at line 1143 of file CP_Rho_RealSpacePlane.C.

Referenced by CP_Rho_RealSpacePlane::fftRhoRyToGy(), and CP_Rho_RealSpacePlane::whiteByrdFFT().

void CP_Rho_GHartExt::sendVks ( )

Send vks_hart_ext back to rho_real where fft(gx,gy) will be performed /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////.

Do a Comlib Dance

Complete the commlib dance and hang out.

Definition at line 535 of file CP_Rho_GHartExt.C.

Referenced by CP_Rho_GHartExt::FFTVks().

void CP_Rho_RHartExt::startEextIter ( )

Invoke by Rspace-density : Density has arrived in r-space and will soon arrive in g-space.

Get moving RhartExt

Check for error

This is a new time step : Increment time step counter, zero atm typ counter Launch if we are ready

Definition at line 287 of file CP_Rho_RHartExt.C.

References CP_Rho_RHartExt::computeAtmSF().

void CP_Rho_RealSpacePlane::whiteByrdFFT ( )

The white-bird term : First fwfft redefined delrho(r) to delrho(g) then send to RhoGspacePlane.

RhoGspacePlane sends you back back another term. After this routine, rhoIRX, rhoIRY and rhoIRZ are `free'.

Invoked once per algorithm step

Constants and pointers

I) rhoIRX : Scale, Real to complex FFT, perform FFT, transpose

II) rhoIRY : Scale, real to complex FFT, perform FFT, transpose

III) rhoIRZ : Scale, real to complex FFT, perform FFT, transpose

Send all 3 components at once

Definition at line 1886 of file CP_Rho_RealSpacePlane.C.

References FFTcache::doRhoFFTRtoG_Rchare(), FFTcache::doRhoFFTRxToGx_Rchare(), CP_Rho_RealSpacePlane::sendPartlyFFTRyToGy(), CP_Rho_RealSpacePlane::sendPartlyFFTtoRhoG(), and CP_Rho_RealSpacePlane::sendPartlyFFTtoRhoGall().

Referenced by CP_Rho_RealSpacePlane::GradCorr().