Esempio n. 1
0
//==============================================================================
void initGStateSlab(GStateSlab *gs, int sizeX, int sizeY, int sizeZ, int gSpaceUnits, 
    int realSpaceUnits, int s_grain, int iplane_ind,int istate_ind,
    int len_nhc_cp, int num_nhc_cp, int nck_nhc_cp) 
  //==============================================================================
{//begin routine
  //==============================================================================
  // Explanation of organization of data: A point is psi(kx,ky,kz)  
  //
  //   Each gStateSlab is a collection of pts in lines of constant kx,ky.
  //   The maximum number of pts in any line is size[1] = nfftz
  //   Some lines are longer/shorter to spherical trunction (|k|<k_cut).
  //   Also, kx>=0 when at the Gamma point or doublePack=1, the only
  //   thing that has been recently tested. Collections of lines are parallelized. 
  //   Each collection does not correspond to a unique plane of kx.
  //   The parameter gSpaceUnits is obsolete and must be unity.
  //   In order to create the state in real space, psi(x,y,z), an fft 
  //   of all kz lines is performed followed by a transpose. The result of the transpose
  //   is parallelized by planes of z. This is different than it used to be.
  //   The number of points AFTER the fft is nlines*nfftz will be different
  //   for each chare array

  if(gSpaceUnits!=1 || realSpaceUnits!=1){
    CkPrintf("@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
    CkPrintf("gspacePPC==1 obsolete. We no longer parallelize g-space by plane\n");
    CkPrintf("realSpacePPC==1 although real space is parallelized by plane\n");
    CkPrintf("@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
    CkExit();
  }//endif
  gs->numNonZeroPlanes=1;
  gs->mysizeX   = sizeX;
  gs->planeSize = size2d(sizeY,sizeZ);  // fftsizes (sizeY,sizeZ)  sizeX is a global
  gs->numPoints = 0;     // number of packed points (data size before fft)
  gs->numRuns   = 0;     // 2*(number of lines) in the collection
  gs->numLines  = 0;     // (number of lines) in the collection
  gs->fftReqd   = false; // false if this chare has no packed pts
  gs->numFull   = 0;     // number of pts : numLines*nfftz

  gs->S_grainSize = s_grain;   // PC grainsize
  gs->xdim = 1;                // may need some love
  gs->ydim = gs->planeSize[0];
  gs->zdim = gs->planeSize[1];
  gs->iplane_ind   = iplane_ind;
  gs->istate_ind   = istate_ind; 
  gs->initNHC(len_nhc_cp,num_nhc_cp,nck_nhc_cp);

  //==============================================================================
}//end routine
Esempio n. 2
0
void Session::updateImageSize()
{
    if (!dataset.countFiles() && !corrset.hasFile())
        imageSize_ = size2d(0, 0);
}