16 #ifndef EMFIELD_MULTI_ZONE_FIELD_H 17 #define EMFIELD_MULTI_ZONE_FIELD_H 1 83 double _zone_tolerance_;
86 bool _absolute_positioning_;
102 virtual void initialize(const ::datatools::properties &,
107 virtual void reset();
123 double zone_tolerance_,
125 bool absolute_positioning_ =
true,
133 std::vector<const zone_field_entry *> & zones_)
const;
151 virtual void tree_dump (std::ostream & out_ = std::clog,
152 const std::string & title_ =
"",
153 const std::string & indent_ =
"",
154 bool inherit_ =
false)
const;
163 bool _own_shape_factory_;
174 #endif // EMFIELD_MULTI_ZONE_FIELD_H Definition: multi_zone_field.h:49
void _set_defaults()
Set default values to attributes.
#define EMFIELD_REGISTRATION_INTERFACE(EMFIELD_CLASS_NAME)
Definition: electromagnetic_field_macros.h:157
const zone_field_entry & get_zone_field(const std::string &zone_label_) const
Return the zone field entry associated to a given label.
static bool _higher_zone_priority(const zone_field_entry *zfe1_, const zone_field_entry *zfe2_)
Check if a zone field entry has higher priority than another one.
bool has_shape_factory() const
Check if the shape factory is set.
void _set_defaults()
Set default attributes values.
Definition: multi_zone_field.h:50
bool owns_shape_factory() const
Check the ownership flag for the shape factory.
Definition: multi_zone_field.h:45
void reset_shape_factory()
Reset the shape factory.
The information associated to a given zone.
Definition: multi_zone_field.h:61
multi_zone_field(uint32_t=0)
Default constructor.
zone_priority_type
Definition: multi_zone_field.h:43
void fine_zones(const geomtools::vector_3d &position_, std::vector< const zone_field_entry * > &zones_) const
Find all zones where a position lies.
std::map< std::string, handle_type > field_dict_type
Definition: base_electromagnetic_field.h:49
void set_shape_factory(const geomtools::shape_factory &shfact_)
Set an external shape factory.
Abstract base class for all electromagnetic field.
Definition: base_electromagnetic_field.h:43
void create_shape_factory(const ::datatools::properties &setup_)
Create an embedded shape factory.
static std::string zone_priority_to_label(zone_priority_type)
Return the label associated to a given zone priority.
Definition: multi_zone_field.h:46
virtual int compute_magnetic_field(const ::geomtools::vector_3d &position_, double time_, geomtools::vector_3d &magnetic_field_) const
Compute magnetic field.
zone_field_entry()
Default constructor.
virtual ~multi_zone_field()
Destructor.
virtual void initialize(const ::datatools::properties &, ::datatools::service_manager &, ::emfield::base_electromagnetic_field::field_dict_type &)
Initialization.
A class that computes the value of the EM field that depends on the position with respect to the coor...
Definition: multi_zone_field.h:39
void add_zone_field(const std::string &zone_label_, const geomtools::placement &zone_positioning_, const geomtools::i_shape_3d &zone_shape_, double zone_tolerance_, const base_electromagnetic_field &zone_field_, bool absolute_positioning_=true, zone_priority_type priority_=ZONE_PRIORITY_DEFAULT)
Add a zone field.
virtual void reset()
Reset.
std::map< std::string, zone_field_entry > zone_field_dict_type
Type alias for a dictionary of zone fields.
Definition: multi_zone_field.h:93
Top-level namespace of the Bayeux/emfield module library.
Definition: base_electromagnetic_field.h:40
Definition: multi_zone_field.h:51
Definition: multi_zone_field.h:44
virtual int compute_electric_field(const ::geomtools::vector_3d &position_, double time_, ::geomtools::vector_3d &electric_field_) const
Compute electric field.
Definition: multi_zone_field.h:48
static zone_priority_type label_to_zone_priority(const std::string &)
Return the zone priority associated to a given label.
Definition: multi_zone_field.h:47
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.