#ifndef ELECTROMAGNETIC_FIELD_H #define ELECTROMAGNETIC_FIELD_H #include #include "simulation/coordinates.h" #include "simulation/scalar_field.h" #include "simulation/vector_field.h" // class for an electric field; consists of two VectorField objects // one for the dynamic electric field, i.e. calculated during the simulation (not yet implemented, right now behaves the same as the background field) // one for the background field, i.e. a field read in from an input file class ElectricField { public: // Constructor: setting the background and dynamic field to the provided VectorFields ElectricField(std::shared_ptr background, std::shared_ptr dynamic); // return the value of the electric field at the Coordinate position (sum of the background and dynamic field values) // as a CylinderVector CylinderVector value(const Coordinate& position) const; // set the dynamic field to the provided field void updateDynamicField(std::shared_ptr field); private: std::shared_ptr background_; std::shared_ptr dynamic_; }; // class for a magnetic field class MagneticField { public: // Constructor: takes the VectorField describing the magnetic field MagneticField(std::shared_ptr field); // return the value of the magnetic field at Coordinate position as a CylinderVector CylinderVector value(const Coordinate& position) const; private: std::shared_ptr field_; }; #endif /* ELECTROMAGNETIC_FIELD_H */