11 #include <boost/test/data/test_case.hpp>
12 #include <boost/test/floating_point_comparison.hpp>
13 #include <boost/test/unit_test.hpp>
24 namespace tt = boost::test_tools;
40 template <
class BField_t>
42 using Cache_t =
typename BField_t::Cache;
49 field.getFieldGradient(pos, gradient);
53 field.getField(pos, cache);
54 field.getFieldGradient(pos, gradient, cache);
69 struct DummyFieldCell {
71 bool isInside(
const Vector3D&)
const {
return true; }
74 struct DummyMapper : DummyFieldCell {
75 using FieldCell = DummyFieldCell;
77 DummyFieldCell getFieldCell(
const Vector3D&)
const {
78 return DummyFieldCell();
80 std::vector<size_t> getNBins()
const {
return {42}; }
81 std::vector<double> getMin()
const {
return {5}; }
82 std::vector<double> getMax()
const {
return {15}; }
97 std::make_shared<ConstantBField>(
Vector3D(1, 1, 1)));