Changeset 3759

Show
Ignore:
Timestamp:
02/21/12 14:53:19 (3 months ago)
Author:
loh
Message:

removing subgrid calculations.

Location:
branches/forNautilus-r3753/fcflds
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/forNautilus-r3753/fcflds/FcCartDecomp.cpp

    r3753 r3759  
    8585// take care of periodicity 
    8686  duplicateBoxes(); 
    87   createSubGrids(); 
    88 } 
    89  
    90 template <size_t NDIM, typename T> 
    91 void FcCartDecomp<NDIM, T>::createSubGrids(){ 
    92   size_t num = this->getComm()->getNumProcs(); 
    93   this->subGrids.resize(num); 
    94   const FcCartGrid<NDIM> &globalGrid = static_cast<const FcCartGrid<NDIM> &>(this->getGlobalGrid()); 
    95   FcBox<NDIM, double> globalExtents = globalGrid.getExtents(); 
    96   FcBox<NDIM, int> globalCells = globalGrid.getCells(); 
    97   double upper[NDIM], lower[NDIM], dx[NDIM]; 
    98  
    99   for (size_t i=0; i<NDIM; ++i) 
    100     dx[i] = globalExtents.getLength(i)/globalCells.getLength(i); 
    101    
    102   for (size_t i=0; i<num; ++i){ 
    103     FcBox<NDIM, T> subBox = this->getBox(i); 
    104  
    105     for (size_t j=0; j<NDIM; ++j){ 
    106       lower[j] = globalExtents.getLower(j) + (subBox.getLower(j) - globalCells.getLower(j))*dx[j]; 
    107       upper[j] = lower[j] + (subBox.getUpper(j) - subBox.getLower(j))*dx[j]; 
    108     } 
    109  
    110     FcBox<NDIM, double> subExt(lower, upper); 
    111     subGrids[i] = new FcCartGrid<NDIM>(subExt, subBox); 
    112   } 
    11387} 
    11488 
  • branches/forNautilus-r3753/fcflds/FcCartDecomp.h

    r3755 r3759  
    146146 
    147147  private: 
    148 /** 
    149  * Creates the subgrids once the grid has been decomposed 
    150  */ 
    151   virtual void createSubGrids(); 
    152  
    153148/** 
    154149 * Break the box up into sub boxes (takes array of size ndim and