Bayeux  3.4.1
Core Foundation library for SuperNEMO
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
emfield::multi_zone_field Class Reference

A class that computes the value of the EM field that depends on the position with respect to the coordinate system. Several regions are associated to several fields. More...

#include <bayeux/emfield/multi_zone_field.h>

Inheritance diagram for emfield::multi_zone_field:
emfield::base_electromagnetic_field datatools::i_tree_dumpable

Classes

class  zone_field_entry
 The information associated to a given zone. More...
 

Public Types

enum  zone_priority_type {
  ZONE_PRIORITY_INVALID = -1, ZONE_PRIORITY_VERY_LOW = 0, ZONE_PRIORITY_LOW = 1, ZONE_PRIORITY_HIGH = 2,
  ZONE_PRIORITY_VERY_HIGH = 3, ZONE_PRIORITY_MIN = ZONE_PRIORITY_VERY_LOW, ZONE_PRIORITY_MAX = ZONE_PRIORITY_VERY_HIGH, ZONE_PRIORITY_DEFAULT = ZONE_PRIORITY_MIN
}
 
typedef std::map< std::string, zone_field_entryzone_field_dict_type
 Type alias for a dictionary of zone fields. More...
 
- Public Types inherited from emfield::base_electromagnetic_field
enum  flag_type {
  DEBUG = datatools::bit_mask::bit01, ELECTRIC_FIELD = datatools::bit_mask::bit02, MAGNETIC_FIELD = datatools::bit_mask::bit03, ELECTRIC_FIELD_CAN_BE_COMBINED = datatools::bit_mask::bit04,
  MAGNETIC_FIELD_CAN_BE_COMBINED = datatools::bit_mask::bit05, ELECTRIC_FIELD_IS_TIME_DEPENDENT = datatools::bit_mask::bit06, MAGNETIC_FIELD_IS_TIME_DEPENDENT = datatools::bit_mask::bit07
}
 Initialization flags. More...
 
enum  status_type {
  STATUS_SUCCESS = 0, STATUS_ERROR = 1, STATUS_NOT_INITIALIZED = 2, STATUS_INVALID_POSITION_TIME = 3,
  STATUS_NO_ELECTRIC_FIELD = 4, STATUS_NO_MAGNETIC_FIELD = 5
}
 Status at field computation. More...
 
typedef datatools::handle< base_electromagnetic_fieldhandle_type
 
typedef std::map< std::string, handle_typefield_dict_type
 
- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 }
 Enumeration for standard output streams. More...
 

Public Member Functions

 multi_zone_field (uint32_t=0)
 Default constructor. More...
 
virtual ~multi_zone_field ()
 Destructor. More...
 
virtual void initialize (const ::datatools::properties &, ::datatools::service_manager &, ::emfield::base_electromagnetic_field::field_dict_type &)
 Initialization. More...
 
virtual void reset ()
 Reset. More...
 
virtual int compute_electric_field (const ::geomtools::vector_3d &position_, double time_, ::geomtools::vector_3d &electric_field_) const
 Compute electric field. More...
 
virtual int compute_magnetic_field (const ::geomtools::vector_3d &position_, double time_, geomtools::vector_3d &magnetic_field_) const
 Compute magnetic field. More...
 
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. More...
 
const zone_field_entryget_zone_field (const std::string &zone_label_) const
 Return the zone field entry associated to a given label. More...
 
void fine_zones (const geomtools::vector_3d &position_, std::vector< const zone_field_entry * > &zones_) const
 Find all zones where a position lies. More...
 
bool owns_shape_factory () const
 Check the ownership flag for the shape factory. More...
 
bool has_shape_factory () const
 Check if the shape factory is set. More...
 
void reset_shape_factory ()
 Reset the shape factory. More...
 
void set_shape_factory (const geomtools::shape_factory &shfact_)
 Set an external shape factory. More...
 
void create_shape_factory (const ::datatools::properties &setup_)
 Create an embedded shape factory. More...
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart print. More...
 
