19 const double z,
double& ex,
double& ey,
20 double& ez,
Medium*& m,
int& status) {
29 m_efield(x, y, z, ex, ey, ez);
34 std::cerr <<
" (" << x <<
", " << y <<
", " << z <<
")"
35 <<
" is not inside a medium.\n";
49 const double z,
double& ex,
double& ey,
50 double& ez,
double& v,
Medium*& m,
54 ex = ey = ez = v = 0.;
59 m_efield(x, y, z, ex, ey, ez);
62 m_potential(x, y, z, v);
71 std::cerr <<
" (" << x <<
", " << y <<
", " << z <<
")"
72 <<
" is not inside a medium.\n";
93 double& bx,
double& by,
double& bz,
101 m_bfield(x, y, z, bx, by, bz);
107 const double z,
double& wx,
double& wy,
108 double& wz,
const std::string& label) {
111 if (!m_wfield)
return;
112 m_wfield(x, y, z, wx, wy, wz, label);
117 const std::string& label) {
120 if (m_wpot) m_wpot(x, y, z, v, label);
125 const double,
double&,
double&,
129 std::cerr <<
m_className <<
"::SetElectricField:\n Null pointer.\n";
137 const double,
double&)) {
140 std::cerr <<
m_className <<
"::SetPotential:\n Null pointer.\n";
147 const double,
double&,
double&,
148 double&,
const std::string)) {
151 std::cerr <<
m_className <<
"::SetWeightingField:\n Null pointer.\n";
158 const double,
double&,
159 const std::string)) {
162 std::cerr <<
m_className <<
"::SetWeightingPotential:\n Null pointer.\n";
169 const double,
double&,
double&,
173 std::cerr <<
m_className <<
"::SetMagneticField:\n Null pointer.\n";
179void ComponentUser::Reset() {
189void ComponentUser::UpdatePeriodicity() {
192 std::cerr <<
m_className <<
"::UpdatePeriodicity:\n"
193 <<
" 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 SetMagneticField(void(*f)(const double, const double, const double, double &, double &, double &))
Set the function to be called for calculating the magnetic field.
bool GetVoltageRange(double &vmin, double &vmax)
Calculate the voltage range [V].
void MagneticField(const double x, const double y, const double z, double &bx, double &by, double &bz, int &status)
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 WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)
ComponentUser()
Constructor.
double WeightingPotential(const double x, const double y, const double z, const std::string &label)
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)
void SetPotential(void(*f)(const double, const double, const double, double &))
Set the function to be called for calculating the potential.
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.