Changeset 8180d8 for src/grid/grid_index_translations.hpp
- Timestamp:
- Apr 5, 2013, 12:39:30 PM (13 years ago)
- Children:
- 4a709e
- Parents:
- f57182
- File:
-
- 1 edited
-
src/grid/grid_index_translations.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/grid/grid_index_translations.hpp
rf57182 r8180d8 38 38 class Comm; 39 39 class Grid; 40 class GridIteratorSet; 40 41 41 42 class GridIndexTranslations 42 43 { 43 44 public: 44 GridIndexTranslations(const Grid* father_) : 45 father(father_) 46 {} 45 GridIndexTranslations() {} 47 46 48 Index GlobalToLocal(const Index& index_global) const; 49 static Index GlobalToFiner(const Index& index_global); 50 static Index GlobalToCoarser(const Index& index_global); 47 static bool IsGridPointOf(const Grid& grid, const Index& index_finest); 51 48 52 static Index GlobalToFiner(const Index& index_global, const int& num_levels);53 static Index GlobalToCoarser(const Index& index_global, const int& num_levels);49 static Index LocalToGlobal(const Grid& grid, const Index& index_local); 50 static Index LocalToGlobalFinest(const Grid& grid, const Index& index_local); 54 51 55 Index LocalToGlobal(const Index& index_local) const; 56 Index LocalToFiner(const Index& index_local) const; 57 Index LocalToCoarser(const Index& index_local) const; 52 static Index GlobalToLocal(const Grid& grid, const Index& index_global); 53 static Index GlobalToGlobalFinest(const Grid& grid, const Index& index_global); 58 54 59 Index FinestGlobalToLocal(const Index& index_finest) const;60 Index FinestGlobalToGlobal(const Index& index_finest) const;55 static Index GlobalFinestToLocal(const Grid& grid, const Index& index_finest); 56 static Index GlobalFinestToGlobal(const Grid& grid, const Index& index_finest); 61 57 62 static void FineToCoarse(Index& begin, Index& end); 63 static void CoarseToFine(Index& begin, Index& end, const Index& size_global); 58 static void GlobalCoarseToFine(Index& begin, Index& end); 59 static void GlobalFineToCoarse(Index& begin, Index& end); 60 61 static void GetGridAlignment(const Grid& grid_1, GridIteratorSet& bounds_1, 62 const Grid& grid_2, GridIteratorSet& bounds_2); 63 64 static void GetInnerBoundary(const Grid& grid_coarse, Index& b1_c, Index& b2_c, 65 const Grid& grid_fine, Index& b1_f, Index& b2_f); 66 67 68 69 64 70 65 71 static Index EndOffset(const Boundary& boundary) 66 72 { 67 Index offset; 68 69 for (int i=0; i<3; ++i) 70 offset[i] = (boundary[i] == Open || boundary[i] == Dirichlet ? 1 : 0); 71 72 return offset; 73 return Index(boundary[0] == Periodic ? 0 : 1, 74 boundary[1] == Periodic ? 0 : 1, 75 boundary[2] == Periodic ? 0 : 1); 73 76 } 74 75 protected:76 const Grid* Father() const {return father;}77 78 private:79 const Grid* father;80 77 }; 81 78
Note:
See TracChangeset
for help on using the changeset viewer.
