Changeset d6a338 for src/grid/multigrid.cpp
- Timestamp:
- Apr 16, 2013, 11:27:31 AM (13 years ago)
- Children:
- 177495
- Parents:
- e58835d
- File:
-
- 1 edited
-
src/grid/multigrid.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/grid/multigrid.cpp
re58835d rd6a338 43 43 using namespace VMG; 44 44 45 Multigrid::Multigrid( Comm* comm, const Interface*interface)45 Multigrid::Multigrid(const Comm& comm, const Interface& interface) 46 46 { 47 47 Index points, remainder; 48 48 LocalIndices local_l; 49 std::vector<GlobalIndices> global_separated; 50 51 const std::vector<GlobalIndices>& global = interface->Global(); 52 const std::vector<SpatialExtent>& extent = interface->Extent(); 53 54 comm->GetDomainDecomposition().Compute(comm, interface, global_separated); 55 56 for (unsigned int i=0; i<global.size(); ++i) { 49 50 const std::vector<SpatialExtent>& extent = interface.Extent(); 51 const std::vector<GlobalIndices>& global_separated = comm.DecomposedGlobalMe(); 52 53 for (unsigned int i=0; i<global_separated.size(); ++i) { 57 54 58 55 /* 59 56 * Check if this level is the finest global level 60 57 */ 61 if (global[i].BoundaryType() == GlobalMax) 62 levelGlobalMax = interface->MaxLevel() - i; 63 58 if (global_separated[i].BoundaryType() == GlobalMax) 59 levelGlobalMax = interface.MaxLevel() - i; 64 60 65 61 if (global_separated[i].LocalSize().Product() > 0) { … … 82 78 for (int j=0; j<3; ++j) { 83 79 84 if (comm ->BoundaryConditions()[j] == Dirichlet ||85 comm ->BoundaryConditions()[j] == Open) {80 if (comm.BoundaryConditions()[j] == Dirichlet || 81 comm.BoundaryConditions()[j] == Open) { 86 82 87 83 local_l.SizeTotal()[j] = global_separated[i].LocalSize()[j]; … … 109 105 } 110 106 111 }else if (comm ->BoundaryConditions()[j] == Periodic) {107 }else if (comm.BoundaryConditions()[j] == Periodic) { 112 108 113 109 local_l.SizeTotal()[j] = global_separated[i].LocalSize()[j] + 2; … … 161 157 } 162 158 163 grids.push_back(new Grid(global_separated[i], local_l, extent[i], interface ->MaxLevel()-i, this));159 grids.push_back(new Grid(global_separated[i], local_l, extent[i], interface.MaxLevel()-i, this)); 164 160 165 161 } … … 167 163 numLevels = grids.size(); 168 164 169 levelMax = interface ->MaxLevel();165 levelMax = interface.MaxLevel(); 170 166 levelMin = levelMax - numLevels + 1; 171 167
Note:
See TracChangeset
for help on using the changeset viewer.
