Changeset ac6d04 for src/grid/grid_properties.hpp
- Timestamp:
- Apr 10, 2012, 1:55:49 PM (14 years ago)
- Children:
- a40eea
- Parents:
- d24c2f
- File:
-
- 1 edited
-
src/grid/grid_properties.hpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/grid/grid_properties.hpp
rd24c2f rac6d04 21 21 { 22 22 public: 23 GlobalIndices(); 24 25 const Index& BeginFinest() const {return begin_finest;} ///< Global index of first local grid point 26 const Index& EndFinest() const {return end_finest;} ///< Global index of first non-local grid point 27 const Index& SizeFinest() const {return size_finest;} ///< Global grid size including boundary 28 29 const Index& BeginLocal() const {return begin_local;} 30 const Index& EndLocal() const {return end_local;} 31 const Index& SizeLocal() const {return size_local;} 32 33 const Index& SizeGlobal() const {return size_global;} 34 23 GlobalIndices() : 24 local_begin(0), local_end(0), local_size(0), 25 global_finer_begin(0), global_finer_end(0), global_finer_size(0), 26 local_finer_begin(0), local_finer_end(0), local_finer_size(0), 27 finest_abs_begin(0), finest_abs_end(0), finest_abs_size(0), 28 global_size(0), 29 boundary(EmptyGrid) 30 {} 31 32 GlobalIndices(const GlobalIndices& other) : 33 local_begin(other.local_begin), local_end(other.local_end), local_size(other.local_size), 34 global_finer_begin(other.global_finer_begin), global_finer_end(other.global_finer_end), global_finer_size(other.global_finer_size), 35 local_finer_begin(other.local_finer_begin), local_finer_end(other.local_finer_end), local_finer_size(other.local_finer_size), 36 finest_abs_begin(other.finest_abs_begin), finest_abs_end(other.finest_abs_end), finest_abs_size(other.finest_abs_size), 37 global_size(other.global_size), 38 boundary(other.boundary) 39 {} 40 41 Index& LocalBegin() {return local_begin;} 42 Index& LocalEnd() {return local_end;} 43 Index& LocalSize() {return local_size;} 44 45 const Index& LocalBegin() const {return local_begin;} 46 const Index& LocalEnd() const {return local_end;} 47 const Index& LocalSize() const {return local_size;} 48 49 Index& GlobalFinerBegin() {return global_finer_begin;} 50 Index& GlobalFinerEnd() {return global_finer_end;} 51 Index& GlobalFinerSize() {return global_finer_size;} 52 53 const Index& GlobalFinerBegin() const {return global_finer_begin;} 54 const Index& GlobalFinerEnd() const {return global_finer_end;} 55 const Index& GlobalFinerSize() const {return global_finer_size;} 56 57 Index& LocalFinerBegin() {return local_finer_begin;} 58 Index& LocalFinerEnd() {return local_finer_end;} 59 Index& LocalFinerSize() {return local_finer_size;} 60 61 const Index& LocalFinerBegin() const {return local_finer_begin;} 62 const Index& LocalFinerEnd() const {return local_finer_end;} 63 const Index& LocalFinerSize() const {return local_finer_size;} 64 65 Index& FinestAbsBegin() {return finest_abs_begin;} 66 Index& FinestAbsEnd() {return finest_abs_end;} 67 Index& FinestAbsSize() {return finest_abs_size;} 68 69 const Index& FinestAbsBegin() const {return finest_abs_begin;} 70 const Index& FinestAbsEnd() const {return finest_abs_end;} 71 const Index& FinestAbsSize() const {return finest_abs_size;} 72 73 Index& GlobalSize() {return global_size;} 74 const Index& GlobalSize() const {return global_size;} 75 76 BT& BoundaryType() {return boundary;} 35 77 const BT& BoundaryType() const {return boundary;} 36 78 37 Index& BeginFinest() {return begin_finest;} ///< Global index of first local grid point38 Index& EndFinest() {return end_finest;} ///< Global index of first non-local grid point39 Index& SizeFinest() {return size_finest;} ///< Global grid size including boundary40 41 Index& BeginLocal() {return begin_local;}42 Index& EndLocal() {return end_local;}43 Index& SizeLocal() {return size_local;}44 45 Index& SizeGlobal() {return size_global;}46 47 BT& BoundaryType() {return boundary;}48 49 79 private: 50 Index begin_finest, end_finest, size_finest; 51 Index begin_local, end_local, size_local; 52 Index size_global; 80 Index local_begin, local_end, local_size; 81 Index global_finer_begin, global_finer_end, global_finer_size; 82 Index local_finer_begin, local_finer_end, local_finer_size; 83 Index finest_abs_begin, finest_abs_end, finest_abs_size; 84 Index global_size; 53 85 BT boundary; 54 86 }; … … 57 89 { 58 90 public: 59 LocalIndices(); 60 61 const Index& Size() const {return size;} ///< Local grid size excluding halo 62 const Index& SizeTotal() const {return sizeTotal;} ///< Local grid size including halo and boundary 63 const Index& Begin() const {return begin;} ///< Index of first local grid point 64 const Index& End() const {return end;} ///< Index of first non-local grid point 65 66 Index& Size() {return size;} ///< Local grid size excluding halo 67 Index& SizeTotal() {return sizeTotal;} ///< Local grid size including halo and boundary 68 Index& Begin() {return begin;} ///< Index of first local grid point 69 Index& End() {return end;} ///< Index of first non-local grid point 70 71 const Index& HaloBegin1() const {return haloBegin1;} ///< Index of first halo point 72 const Index& HaloBegin2() const {return haloBegin2;} ///< Index of first halo point 73 const Index& HaloEnd1() const {return haloEnd1;} ///< Index of first non-halo point 74 const Index& HaloEnd2() const {return haloEnd2;} ///< Index of first non-halo point 75 76 Index& HaloBegin1() {return haloBegin1;} ///< Index of first halo point 77 Index& HaloBegin2() {return haloBegin2;} ///< Index of first halo point 78 Index& HaloEnd1() {return haloEnd1;} ///< Index of first non-halo point 79 Index& HaloEnd2() {return haloEnd2;} ///< Index of first non-halo point 80 81 const Index& BoundaryBegin1() const {return boundaryBegin1;} ///< Index of first boundary point 82 const Index& BoundaryBegin2() const {return boundaryBegin2;} ///< Index of first boundary point 83 const Index& BoundaryEnd1() const {return boundaryEnd1;} ///< Index of first non-boundary point 84 const Index& BoundaryEnd2() const {return boundaryEnd2;} ///< Index of first non-boundary point 85 86 Index& BoundaryBegin1() {return boundaryBegin1;} ///< Index of first boundary point 87 Index& BoundaryBegin2() {return boundaryBegin2;} ///< Index of first boundary point 88 Index& BoundaryEnd1() {return boundaryEnd1;} ///< Index of first non-boundary point 89 Index& BoundaryEnd2() {return boundaryEnd2;} ///< Index of first non-boundary point 90 91 const Index& AlignmentBegin() const {return alignmentBegin;} 92 const Index& AlignmentEnd() const {return alignmentEnd;} 93 94 Index& AlignmentBegin() {return alignmentBegin;} 95 Index& AlignmentEnd() {return alignmentEnd;} 96 97 Index HasHalo1() const; 98 Index HasHalo2() const; 99 Index HasBoundary1() const; 100 Index HasBoundary2() const; 91 LocalIndices() : 92 begin(0), end(0), size(0), size_total(0), 93 halo_begin_1(0), halo_end_1(0), halo_size_1(0), 94 halo_begin_2(0), halo_end_2(0), halo_size_2(0), 95 boundary_begin_1(0), boundary_end_1(0), boundary_size_1(0), 96 boundary_begin_2(0), boundary_end_2(0), boundary_size_2(0), 97 finer_begin_foo(0), finer_end_foo(0), finer_size_foo(0) 98 {} 99 100 LocalIndices(const LocalIndices& other) : 101 begin(other.begin), end(other.end), size(other.size), size_total(other.size_total), 102 halo_begin_1(other.halo_begin_1), halo_end_1(other.halo_end_1), halo_size_1(other.halo_size_1), 103 halo_begin_2(other.halo_begin_2), halo_end_2(other.halo_end_2), halo_size_2(other.halo_size_2), 104 boundary_begin_1(other.boundary_begin_1), boundary_end_1(other.boundary_end_1), boundary_size_1(other.boundary_size_1), 105 boundary_begin_2(other.boundary_begin_2), boundary_end_2(other.boundary_end_2), boundary_size_2(other.boundary_size_2), 106 finer_begin_foo(other.finer_begin_foo), finer_end_foo(other.finer_end_foo), finer_size_foo(other.finer_size_foo) 107 {} 108 109 Index& Begin() {return begin;} ///< Index of first local grid point 110 Index& End() {return end;} ///< Index of first non-local grid point 111 Index& Size() {return size;} ///< Local grid size excluding halo 112 Index& SizeTotal() {return size_total;} ///< Local grid size including halo and boundary 113 114 const Index& Begin() const {return begin;} ///< Index of first local grid point 115 const Index& End() const {return end;} ///< Index of first non-local grid point 116 const Index& Size() const {return size;} ///< Local grid size excluding halo 117 const Index& SizeTotal() const {return size_total;} ///< Local grid size including halo and boundary 118 119 Index& HaloBegin1() {return halo_begin_1;} ///< Index of first halo point 120 Index& HaloEnd1() {return halo_end_1;} ///< Index of first non-halo point 121 Index& HaloSize1() {return halo_size_1;} ///< Size of halo 122 123 Index& HaloBegin2() {return halo_begin_2;} ///< Index of first halo point 124 Index& HaloEnd2() {return halo_end_2;} ///< Index of first non-halo point 125 Index& HaloSize2() {return halo_size_2;} ///< Size of halo 126 127 const Index& HaloBegin1() const {return halo_begin_1;} ///< Index of first halo point 128 const Index& HaloEnd1() const {return halo_end_1;} ///< Index of first non-halo point 129 const Index& HaloSize1() const {return halo_size_1;} ///< Size of halo 130 131 const Index& HaloBegin2() const {return halo_begin_2;} ///< Index of first halo point 132 const Index& HaloEnd2() const {return halo_end_2;} ///< Index of first non-halo point 133 const Index& HaloSize2() const {return halo_size_2;} ///< Size of halo 134 135 Index& BoundaryBegin1() {return boundary_begin_1;} ///< Index of first boundary point 136 Index& BoundaryEnd1() {return boundary_end_1;} ///< Index of first non-boundary point 137 Index& BoundarySize1() {return boundary_size_1;} ///< Size of boundary 138 139 Index& BoundaryBegin2() {return boundary_begin_2;} ///< Index of first boundary point 140 Index& BoundaryEnd2() {return boundary_end_2;} ///< Index of first non-boundary point 141 Index& BoundarySize2() {return boundary_size_2;} ///< Size of boundary 142 143 const Index& BoundaryBegin1() const {return boundary_begin_1;} ///< Index of first boundary point 144 const Index& BoundaryEnd1() const {return boundary_end_1;} ///< Index of first non-boundary point 145 const Index& BoundarySize1() const {return boundary_size_1;} ///< Size of boundary 146 147 const Index& BoundaryBegin2() const {return boundary_begin_2;} ///< Index of first boundary point 148 const Index& BoundaryEnd2() const {return boundary_end_2;} ///< Index of first non-boundary point 149 const Index& BoundarySize2() const {return boundary_size_2;} ///< Size of boundary 150 151 Index& FinerBeginFoo() {return finer_begin_foo;} 152 Index& FinerEndFoo() {return finer_end_foo;} 153 Index& FinerSizeFoo() {return finer_size_foo;} 154 155 const Index& FinerBeginFoo() const {return finer_begin_foo;} 156 const Index& FinerEndFoo() const {return finer_end_foo;} 157 const Index& FinerSizeFoo() const {return finer_size_foo;} 158 159 bool HasFinerGrid() const {return static_cast<bool>(finer_size_foo.Product());} 101 160 102 161 private: 103 Index size; 104 Index sizeTotal; 105 Index begin; 106 Index end; 107 Index haloBegin1, haloEnd1; 108 Index haloBegin2, haloEnd2; 109 Index boundaryBegin1, boundaryEnd1; 110 Index boundaryBegin2, boundaryEnd2; 111 Index alignmentBegin, alignmentEnd; 162 Index begin, end, size, size_total; 163 Index halo_begin_1, halo_end_1, halo_size_1; 164 Index halo_begin_2, halo_end_2, halo_size_2; 165 Index boundary_begin_1, boundary_end_1, boundary_size_1; 166 Index boundary_begin_2, boundary_end_2, boundary_size_2; 167 Index finer_begin_foo, finer_end_foo, finer_size_foo; 112 168 }; 113 169 … … 115 171 { 116 172 public: 117 SpatialExtent(); 118 173 SpatialExtent() : 174 begin(0.0), 175 end(0.0), 176 size(0.0), 177 mesh_width(0.0) 178 {} 179 180 SpatialExtent(const SpatialExtent& other) : 181 begin(other.begin), 182 end(other.end), 183 size(other.size), 184 mesh_width(other.mesh_width) 185 {} 186 187 Vector& Begin() {return begin;} 188 const Vector& Begin() const {return begin;} 189 190 Vector& End() {return end;} 191 const Vector& End() const {return end;} 192 193 Vector& Size() {return size;} 119 194 const Vector& Size() const {return size;} 120 const Index& SizeFactor() const {return size_factor;} 121 const Vector& Begin() const {return begin;} 122 const Vector& End() const {return end;} 123 const Vector& MeshWidth() const {return meshWidth;} 124 125 Vector& Size() {return size;} 126 Index& SizeFactor() {return size_factor;} 127 Vector& Begin() {return begin;} 128 Vector& End() {return end;} 129 Vector& MeshWidth() {return meshWidth;} 195 196 Vector& MeshWidth() {return mesh_width;} 197 const Vector& MeshWidth() const {return mesh_width;} 130 198 131 199 private: 132 Vector size; 133 Index size_factor; 134 Vector begin; 135 Vector end; 136 Vector meshWidth; 200 Vector begin, end, size; 201 Vector mesh_width; 137 202 }; 138 203
Note:
See TracChangeset
for help on using the changeset viewer.
