43 static constexpr
unsigned int N = 1 <<
DIM_POS;
58 std::array<double, DIM_POS> lowerLeft,
59 std::array<double, DIM_POS> upperRight,
60 std::array<Vector3D, N> fieldValues)
85 for (
unsigned int i = 0; i <
DIM_POS; ++i) {
126 m_grid(std::move(grid)) {}
149 const auto& indices =
m_grid.localBinsFromPosition(gridPosition);
150 const auto& lowerLeft =
m_grid.lowerLeftBinEdge(indices);
151 const auto& upperRight =
m_grid.upperRightBinEdge(indices);
154 constexpr
size_t nCorners = 1 <<
DIM_POS;
155 std::array<Vector3D, nCorners> neighbors;
156 const auto& cornerIndices =
m_grid.closestPointsIndices(gridPosition);
159 for (
size_t index : cornerIndices) {
164 std::move(neighbors));
171 auto nBinsArray =
m_grid.numLocalBins();
172 return std::vector<size_t>(nBinsArray.begin(), nBinsArray.end());
179 auto minArray =
m_grid.minPosition();
180 return std::vector<double>(minArray.begin(), minArray.end());
187 auto maxArray =
m_grid.maxPosition();
188 return std::vector<double>(maxArray.begin(), maxArray.end());
231 template <
typename Mapper_t>
256 Cache(std::reference_wrapper<const MagneticFieldContext> ) {}
292 return (*cache.
fieldCell).getField(position);