Version 2, position dependent E/B, kinetic ions, boris mover, terminator
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#include "simulation/electromagnetic_field.h"
|
||||
|
||||
ElectricField::ElectricField(std::shared_ptr<VectorField> background,
|
||||
std::shared_ptr<VectorField> dynamic)
|
||||
: background_(background), dynamic_(dynamic) {}
|
||||
|
||||
CylinderVector ElectricField::value(const Coordinate& position) const {
|
||||
return background_->value(position) + dynamic_->value(position);
|
||||
}
|
||||
|
||||
void ElectricField::updateDynamicField(std::shared_ptr<VectorField> field) {
|
||||
dynamic_ = field;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
MagneticField::MagneticField(std::shared_ptr<VectorField> field)
|
||||
: field_(field) {}
|
||||
|
||||
CylinderVector MagneticField::value(const Coordinate& position) const {
|
||||
return field_->value(position);
|
||||
}
|
||||
Reference in New Issue
Block a user