13 hasWeightingField(false),
15 hasWeightingPotential(false),
22 const double z,
double& ex,
double& ey,
23 double& ez,
Medium*& m,
int& status) {
32 field(x, y, z, ex, ey, ez);
37 std::cerr <<
" (" << x <<
", " << y <<
", " << z <<
")"
38 <<
" is not inside a medium.\n";
52 const double z,
double& ex,
double& ey,
53 double& ez,
double& v,
Medium*& m,
57 ex = ey = ez = v = 0.;
62 field(x, y, z, ex, ey, ez);
65 potential(x, y, z, v);
74 std::cerr <<
" (" << x <<
", " << y <<
", " << z <<
")"
75 <<
" is not inside a medium.\n";
95 const double z,
double& wx,
double& wy,
96 double& wz,
const std::string label) {
99 if (!hasWeightingField)
return;
100 wfield(x, y, z, wx, wy, wz, label);
105 const std::string label) {
108 if (hasWeightingPotential) {
109 wpot(x, y, z, v, label);
115 const double,
double&,
double&,
119 std::cerr <<
m_className <<
"::SetElectricField:\n";
120 std::cerr <<
" Function pointer is null.\n";
129 const double,
double&)) {
133 std::cerr <<
" Function pointer is null.\n";
141 const double,
double&,
double&,
142 double&,
const std::string)) {
145 std::cerr <<
m_className <<
"::SetWeightingField:\n";
146 std::cerr <<
" Function pointer is null.\n";
150 hasWeightingField =
true;
154 const double,
double&,
155 const std::string)) {
158 std::cerr <<
m_className <<
"::SetWeightingPotential:\n";
159 std::cerr <<
" Function pointer is null.\n";
163 hasWeightingPotential =
true;
166void ComponentUser::Reset() {
173 hasPotential =
false;
174 hasWeightingField =
false;
175 hasWeightingPotential =
false;
179void ComponentUser::UpdatePeriodicity() {
182 std::cerr <<
m_className <<
"::UpdatePeriodicity:\n";
183 std::cerr <<
" Periodicities are not supported.\n";
virtual Medium * GetMedium(const double &x, const double &y, const double &z)
void SetWeightingField(void(*f)(const double, const double, const double, double &, double &, double &, const std::string))
double WeightingPotential(const double x, const double y, const double z, const std::string label)
bool GetVoltageRange(double &vmin, double &vmax)
void SetElectricField(void(*f)(const double, const double, const double, double &, double &, double &))
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string label)
void SetPotential(void(*f)(const double, const double, const double, double &))
void SetWeightingPotential(void(*f)(const double, const double, const double, double &, const std::string))