30 virtual std::vector<size_t> getNBins()
const = 0;
35 virtual std::vector<double> getMin()
const = 0;
40 virtual std::vector<double> getMax()
const = 0;
54 virtual Vector3 getFieldUnchecked(
const Vector3& position)
const = 0;
75 template <
typename gr
id_t>
88 static constexpr
unsigned int N = 1 <<
DIM_POS;
102 std::array<double, DIM_POS> upperRight,
103 std::array<Vector3, N> fieldValues)
196 const auto& indices =
m_cfg.
grid.localBinsFromPosition(gridPosition);
197 const auto& lowerLeft =
m_cfg.
grid.lowerLeftBinEdge(indices);
198 const auto& upperRight =
m_cfg.
grid.upperRightBinEdge(indices);
201 constexpr
size_t nCorners = 1 <<
DIM_POS;
202 std::array<Vector3, nCorners> neighbors;
203 const auto& cornerIndices =
m_cfg.
grid.closestPointsIndices(gridPosition);
206 return MagneticFieldError::OutOfBounds;
210 for (
size_t index : cornerIndices) {
223 auto nBinsArray =
m_cfg.
grid.numLocalBins();
224 return std::vector<size_t>(nBinsArray.begin(), nBinsArray.end());
230 std::vector<double>
getMin() const final {
237 std::vector<double>
getMax() const final {
273 return MagneticFieldProvider::Cache::make<Cache>(mctx);