Grid_pfftInit(integer(IN) :: myPe, integer(IN) :: numProcs integer(IN) :: ndim, logical(IN) :: needMap integer(IN) :: globalLen(MDIM), integer(OUT) :: localArraySize(MDIM), integer(IN),optional :: transformType(MDIM), integer(IN),optional :: baseDatType(0:MDIM), integer(IN),optional :: jProcs, integer(IN),optional :: kProcs, integer(IN),optional :: refinementLevel)
This is the initialization routine for using Pfft. If needMap is true, routine creates a schedule of data transfers that would map AMR or UG grid to PFFT. This schedule is remembered internally by Pfft until the Grid_pfftFinalize routine is called. If needMap is false, it is assumed the data distribution is already compatible with Pfft requirements: That is along IAXIS, the entire row is within one processor. The routine also calls gr_pfftInitMetaData, which is responsible for calculating the trignometric tables, creating communicators necessary for distributed transposes in Pfft and allocates workspace
myPe - my processor numberit numProcs - global number of processors in the run ndim - dimensionality of the problem needMap - should be true if the default shape is not compatible with requirements of the input Pfft array. Only if this argument is true, is the map determined. globalLen - the globalsize of the domain localArraySize - after mapping to pfft_grid, the local size for the domain transformType - type of transform along each dimension if none is specified we assume realtocomplex in first dimension and complextocomplex in the rest baseDatType - basic data type (rela or complex) along each dimension, after the transform for that direction (if any), the 0 component specifies data type before IAXIS transform. jProcs,kProcs - if they are present, they decide the shape of the processor grid for pfft. If they are not present, a routine that can automatically determine the shape is called. refinementLevel - The block refinement level at which we will create the map.