- Public Member Functions inherited from emfield::base_electromagnetic_field
void set_logging_priority (datatools::logger::priority priority_)
 Return the logging priority. More...
 
datatools::logger::priority get_logging_priority () const
 Set the logging priority. More...
 
bool is_initialized () const
 Check initialization status. More...
 
void set_name (const std::string &)
 Set the name of the field. More...
 
const std::string & get_name () const
 Return the name of the field. More...
 
bool is_debug () const
 Check debug status. More...
 
void set_debug (bool debug_)
 Set debug status. More...
 
bool is_electric_field () const
 Check if the field is an electric field. More...
 
bool is_magnetic_field () const
 Check if the field is a magnetic field. More...
 
bool electric_field_can_be_combined () const
 Check if the electric field can be combined. More...
 
bool magnetic_field_can_be_combined () const
 Check if the magnetic field can be combined. More...
 
bool electric_field_is_time_dependent () const
 Check if the electric field depends on time. More...
 
bool magnetic_field_is_time_dependent () const
 Check if the magnetic field depends on time. More...
 
 base_electromagnetic_field (uint32_t flags_=0)
 Constructor. More...
 
virtual ~base_electromagnetic_field ()
 Destructor. More...
 
virtual int compute_electromagnetic_field (const geomtools::vector_3d &position_, double time_, geomtools::vector_3d &electric_field_, geomtools::vector_3d &magnetic_field_) const
 Compute the coordinates of the electric and magnetic fields at given position and time. More...
 
virtual int compute_field (char label_, const geomtools::vector_3d &position_, double time_, geomtools::vector_3d &field_) const
 Compute the coordinates of the electric or magnetic field at given position and time. More...
 
virtual void initialize_simple ()
 Naked initialization. More...
 
virtual void initialize_standalone (const datatools::properties &setup_)
 Standalone initialization, no external resources are needed, only a set of parameters. More...
 
virtual void initialize_with_service_only (const datatools::properties &setup_, datatools::service_manager &service_manager_)
 Initialization using a set of parameters and a service manager. More...
 
virtual void initialize_with_dictionary_only (const datatools::properties &setup_, field_dict_type &dictionary_)
 Initialization using a set of parameters and an external dictionary of EM fields. More...
 
virtual void initialize (const datatools::properties &setup_, datatools::service_manager &service_manager_, field_dict_type &dictionary_)=0
 Main initialization. More...
 
virtual std::string get_class_id () const =0
 Return the class string identifier. More...
 
virtual bool position_and_time_are_valid (const geomtools::vector_3d &position_, double time_) const
 Check if position and time are valid for this field. More...
 
virtual int compute_electric_field (const geomtools::vector_3d &position_, double time_, geomtools::vector_3d &electric_field_) const
 Compute the coordinates of the electric field at given position and time. More...
 
virtual int compute_magnetic_field (const geomtools::vector_3d &position_, double time_, geomtools::vector_3d &magnetic_field_) const
 Compute the coordinates of the magnetic field at given position and time. More...
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 Constructor. More...
 
virtual ~i_tree_dumpable ()
 Destructor. More...
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 Main new interface method for printing. More...
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 Printing with jsonized options. More...
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 Printing with jsonized options. More...
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 

Static Public Member Functions

static std::string zone_priority_to_label (zone_priority_type)
 Return the label associated to a given zone priority. More...
 
static zone_priority_type label_to_zone_priority (const std::string &)
 Return the zone priority associated to a given label. More...
 
- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 

Protected Member Functions

void _set_defaults ()
 Set default attributes values. More...
 
- Protected Member Functions inherited from emfield::base_electromagnetic_field
void _set_initialized (bool initialized_)
 
void _set_electric_field (bool=true)
 
void _set_magnetic_field (bool=true)
 
void _set_electric_field_can_be_combined (bool=true)
 
void _set_magnetic_field_can_be_combined (bool=true)
 
void _set_electric_field_is_time_dependent (bool=true)
 
void _set_magnetic_field_is_time_dependent (bool=true)
 
