34 static constexpr
size_t DIM_POS = Grid_t::DIM;
44 static constexpr
unsigned int N = 1 <<
DIM_POS;
59 std::array<double, DIM_POS> lowerLeft,
60 std::array<double, DIM_POS> upperRight,
61 std::array<Vector3D, N> fieldValues)
86 for (
unsigned int i = 0; i <
DIM_POS; ++i) {
127 m_grid(std::move(grid)) {}
150 const auto& indices =
m_grid.localBinsFromPosition(gridPosition);
151 const auto& lowerLeft =
m_grid.lowerLeftBinEdge(indices);
152 const auto& upperRight =
m_grid.upperRightBinEdge(indices);
155 constexpr
size_t nCorners = 1 <<
DIM_POS;
156 std::array<Vector3D, nCorners> neighbors;
157 const auto& cornerIndices =
m_grid.closestPointsIndices(gridPosition);
160 for (
size_t index : cornerIndices) {
165 std::move(neighbors));
172 auto nBinsArray =
m_grid.numLocalBins();
173 return std::vector<size_t>(nBinsArray.begin(), nBinsArray.end());
180 auto minArray =
m_grid.minPosition();
181 return std::vector<double>(minArray.begin(), minArray.end());
188 auto maxArray =
m_grid.maxPosition();
189 return std::vector<double>(maxArray.begin(), maxArray.end());
232 template <
typename Mapper_t>
257 Cache(std::reference_wrapper<const MagneticFieldContext> ) {}
293 return (*cache.
fieldCell).getField(position);