Changeset 866ac4 for src/units/particle/bspline.hpp
- Timestamp:
- Apr 9, 2013, 8:44:10 PM (13 years ago)
- Children:
- b3075a
- Parents:
- 1a1be0
- File:
-
- 1 edited
-
src/units/particle/bspline.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/units/particle/bspline.hpp
r1a1be0 r866ac4 28 28 #ifndef BSPLINE_HPP_ 29 29 #define BSPLINE_HPP_ 30 31 #include <cmath> 30 32 31 33 #include "base/helper.hpp" … … 67 69 int c = 0; 68 70 69 const int index_global_x = grid.Global().GlobalBegin().X() + (p.Pos().X() - grid.Extent().Begin().X()) / grid.Extent().MeshWidth().X();70 const int index_global_y = grid.Global().GlobalBegin().Y() + (p.Pos().Y() - grid.Extent().Begin().Y()) / grid.Extent().MeshWidth().Y();71 const int index_global_z = grid.Global().GlobalBegin().Z() + (p.Pos().Z() - grid.Extent().Begin().Z()) / grid.Extent().MeshWidth().Z();71 const int index_global_x = grid.Global().GlobalBegin().X() + std::floor((p.Pos().X() - grid.Extent().Begin().X()) / grid.Extent().MeshWidth().X()); 72 const int index_global_y = grid.Global().GlobalBegin().Y() + std::floor((p.Pos().Y() - grid.Extent().Begin().Y()) / grid.Extent().MeshWidth().Y()); 73 const int index_global_z = grid.Global().GlobalBegin().Z() + std::floor((p.Pos().Z() - grid.Extent().Begin().Z()) / grid.Extent().MeshWidth().Z()); 72 74 73 75 assert(index_global_x >= grid.Global().LocalBegin().X() && index_global_x < grid.Global().LocalEnd().X());
Note:
See TracChangeset
for help on using the changeset viewer.
