12 const double z,
double& ex,
double& ey,
13 double& ez,
Medium*& m,
int& status) {
21 m_efield(x, y, z, ex, ey, ez);
25 std::cerr <<
m_className <<
"::ElectricField:\n (" << x <<
", " << y
26 <<
", " << z <<
") is not inside a medium.\n";
36 const double z,
double& ex,
double& ey,
37 double& ez,
double& v,
Medium*& m,
40 ex = ey = ez = v = 0.;
45 m_efield(x, y, z, ex, ey, ez);
48 m_potential(x, y, z, v);
56 std::cerr <<
m_className <<
"::ElectricField:\n (" << x <<
", " << y
57 <<
", " << z <<
") is not inside a medium.\n";
72 const double z,
double& bx,
double& by,
73 double& bz,
int& status) {
79 m_bfield(x, y, z, bx, by, bz);
84 const double z,
double& wx,
double& wy,
85 double& wz,
const std::string& label) {
87 if (!m_wfield)
return;
88 m_wfield(x, y, z, wx, wy, wz, label);
93 const std::string& label) {
95 if (m_wpot) m_wpot(x, y, z, v, label);
100 const double z,
const double t,
101 double& wx,
double& wy,
double& wz,
102 const std::string& label) {
104 if (m_dwfield) m_dwfield(x, y, z, t, wx, wy, wz, label);
108 const double,
double&,
double&,
111 std::cerr <<
m_className <<
"::SetElectricField: Null pointer.\n";
119 const double,
double&)) {
121 std::cerr <<
m_className <<
"::SetPotential: Null pointer.\n";
128 const double,
double&,
double&,
129 double&,
const std::string)) {
131 std::cerr <<
m_className <<
"::SetWeightingField: Null pointer.\n";
138 const double,
double&,
139 const std::string)) {
141 std::cerr <<
m_className <<
"::SetWeightingPotential: Null pointer.\n";
148 void (*f)(
const double,
const double,
const double,
const double,
149 double&,
double&,
double&,
const std::string)) {
152 std::cerr <<
m_className <<
"::SetDelayedWeightingField: Null pointer.\n";
159 const double,
double&,
double&,
162 std::cerr <<
m_className <<
"::SetMagneticField: Null pointer.\n";
168void ComponentUser::Reset() {
170 m_potential =
nullptr;
177void ComponentUser::UpdatePeriodicity() {
179 std::cerr <<
m_className <<
"::UpdatePeriodicity:\n"
180 <<
" Periodicities are not supported.\n";
Abstract base class for components.
bool m_ready
Ready for use?
std::string m_className
Class name.
bool m_debug
Switch on/off debugging messages.
virtual Medium * GetMedium(const double x, const double y, const double z)
Get the medium at a given location (x, y, z).
void SetWeightingField(void(*f)(const double, const double, const double, double &, double &, double &, const std::string))
Set the function to be called for calculating the weighting field.
void DelayedWeightingField(const double x, const double y, const double z, const double t, double &wx, double &wy, double &wz, const std::string &label) override
void SetMagneticField(void(*f)(const double, const double, const double, double &, double &, double &))
Set the function to be called for calculating the magnetic field.
double WeightingPotential(const double x, const double y, const double z, const std::string &label) override
void SetElectricField(void(*f)(const double, const double, const double, double &, double &, double &))
Set the function to be called for calculating the electric field.
void SetDelayedWeightingField(void(*f)(const double, const double, const double, const double, double &, double &, double &, const std::string))
Set the function to be called for calculating the delayed weighting field.
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label) override
ComponentUser()
Constructor.
void MagneticField(const double x, const double y, const double z, double &bx, double &by, double &bz, int &status) override
bool GetVoltageRange(double &vmin, double &vmax) override
Calculate the voltage range [V].
void SetPotential(void(*f)(const double, const double, const double, double &))
Set the function to be called for calculating the potential.
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status) override
void SetWeightingPotential(void(*f)(const double, const double, const double, double &, const std::string))
Set the function to be called for calculating the weighting potential.
Abstract base class for media.
bool IsDriftable() const
Is charge carrier transport enabled in this medium?