void _parse_basic_parameters (const datatools::properties &setup_, datatools::service_manager &service_manager_, field_dict_type &dictionary_)
 
void _set_defaults ()
 Set default attributes values. More...
 

Additional Inherited Members

- Static Public Attributes inherited from emfield::base_electromagnetic_field
static const char ELECTRIC_FIELD_LABEL = 'E'
 
static const char MAGNETIC_FIELD_LABEL = 'B'
 

Detailed Description

A class that computes the value of the EM field that depends on the position with respect to the coordinate system. Several regions are associated to several fields.

Member Typedef Documentation

◆ zone_field_dict_type

Type alias for a dictionary of zone fields.

Member Enumeration Documentation

◆ zone_priority_type

Enumerator
ZONE_PRIORITY_INVALID 
ZONE_PRIORITY_VERY_LOW 
ZONE_PRIORITY_LOW 
ZONE_PRIORITY_HIGH 
ZONE_PRIORITY_VERY_HIGH 
ZONE_PRIORITY_MIN 
ZONE_PRIORITY_MAX 
ZONE_PRIORITY_DEFAULT 

Constructor & Destructor Documentation

◆ multi_zone_field()

emfield::multi_zone_field::multi_zone_field ( uint32_t  = 0)

Default constructor.

◆ ~multi_zone_field()

virtual emfield::multi_zone_field::~multi_zone_field ( )
virtual

Destructor.

Member Function Documentation

◆ _set_defaults()

void emfield::multi_zone_field::_set_defaults ( )
protected

Set default attributes values.

◆ add_zone_field()

void emfield::multi_zone_field::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.

◆ compute_electric_field()

virtual int emfield::multi_zone_field::compute_electric_field ( const ::geomtools::vector_3d position_,
double  time_,
::geomtools::vector_3d electric_field_ 
) const
virtual

Compute electric field.

◆ compute_magnetic_field()

virtual int emfield::multi_zone_field::compute_magnetic_field ( const ::geomtools::vector_3d position_,
double  time_,
geomtools::vector_3d magnetic_field_ 
) const
virtual

Compute magnetic field.

◆ create_shape_factory()

void emfield::multi_zone_field::create_shape_factory ( const ::datatools::properties setup_)

Create an embedded shape factory.

◆ fine_zones()

void emfield::multi_zone_field::fine_zones ( const geomtools::vector_3d position_,
std::vector< const zone_field_entry * > &  zones_ 
) const

Find all zones where a position lies.

◆ get_zone_field()

const zone_field_entry& emfield::multi_zone_field::get_zone_field ( const std::string &  zone_label_) const

Return the zone field entry associated to a given label.

◆ has_shape_factory()

bool emfield::multi_zone_field::has_shape_factory ( ) const

Check if the shape factory is set.

◆ initialize()

virtual void emfield::multi_zone_field::initialize ( const ::datatools::properties ,
::datatools::service_manager ,
::emfield::base_electromagnetic_field::field_dict_type  
)
virtual

Initialization.

◆ label_to_zone_priority()

static zone_priority_type emfield::multi_zone_field::label_to_zone_priority ( const std::string &  )
static

Return the zone priority associated to a given label.

◆ owns_shape_factory()

bool emfield::multi_zone_field::owns_shape_factory ( ) const

Check the ownership flag for the shape factory.

◆ reset()

virtual void emfield::multi_zone_field::reset ( )
virtual

◆ reset_shape_factory()

void emfield::multi_zone_field::reset_shape_factory ( )

Reset the shape factory.

◆ set_shape_factory()

void emfield::multi_zone_field::set_shape_factory ( const geomtools::shape_factory shfact_)

Set an external shape factory.

◆ tree_dump()

virtual void emfield::multi_zone_field::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from emfield::base_electromagnetic_field.

◆ zone_priority_to_label()

static std::string emfield::multi_zone_field::zone_priority_to_label ( zone_priority_type  )
static

Return the label associated to a given zone priority.


The documentation for this class was generated from the following file: