44 lines
989 B
C++
Executable File
44 lines
989 B
C++
Executable File
#ifndef ELECTROMAGNETIC_FIELD_H
|
|
#define ELECTROMAGNETIC_FIELD_H
|
|
|
|
#include <memory>
|
|
|
|
#include "simulation/coordinates.h"
|
|
#include "simulation/scalar_field.h"
|
|
#include "simulation/vector_field.h"
|
|
|
|
class ElectricField {
|
|
public:
|
|
ElectricField(std::shared_ptr<VectorField> background,
|
|
std::shared_ptr<VectorField> dynamic);
|
|
|
|
CylinderVector value(const Coordinate& position) const;
|
|
|
|
void updateDynamicField(std::shared_ptr<VectorField> field);
|
|
|
|
private:
|
|
std::shared_ptr<VectorField> background_;
|
|
std::shared_ptr<VectorField> dynamic_;
|
|
};
|
|
|
|
class MagneticField {
|
|
public:
|
|
MagneticField(std::shared_ptr<VectorField> field);
|
|
|
|
CylinderVector value(const Coordinate& position) const;
|
|
|
|
private:
|
|
std::shared_ptr<VectorField> field_;
|
|
};
|
|
|
|
class GravityField {
|
|
public:
|
|
GravityField(std::shared_ptr<VectorField> field);
|
|
CylinderVector value(const Coordinate& position) const;
|
|
|
|
private:
|
|
std::shared_ptr<VectorField> field_;
|
|
};
|
|
|
|
#endif /* ELECTROMAGNETIC_FIELD_H */
|