Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Garfield::Component Class Referenceabstract

Abstract base class for components. More...

#include <Component.hh>

+ Inheritance diagram for Garfield::Component:

Public Member Functions

 Component ()=delete
 Default constructor.
 
 Component (const std::string &name)
 Constructor.
 
virtual ~Component ()
 Destructor.
 
virtual void SetGeometry (Geometry *geo)
 Define the geometry.
 
virtual void Clear ()
 Reset.
 
virtual MediumGetMedium (const double x, const double y, const double z)
 Get the medium at a given location (x, y, z).
 
virtual void ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)=0
 
virtual void ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status)=0
 Calculate the drift field [V/cm] and potential [V] at (x, y, z).
 
virtual bool GetVoltageRange (double &vmin, double &vmax)=0
 Calculate the voltage range [V].
 
virtual void WeightingField (const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)
 
virtual double WeightingPotential (const double x, const double y, const double z, const std::string &label)
 
virtual void DelayedWeightingField (const double x, const double y, const double z, const double t, double &wx, double &wy, double &wz, const std::string &label)
 
virtual double DelayedWeightingPotential (const double x, const double y, const double z, const double t, const std::string &label)
 
virtual void MagneticField (const double x, const double y, const double z, double &bx, double &by, double &bz, int &status)
 
void SetMagneticField (const double bx, const double by, const double bz)
 Set a constant magnetic field.
 
virtual bool IsReady ()
 Ready for use?
 
virtual bool GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
 Get the bounding box coordinates.
 
virtual bool GetElementaryCell (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
 Get the coordinates of the elementary cell.
 
double IntegrateFluxCircle (const double xc, const double yc, const double r, const unsigned int nI=50)
 
double IntegrateFluxSphere (const double xc, const double yc, const double zc, const double r, const unsigned int nI=20)
 
double IntegrateFluxParallelogram (const double x0, const double y0, const double z0, const double dx1, const double dy1, const double dz1, const double dx2, const double dy2, const double dz2, const unsigned int nU=20, const unsigned int nV=20)
 
double IntegrateWeightingFluxParallelogram (const std::string &label, const double x0, const double y0, const double z0, const double dx1, const double dy1, const double dz1, const double dx2, const double dy2, const double dz2, const unsigned int nU=20, const unsigned int nV=20)
 
double IntegrateFluxLine (const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, const double xp, const double yp, const double zp, const unsigned int nI, const int isign=0)
 
virtual bool IsWireCrossed (const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, double &xc, double &yc, double &zc, const bool centre, double &rc)
 
virtual bool IsInTrapRadius (const double q0, const double x0, const double y0, const double z0, double &xw, double &yw, double &rw)
 
void EnablePeriodicityX (const bool on=true)
 Enable simple periodicity in the $x$ direction.
 
void EnablePeriodicityY (const bool on=true)
 Enable simple periodicity in the $y$ direction.
 
void EnablePeriodicityZ (const bool on=true)
 Enable simple periodicity in the $z$ direction.
 
void IsPeriodic (bool &perx, bool &pery, bool &perz)
 Return periodicity flags.
 
void EnableMirrorPeriodicityX (const bool on=true)
 Enable mirror periodicity in the $x$ direction.
 
void EnableMirrorPeriodicityY (const bool on=true)
 Enable mirror periodicity in the $y$ direction.
 
void EnableMirrorPeriodicityZ (const bool on=true)
 Enable mirror periodicity in the $y$ direction.
 
void IsMirrorPeriodic (bool &perx, bool &pery, bool &perz)
 Return mirror periodicity flags.
 
void EnableAxialPeriodicityX (const bool on=true)
 Enable axial periodicity in the $x$ direction.
 
void EnableAxialPeriodicityY (const bool on=true)
 Enable axial periodicity in the $y$ direction.
 
void EnableAxialPeriodicityZ (const bool on=true)
 Enable axial periodicity in the $z$ direction.
 
void IsAxiallyPeriodic (bool &perx, bool &pery, bool &perz)
 Return axial periodicity flags.
 
void EnableRotationSymmetryX (const bool on=true)
 Enable rotation symmetry around the $x$ axis.
 
void EnableRotationSymmetryY (const bool on=true)
 Enable rotation symmetry around the $y$ axis.
 
void EnableRotationSymmetryZ (const bool on=true)
 Enable rotation symmetry around the $z$ axis.
 
void IsRotationSymmetric (bool &rotx, bool &roty, bool &rotz)
 Return rotation symmetry flags.
 
void EnableDebugging ()
 Switch on debugging messages.
 
void DisableDebugging ()
 Switch off debugging messages.
 
virtual bool HasAttachmentMap () const
 Does the component have attachment maps?
 
virtual bool HasVelocityMap () const
 Does the component have velocity maps?
 
virtual bool ElectronAttachment (const double, const double, const double, double &eta)
 Get the electron attachment coefficient.
 
virtual bool HoleAttachment (const double, const double, const double, double &eta)
 Get the hole attachment coefficient.
 
virtual bool ElectronVelocity (const double, const double, const double, double &vx, double &vy, double &vz)
 Get the electron drift velocity.
 
virtual bool HoleVelocity (const double, const double, const double, double &vx, double &vy, double &vz)
 Get the hole drift velocity.
 
virtual bool GetElectronLifetime (const double, const double, const double, double &etau)
 
virtual bool GetHoleLifetime (const double, const double, const double, double &htau)
 

Protected Member Functions

virtual void Reset ()=0
 Reset the component.
 
virtual void UpdatePeriodicity ()=0
 Verify periodicities.
 

Protected Attributes

std::string m_className = "Component"
 Class name.
 
Geometrym_geometry = nullptr
 Pointer to the geometry.
 
std::array< double, 3 > m_b0 = {{0., 0., 0.}}
 Constant magnetic field.
 
bool m_ready = false
 Ready for use?
 
bool m_debug = false
 Switch on/off debugging messages.
 
std::array< bool, 3 > m_periodic = {{false, false, false}}
 Simple periodicity in x, y, z.
 
std::array< bool, 3 > m_mirrorPeriodic = {{false, false, false}}
 Mirror periodicity in x, y, z.
 
std::array< bool, 3 > m_axiallyPeriodic = {{false, false, false}}
 Axial periodicity in x, y, z.
 
std::array< bool, 3 > m_rotationSymmetric = {{false, false, false}}
 Rotation symmetry around x-axis, y-axis, z-axis.
 

Detailed Description

Abstract base class for components.

Definition at line 13 of file Component.hh.

Constructor & Destructor Documentation

◆ Component() [1/2]

Garfield::Component::Component ( )
delete

Default constructor.

◆ Component() [2/2]

Garfield::Component::Component ( const std::string &  name)

Constructor.

Definition at line 9 of file Component.cc.

9 {
10 m_className = "Component" + name;
11}
std::string m_className
Class name.
Definition: Component.hh:329

◆ ~Component()

virtual Garfield::Component::~Component ( )
inlinevirtual

Destructor.

Definition at line 20 of file Component.hh.

20{}

Member Function Documentation

◆ Clear()

void Garfield::Component::Clear ( )
virtual

Reset.

Reimplemented in Garfield::ComponentGrid, and Garfield::ComponentVoxel.

Definition at line 27 of file Component.cc.

27 {
28 m_geometry = nullptr;
29 m_ready = false;
30 // Reset periodicities.
31 m_periodic.fill(false);
32 m_mirrorPeriodic.fill(false);
33 m_axiallyPeriodic.fill(false);
34 m_rotationSymmetric.fill(false);
35 // Reset the magnetic field.
36 m_b0.fill(0.);
37 Reset();
38}
std::array< bool, 3 > m_rotationSymmetric
Rotation symmetry around x-axis, y-axis, z-axis.
Definition: Component.hh:350
std::array< bool, 3 > m_mirrorPeriodic
Mirror periodicity in x, y, z.
Definition: Component.hh:346
virtual void Reset()=0
Reset the component.
std::array< bool, 3 > m_periodic
Simple periodicity in x, y, z.
Definition: Component.hh:344
Geometry * m_geometry
Pointer to the geometry.
Definition: Component.hh:332
bool m_ready
Ready for use?
Definition: Component.hh:338
std::array< double, 3 > m_b0
Constant magnetic field.
Definition: Component.hh:335
std::array< bool, 3 > m_axiallyPeriodic
Axial periodicity in x, y, z.
Definition: Component.hh:348

◆ DelayedWeightingField()

void Garfield::Component::DelayedWeightingField ( const double  x,
const double  y,
const double  z,
const double  t,
double &  wx,
double &  wy,
double &  wz,
const std::string &  label 
)
virtual

Calculate the delayed weighting field at a given point and time and for a given electrode.

Parameters
x,y,zcoordinates [cm].
ttime [ns].
wx,wy,wzcomponents of the weighting field [1/cm].
labelname of the electrode

Reimplemented in Garfield::ComponentGrid, Garfield::ComponentParallelPlate, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Definition at line 49 of file Component.cc.

52 {
53 if (m_debug) {
54 std::cerr << m_className << "::DelayedWeightingField: Not implemented.\n";
55 }
56 wx = wy = wz = 0.;
57}
bool m_debug
Switch on/off debugging messages.
Definition: Component.hh:341

◆ DelayedWeightingPotential()

double Garfield::Component::DelayedWeightingPotential ( const double  x,
const double  y,
const double  z,
const double  t,
const std::string &  label 
)
virtual

Calculate the delayed weighting potential at a given point and time and for a given electrode.

Parameters
x,y,zcoordinates [cm].
ttime [ns].
labelname of the electrode

Reimplemented in Garfield::ComponentComsol, and Garfield::ComponentParallelPlate.

Definition at line 68 of file Component.cc.

72 {
73 if (m_debug) {
74 std::cerr << m_className
75 << "::DelayedWeightingPotential: Not implemented.\n";
76 }
77 return 0.;
78}

◆ DisableDebugging()

void Garfield::Component::DisableDebugging ( )
inline

Switch off debugging messages.

Definition at line 283 of file Component.hh.

283{ m_debug = false; }

◆ ElectricField() [1/2]

virtual void Garfield::Component::ElectricField ( const double  x,
const double  y,
const double  z,
double &  ex,
double &  ey,
double &  ez,
double &  v,
Medium *&  m,
int &  status 
)
pure virtual

◆ ElectricField() [2/2]

virtual void Garfield::Component::ElectricField ( const double  x,
const double  y,
const double  z,
double &  ex,
double &  ey,
double &  ez,
Medium *&  m,
int &  status 
)
pure virtual

Calculate the drift field at given point.

Parameters
x,y,zcoordinates [cm].
ex,ey,ezcomponents of the electric field [V/cm].
mpointer to the medium at this location.
statusstatus flag

Status flags:

        0: Inside an active medium
      > 0: Inside a wire of type X
-4 ... -1: On the side of a plane where no wires are
       -5: Inside the mesh but not in an active medium
       -6: Outside the mesh
      -10: Unknown potential type (should not occur)
    other: Other cases (should not occur)

Implemented in Garfield::ComponentAnalyticField, Garfield::ComponentAnsys121, Garfield::ComponentAnsys123, Garfield::ComponentComsol, Garfield::ComponentConstant, Garfield::ComponentCST, Garfield::ComponentElmer, Garfield::ComponentElmer2D, Garfield::ComponentGrid, Garfield::ComponentNeBem2d, Garfield::ComponentNeBem3d, Garfield::ComponentNeBem3dMap, Garfield::ComponentParallelPlate, Garfield::ComponentTcad2d, Garfield::ComponentTcad3d, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Referenced by IntegrateFluxCircle(), IntegrateFluxLine(), IntegrateFluxSphere(), and Garfield::ComponentGrid::SaveElectricField().

◆ ElectronAttachment()

virtual bool Garfield::Component::ElectronAttachment ( const double  ,
const double  ,
const double  ,
double &  eta 
)
inlinevirtual

Get the electron attachment coefficient.

Reimplemented in Garfield::ComponentGrid, Garfield::ComponentTcadBase< N >, Garfield::ComponentTcadBase< 2 >, and Garfield::ComponentTcadBase< 3 >.

Definition at line 291 of file Component.hh.

292 {
293 eta = 0;
294 return false;
295 }

◆ ElectronVelocity()

virtual bool Garfield::Component::ElectronVelocity ( const double  ,
const double  ,
const double  ,
double &  vx,
double &  vy,
double &  vz 
)
inlinevirtual

Get the electron drift velocity.

Reimplemented in Garfield::ComponentGrid, Garfield::ComponentTcadBase< N >, Garfield::ComponentTcadBase< 2 >, and Garfield::ComponentTcadBase< 3 >.

Definition at line 303 of file Component.hh.

305 {
306 vx = vy = vz = 0;
307 return false;
308 }

◆ EnableAxialPeriodicityX()

void Garfield::Component::EnableAxialPeriodicityX ( const bool  on = true)
inline

Enable axial periodicity in the $x$ direction.

Definition at line 237 of file Component.hh.

237 {
238 m_axiallyPeriodic[0] = on;
240 }
virtual void UpdatePeriodicity()=0
Verify periodicities.

◆ EnableAxialPeriodicityY()

void Garfield::Component::EnableAxialPeriodicityY ( const bool  on = true)
inline

Enable axial periodicity in the $y$ direction.

Definition at line 242 of file Component.hh.

242 {
243 m_axiallyPeriodic[1] = on;
245 }

◆ EnableAxialPeriodicityZ()

void Garfield::Component::EnableAxialPeriodicityZ ( const bool  on = true)
inline

Enable axial periodicity in the $z$ direction.

Definition at line 247 of file Component.hh.

247 {
248 m_axiallyPeriodic[2] = on;
250 }

◆ EnableDebugging()

void Garfield::Component::EnableDebugging ( )
inline

Switch on debugging messages.

Definition at line 281 of file Component.hh.

281{ m_debug = true; }

◆ EnableMirrorPeriodicityX()

void Garfield::Component::EnableMirrorPeriodicityX ( const bool  on = true)
inline

Enable mirror periodicity in the $x$ direction.

Definition at line 215 of file Component.hh.

215 {
216 m_mirrorPeriodic[0] = on;
218 }

◆ EnableMirrorPeriodicityY()

void Garfield::Component::EnableMirrorPeriodicityY ( const bool  on = true)
inline

Enable mirror periodicity in the $y$ direction.

Definition at line 220 of file Component.hh.

220 {
221 m_mirrorPeriodic[1] = on;
223 }

Referenced by main().

◆ EnableMirrorPeriodicityZ()

void Garfield::Component::EnableMirrorPeriodicityZ ( const bool  on = true)
inline

Enable mirror periodicity in the $y$ direction.

Definition at line 225 of file Component.hh.

225 {
226 m_mirrorPeriodic[2] = on;
228 }

◆ EnablePeriodicityX()

void Garfield::Component::EnablePeriodicityX ( const bool  on = true)
inline

Enable simple periodicity in the $x$ direction.

Definition at line 193 of file Component.hh.

193 {
194 m_periodic[0] = on;
196 }

Referenced by main().

◆ EnablePeriodicityY()

void Garfield::Component::EnablePeriodicityY ( const bool  on = true)
inline

Enable simple periodicity in the $y$ direction.

Definition at line 198 of file Component.hh.

198 {
199 m_periodic[1] = on;
201 }

◆ EnablePeriodicityZ()

void Garfield::Component::EnablePeriodicityZ ( const bool  on = true)
inline

Enable simple periodicity in the $z$ direction.

Definition at line 203 of file Component.hh.

203 {
204 m_periodic[2] = on;
206 }

◆ EnableRotationSymmetryX()

void Garfield::Component::EnableRotationSymmetryX ( const bool  on = true)
inline

Enable rotation symmetry around the $x$ axis.

Definition at line 259 of file Component.hh.

259 {
260 m_rotationSymmetric[0] = on;
262 }

◆ EnableRotationSymmetryY()

void Garfield::Component::EnableRotationSymmetryY ( const bool  on = true)
inline

Enable rotation symmetry around the $y$ axis.

Definition at line 264 of file Component.hh.

264 {
265 m_rotationSymmetric[1] = on;
267 }

◆ EnableRotationSymmetryZ()

void Garfield::Component::EnableRotationSymmetryZ ( const bool  on = true)
inline

Enable rotation symmetry around the $z$ axis.

Definition at line 269 of file Component.hh.

269 {
270 m_rotationSymmetric[2] = on;
272 }

◆ GetBoundingBox()

bool Garfield::Component::GetBoundingBox ( double &  xmin,
double &  ymin,
double &  zmin,
double &  xmax,
double &  ymax,
double &  zmax 
)
virtual

Get the bounding box coordinates.

Reimplemented in Garfield::ComponentAnalyticField, Garfield::ComponentConstant, Garfield::ComponentFieldMap, Garfield::ComponentGrid, Garfield::ComponentNeBem2d, Garfield::ComponentNeBem3dMap, Garfield::ComponentParallelPlate, Garfield::ComponentTcad2d, Garfield::ComponentTcad3d, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Definition at line 99 of file Component.cc.

100 {
101 if (!m_geometry) return false;
102 return m_geometry->GetBoundingBox(xmin, ymin, zmin, xmax, ymax, zmax);
103}
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)=0
Get the bounding box (envelope of the geometry).

Referenced by Garfield::ComponentConstant::GetBoundingBox(), Garfield::ComponentUser::GetBoundingBox(), GetElementaryCell(), Garfield::ViewField::PlotFieldLines(), and Garfield::ViewBase::PlotLimits().

◆ GetElectronLifetime()

virtual bool Garfield::Component::GetElectronLifetime ( const double  ,
const double  ,
const double  ,
double &  etau 
)
inlinevirtual

Reimplemented in Garfield::ComponentTcadBase< N >, Garfield::ComponentTcadBase< 2 >, and Garfield::ComponentTcadBase< 3 >.

Definition at line 316 of file Component.hh.

317 {
318 etau = -1;
319 return false;
320 }

◆ GetElementaryCell()

bool Garfield::Component::GetElementaryCell ( double &  xmin,
double &  ymin,
double &  zmin,
double &  xmax,
double &  ymax,
double &  zmax 
)
virtual

Get the coordinates of the elementary cell.

Reimplemented in Garfield::ComponentAnalyticField, Garfield::ComponentFieldMap, Garfield::ComponentGrid, Garfield::ComponentNeBem2d, Garfield::ComponentTcad2d, Garfield::ComponentTcad3d, and Garfield::ComponentVoxel.

Definition at line 105 of file Component.cc.

106 {
107 return GetBoundingBox(xmin, ymin, zmin, xmax, ymax, zmax);
108}
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
Get the bounding box coordinates.
Definition: Component.cc:99

Referenced by Garfield::ViewBase::PlotLimits().

◆ GetHoleLifetime()

virtual bool Garfield::Component::GetHoleLifetime ( const double  ,
const double  ,
const double  ,
double &  htau 
)
inlinevirtual

Reimplemented in Garfield::ComponentTcadBase< N >, Garfield::ComponentTcadBase< 2 >, and Garfield::ComponentTcadBase< 3 >.

Definition at line 321 of file Component.hh.

322 {
323 htau = -1;
324 return false;
325 }

◆ GetMedium()

Medium * Garfield::Component::GetMedium ( const double  x,
const double  y,
const double  z 
)
virtual

◆ GetVoltageRange()

◆ HasAttachmentMap()

virtual bool Garfield::Component::HasAttachmentMap ( ) const
inlinevirtual

Does the component have attachment maps?

Reimplemented in Garfield::ComponentGrid, Garfield::ComponentTcadBase< N >, Garfield::ComponentTcadBase< 2 >, and Garfield::ComponentTcadBase< 3 >.

Definition at line 286 of file Component.hh.

286{ return false; }

◆ HasVelocityMap()

virtual bool Garfield::Component::HasVelocityMap ( ) const
inlinevirtual

Does the component have velocity maps?

Reimplemented in Garfield::ComponentGrid, Garfield::ComponentTcadBase< N >, Garfield::ComponentTcadBase< 2 >, and Garfield::ComponentTcadBase< 3 >.

Definition at line 288 of file Component.hh.

288{ return false; }

◆ HoleAttachment()

virtual bool Garfield::Component::HoleAttachment ( const double  ,
const double  ,
const double  ,
double &  eta 
)
inlinevirtual

Get the hole attachment coefficient.

Reimplemented in Garfield::ComponentGrid, Garfield::ComponentTcadBase< N >, Garfield::ComponentTcadBase< 2 >, and Garfield::ComponentTcadBase< 3 >.

Definition at line 297 of file Component.hh.

298 {
299 eta = 0;
300 return false;
301 }

◆ HoleVelocity()

virtual bool Garfield::Component::HoleVelocity ( const double  ,
const double  ,
const double  ,
double &  vx,
double &  vy,
double &  vz 
)
inlinevirtual

Get the hole drift velocity.

Reimplemented in Garfield::ComponentGrid, Garfield::ComponentTcadBase< N >, Garfield::ComponentTcadBase< 2 >, and Garfield::ComponentTcadBase< 3 >.

Definition at line 310 of file Component.hh.

312 {
313 vx = vy = vz = 0;
314 return false;
315 }

◆ IntegrateFluxCircle()

double Garfield::Component::IntegrateFluxCircle ( const double  xc,
const double  yc,
const double  r,
const unsigned int  nI = 50 
)

Integrate the normal component of the electric field over a circle.

Parameters
xc,yccentre of the circle [cm]
rradius [cm]
nInumber of intervals for the integration
Returns
charge enclosed in the circle [fC / cm]

Definition at line 127 of file Component.cc.

128 {
129 // FLDIN2, FCHK3
130 if (nI == 0) {
131 std::cerr << m_className << "::IntegrateFluxCircle:\n"
132 << " Number of intervals must be > 0.\n";
133 return 0.;
134 }
135 // Number of Gaussian quadrature points per interval.
136 constexpr size_t nG = 6;
137 constexpr std::array<double, nG> t = {
138 -0.932469514203152028, -0.661209386466264514, -0.238619186083196909,
139 0.238619186083196909, 0.661209386466264514, 0.932469514203152028};
140 constexpr std::array<double, nG> w = {
141 0.171324492379170345, 0.360761573048138608, 0.467913934572691047,
142 0.467913934572691047, 0.360761573048138608, 0.171324492379170345};
143
144 // Width and half-width of intervals.
145 const double d = TwoPi / nI;
146 const double h = 0.5 * d;
147 // Arguments of ElectricField.
148 double ex = 0., ey = 0., ez = 0.;
149 Medium* m = nullptr;
150 int status = 0;
151 // Perform the integration.
152 double s = 0.;
153 for (size_t i = 0; i < nG; ++i) {
154 const double phi0 = h * (1. + t[i]);
155 for (unsigned int k = 0; k < nI; ++k) {
156 const double phi = phi0 + k * d;
157 const double cp = cos(phi);
158 const double sp = sin(phi);
159 ElectricField(xc + cp * r, yc + sp * r, 0., ex, ey, ez, m, status);
160 s += w[i] * r * (ex * cp + ey * sp);
161 }
162 }
163 return h * s * VacuumPermittivity;
164}
virtual void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)=0
DoubleAc cos(const DoubleAc &f)
Definition: DoubleAc.cpp:432
DoubleAc sin(const DoubleAc &f)
Definition: DoubleAc.cpp:384

◆ IntegrateFluxLine()

double Garfield::Component::IntegrateFluxLine ( const double  x0,
const double  y0,
const double  z0,
const double  x1,
const double  y1,
const double  z1,
const double  xp,
const double  yp,
const double  zp,
const unsigned int  nI,
const int  isign = 0 
)

Integrate the electric field flux through a line from (x0,y0,z0) to (x1,y1,z1) along a direction (xp,yp,zp).

Parameters
x0,y0,z0coordinates of the starting point
x1,y1,z1coordinates of the end point
xp,yp,zpnormal vector
nInumber of intervals for the integration
isigninclude both negative and positive contributions (0) or only contributions with a given polarity (+1,-1)

Definition at line 320 of file Component.cc.

325 {
326 // FLDIN5
327 // Normalise the norm vector.
328 const double pmag2 = xp * xp + yp * yp + zp * zp;
329 if (pmag2 <= 0.) {
330 std::cerr << m_className << "::IntegrateFluxLine:\n"
331 << " Normal vector has zero length; flux set to 0.\n";
332 return 0.;
333 }
334 const double pmag = sqrt(pmag2);
335 const double xn = xp / pmag;
336 const double yn = yp / pmag;
337 const double zn = zp / pmag;
338
339 // Check integration points.
340 if (nI <= 1) {
341 std::cerr << m_className << "::IntegrateFluxLine:\n"
342 << " Number of points to integrate over must be > 1.\n";
343 return 0.;
344 }
345 // Ensure the segment has non-zero length.
346 const double vx = x1 - x0;
347 const double vy = y1 - y0;
348 const double vz = z1 - z0;
349 const double vmag2 = vx * vx + vy * vy + vz * vz;
350 if (vmag2 <= 0.) {
351 std::cerr << m_className << "::IntegrateFluxLine:\n"
352 << " Segment has zero length; flux set to 0.\n";
353 return 0.;
354 }
355 const double vmag = sqrt(vmag2);
356 // Segment should be perpendicular to the norm vector.
357 if (fabs(vx * xn + vy * yn + vz * zn) > 1.e-4 * vmag) {
358 std::cerr << m_className << "::IntegrateFluxLine:\n"
359 << " Segment is not perpendicular to norm vector.\n";
360 return 0.;
361 }
362
363 // Perform the integration.
364 constexpr size_t nG = 6;
365 constexpr std::array<double, nG> t = {
366 -0.932469514203152028, -0.661209386466264514, -0.238619186083196909,
367 0.238619186083196909, 0.661209386466264514, 0.932469514203152028};
368 constexpr std::array<double, nG> w = {
369 0.171324492379170345, 0.360761573048138608, 0.467913934572691047,
370 0.467913934572691047, 0.360761573048138608, 0.171324492379170345};
371
372 const double d = 1. / nI;
373 const double h = 0.5 * d;
374 // Arguments of ElectricField.
375 double ex = 0., ey = 0., ez = 0.;
376 Medium* m = nullptr;
377 int status = 0;
378 double s = 0.;
379 for (size_t i = 0; i < nG; ++i) {
380 const double u0 = h * (1. + t[i]);
381 for (unsigned int k = 0; k < nI; ++k) {
382 const double u = u0 + k * d;
383 const double x = x0 + u * vx;
384 const double y = y0 + u * vy;
385 const double z = z0 + u * vz;
386 ElectricField(x, y, z, ex, ey, ez, m, status);
387 double fn = ex * xn + ey * yn + ez * zn;
388 if (isign != 0) {
389 // TODO: -1?
390 fn = isign * fn > 0 ? fabs(fn) : -1.;
391 }
392 s += w[i] * fn;
393 }
394 }
395 return s * vmag;
396}
DoubleAc fabs(const DoubleAc &f)
Definition: DoubleAc.h:615
DoubleAc sqrt(const DoubleAc &f)
Definition: DoubleAc.cpp:314

Referenced by Garfield::ViewField::EqualFluxIntervals(), and Garfield::ViewField::FixedFluxIntervals().

◆ IntegrateFluxParallelogram()

double Garfield::Component::IntegrateFluxParallelogram ( const double  x0,
const double  y0,
const double  z0,
const double  dx1,
const double  dy1,
const double  dz1,
const double  dx2,
const double  dy2,
const double  dz2,
const unsigned int  nU = 20,
const unsigned int  nV = 20 
)

Integrate the normal component of the electric field over a parallelogram.

Parameters
x0,y0,z0coordinates of one of the corners [cm]
dx1,dy1,dz1vector to one of the adjacent corners [cm]
dx2,dy2,dz2vector to the other adjacent corner [cm]
nU,nVnumber of integration points in the two directions
Returns
flux [V cm]

Definition at line 225 of file Component.cc.

228 {
229
231 x0, y0, z0, dx1, dy1, dz1, dx2, dy2, dz2, nU, nV, false, "");
232}
double IntegrateFluxParallelogram(const double x0, const double y0, const double z0, const double dx1, const double dy1, const double dz1, const double dx2, const double dy2, const double dz2, const unsigned int nU=20, const unsigned int nV=20)
Definition: Component.cc:225

Referenced by IntegrateFluxParallelogram(), and IntegrateWeightingFluxParallelogram().

◆ IntegrateFluxSphere()

double Garfield::Component::IntegrateFluxSphere ( const double  xc,
const double  yc,
const double  zc,
const double  r,
const unsigned int  nI = 20 
)

Integrate the normal component of the electric field over a sphere.

Parameters
xc,yc,zccentre of the sphere [cm]
rradius of the sphere [cm]
nInumber of integration intervals in phi and theta
Returns
charge enclosed in the sphere [fC]

Definition at line 166 of file Component.cc.

168 {
169 // FLDIN3, FCHK2, FCHK1
170 if (nI == 0) {
171 std::cerr << m_className << "::IntegrateFluxSphere:\n"
172 << " Number of intervals must be > 0.\n";
173 return 0.;
174 }
175 // Number of Gaussian quadrature points.
176 constexpr size_t nG = 6;
177 constexpr std::array<double, nG> t = {
178 -0.932469514203152028, -0.661209386466264514, -0.238619186083196909,
179 0.238619186083196909, 0.661209386466264514, 0.932469514203152028};
180 constexpr std::array<double, nG> w = {
181 0.171324492379170345, 0.360761573048138608, 0.467913934572691047,
182 0.467913934572691047, 0.360761573048138608, 0.171324492379170345};
183
184 const double r2 = r * r;
185 // Width and half-width of theta intervals.
186 const double dt = Pi / nI;
187 const double ht = 0.5 * dt;
188 // Width and half-width of phi intervals.
189 const double dp = TwoPi / nI;
190 const double hp = 0.5 * dp;
191 // Arguments of ElectricField.
192 double ex = 0., ey = 0., ez = 0.;
193 Medium* m = nullptr;
194 int status = 0;
195 // Perform the integration.
196 double s2 = 0.;
197 // Loop over theta.
198 for (size_t i = 0; i < nG; ++i) {
199 const double theta0 = ht * (1. + t[i]) - HalfPi;
200 for (unsigned int k = 0; k < nI; ++k) {
201 const double theta = theta0 + k * dt;
202 const double ct = cos(theta);
203 const double st = sin(theta);
204 const double z = zc + st * r;
205 double s1 = 0.;
206 // Loop over phi.
207 for (size_t ii = 0; ii < nG; ++ii) {
208 const double phi0 = hp * (1. + t[ii]);
209 for (unsigned int kk = 0; kk < nI; ++kk) {
210 const double phi = phi0 + kk * dp;
211 const double cp = cos(phi);
212 const double sp = sin(phi);
213 const double x = xc + cp * ct * r;
214 const double y = yc + sp * ct * r;
215 ElectricField(x, y, z, ex, ey, ez, m, status);
216 s1 += w[ii] * ((ex * cp + ey * sp) * ct + ez * st);
217 }
218 }
219 s2 += w[i] * r2 * ct * hp * s1;
220 }
221 }
222 return ht * s2 * VacuumPermittivity;
223}

◆ IntegrateWeightingFluxParallelogram()

double Garfield::Component::IntegrateWeightingFluxParallelogram ( const std::string &  label,
const double  x0,
const double  y0,
const double  z0,
const double  dx1,
const double  dy1,
const double  dz1,
const double  dx2,
const double  dy2,
const double  dz2,
const unsigned int  nU = 20,
const unsigned int  nV = 20 
)

Integrate the normal component of the weighting field over a parallelogram.

Definition at line 234 of file Component.cc.

237 {
238
240 x0, y0, z0, dx1, dy1, dz1, dx2, dy2, dz2, nU, nV, true, id);
241}

◆ IsAxiallyPeriodic()

void Garfield::Component::IsAxiallyPeriodic ( bool &  perx,
bool &  pery,
bool &  perz 
)
inline

Return axial periodicity flags.

Definition at line 252 of file Component.hh.

252 {
253 perx = m_axiallyPeriodic[0];
254 pery = m_axiallyPeriodic[1];
255 perz = m_axiallyPeriodic[2];
256 }

◆ IsInTrapRadius()

bool Garfield::Component::IsInTrapRadius ( const double  q0,
const double  x0,
const double  y0,
const double  z0,
double &  xw,
double &  yw,
double &  rw 
)
virtual

Determine whether a particle is inside the trap radius of a wire.

Parameters
q0charge of the particle [in elementary charges].
x0,y0,z0position [cm] of the particle.
xw,ywcoordinates of the wire (if applicable).
rwradius of the wire (if applicable).

Reimplemented in Garfield::ComponentAnalyticField, and Garfield::ComponentNeBem2d.

Definition at line 118 of file Component.cc.

120 {
121 xw = x0;
122 yw = y0;
123 rw = 0.;
124 return false;
125}

◆ IsMirrorPeriodic()

void Garfield::Component::IsMirrorPeriodic ( bool &  perx,
bool &  pery,
bool &  perz 
)
inline

Return mirror periodicity flags.

Definition at line 230 of file Component.hh.

230 {
231 perx = m_mirrorPeriodic[0];
232 pery = m_mirrorPeriodic[1];
233 perz = m_mirrorPeriodic[2];
234 }

Referenced by neBEM::neBEMGetMirror(), and neBEM::neBEMGetPeriodicities().

◆ IsPeriodic()

void Garfield::Component::IsPeriodic ( bool &  perx,
bool &  pery,
bool &  perz 
)
inline

Return periodicity flags.

Definition at line 208 of file Component.hh.

208 {
209 perx = m_periodic[0];
210 pery = m_periodic[1];
211 perz = m_periodic[2];
212 }

Referenced by neBEM::neBEMGetPeriodicities().

◆ IsReady()

virtual bool Garfield::Component::IsReady ( )
inlinevirtual

Ready for use?

Definition at line 106 of file Component.hh.

106{ return m_ready; }

◆ IsRotationSymmetric()

void Garfield::Component::IsRotationSymmetric ( bool &  rotx,
bool &  roty,
bool &  rotz 
)
inline

Return rotation symmetry flags.

Definition at line 274 of file Component.hh.

274 {
275 rotx = m_rotationSymmetric[0];
276 roty = m_rotationSymmetric[1];
277 rotz = m_rotationSymmetric[2];
278 }

◆ IsWireCrossed()

bool Garfield::Component::IsWireCrossed ( const double  x0,
const double  y0,
const double  z0,
const double  x1,
const double  y1,
const double  z1,
double &  xc,
double &  yc,
double &  zc,
const bool  centre,
double &  rc 
)
virtual

Determine whether the line between two points crosses a wire.

Parameters
x0,y0,z0first point [cm].
x1,y1,z1second point [cm]
xc,yc,zcpoint [cm] where the line crosses the wire or the coordinates of the wire centre.
centreflag whether to return the coordinates of the line-wire crossing point or of the wire centre.
rcradius [cm] of the wire.

Reimplemented in Garfield::ComponentAnalyticField, and Garfield::ComponentNeBem2d.

Definition at line 110 of file Component.cc.

114 {
115 return false;
116}

◆ MagneticField()

void Garfield::Component::MagneticField ( const double  x,
const double  y,
const double  z,
double &  bx,
double &  by,
double &  bz,
int &  status 
)
virtual

Calculate the magnetic field at a given point.

Parameters
x,y,zcoordinates [cm].
bx,by,bzcomponents of the magnetic field [Tesla].
statusstatus flag.

Reimplemented in Garfield::ComponentGrid, Garfield::ComponentNeBem3dMap, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Definition at line 81 of file Component.cc.

82 {
83 bx = m_b0[0];
84 by = m_b0[1];
85 bz = m_b0[2];
86 if (m_debug) {
87 std::cout << m_className << "::MagneticField: Field at (" << x << ", " << y
88 << ", " << z << ") is (" << bx << ", " << by << ", " << bz
89 << ")\n";
90 }
91 status = 0;
92}

Referenced by Garfield::ComponentGrid::MagneticField(), Garfield::ComponentNeBem3dMap::MagneticField(), and Garfield::ComponentVoxel::MagneticField().

◆ Reset()

virtual void Garfield::Component::Reset ( )
protectedpure virtual

Reset the component.

Implemented in Garfield::ComponentFieldMap, and Garfield::ComponentNeBem3d.

◆ SetGeometry()

void Garfield::Component::SetGeometry ( Geometry geo)
virtual

Define the geometry.

Definition at line 13 of file Component.cc.

13 {
14 // Make sure the geometry is defined
15 if (!geo) {
16 std::cerr << m_className << "::SetGeometry: Null pointer.\n";
17 return;
18 }
19 m_geometry = geo;
20}

◆ SetMagneticField()

void Garfield::Component::SetMagneticField ( const double  bx,
const double  by,
const double  bz 
)

Set a constant magnetic field.

Definition at line 94 of file Component.cc.

95 {
96 m_b0 = {bx, by, bz};
97}

Referenced by main().

◆ UpdatePeriodicity()

◆ WeightingField()

void Garfield::Component::WeightingField ( const double  x,
const double  y,
const double  z,
double &  wx,
double &  wy,
double &  wz,
const std::string &  label 
)
virtual

Calculate the weighting field at a given point and for a given electrode.

Parameters
x,y,zcoordinates [cm].
wx,wy,wzcomponents of the weighting field [1/cm].
labelname of the electrode

Reimplemented in Garfield::ComponentAnalyticField, Garfield::ComponentAnsys121, Garfield::ComponentAnsys123, Garfield::ComponentComsol, Garfield::ComponentConstant, Garfield::ComponentCST, Garfield::ComponentElmer, Garfield::ComponentElmer2D, Garfield::ComponentGrid, Garfield::ComponentNeBem3d, Garfield::ComponentNeBem3dMap, Garfield::ComponentParallelPlate, Garfield::ComponentTcadBase< N >, Garfield::ComponentTcadBase< 2 >, Garfield::ComponentTcadBase< 3 >, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Definition at line 40 of file Component.cc.

42 {
43 if (m_debug) {
44 std::cerr << m_className << "::WeightingField: Function not implemented.\n";
45 }
46 wx = wy = wz = 0.;
47}

Referenced by Garfield::ComponentGrid::SaveWeightingField().

◆ WeightingPotential()

double Garfield::Component::WeightingPotential ( const double  x,
const double  y,
const double  z,
const std::string &  label 
)
virtual

Calculate the weighting potential at a given point.

Parameters
x,y,zcoordinates [cm].
labelname of the electrode.
Returns
weighting potential [dimensionless].

Reimplemented in Garfield::ComponentAnalyticField, Garfield::ComponentAnsys121, Garfield::ComponentAnsys123, Garfield::ComponentComsol, Garfield::ComponentConstant, Garfield::ComponentCST, Garfield::ComponentElmer, Garfield::ComponentElmer2D, Garfield::ComponentGrid, Garfield::ComponentNeBem3d, Garfield::ComponentNeBem3dMap, Garfield::ComponentParallelPlate, Garfield::ComponentTcadBase< N >, Garfield::ComponentTcadBase< 2 >, Garfield::ComponentTcadBase< 3 >, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Definition at line 59 of file Component.cc.

61 {
62 if (m_debug) {
63 std::cerr << m_className << "::WeightingPotential: Not implemented.\n";
64 }
65 return 0.;
66}

Referenced by Garfield::ComponentGrid::SaveWeightingField().

Member Data Documentation

◆ m_axiallyPeriodic

◆ m_b0

std::array<double, 3> Garfield::Component::m_b0 = {{0., 0., 0.}}
protected

Constant magnetic field.

Definition at line 335 of file Component.hh.

Referenced by MagneticField(), and SetMagneticField().

◆ m_className

std::string Garfield::Component::m_className = "Component"
protected

Class name.

Definition at line 329 of file Component.hh.

Referenced by Garfield::ComponentNeBem2d::AddChargeDistribution(), Garfield::ComponentParallelPlate::AddPixel(), Garfield::ComponentAnalyticField::AddPixelOnPlanePhi(), Garfield::ComponentAnalyticField::AddPixelOnPlaneR(), Garfield::ComponentAnalyticField::AddPixelOnPlaneX(), Garfield::ComponentAnalyticField::AddPixelOnPlaneY(), Garfield::ComponentParallelPlate::AddPlane(), Garfield::ComponentAnalyticField::AddPlanePhi(), Garfield::ComponentAnalyticField::AddPlaneR(), Garfield::ComponentNeBem3d::AddPlaneX(), Garfield::ComponentAnalyticField::AddPlaneX(), Garfield::ComponentNeBem3d::AddPlaneY(), Garfield::ComponentAnalyticField::AddPlaneY(), Garfield::ComponentNeBem3d::AddPlaneZ(), Garfield::ComponentAnalyticField::AddReadout(), Garfield::ComponentNeBem2d::AddRegion(), Garfield::ComponentNeBem2d::AddSegment(), Garfield::ComponentParallelPlate::AddStrip(), Garfield::ComponentAnalyticField::AddStripOnPlanePhi(), Garfield::ComponentAnalyticField::AddStripOnPlaneR(), Garfield::ComponentAnalyticField::AddStripOnPlaneX(), Garfield::ComponentAnalyticField::AddStripOnPlaneY(), Garfield::ComponentAnalyticField::AddTube(), Garfield::ComponentNeBem2d::AddWire(), Garfield::ComponentAnalyticField::AddWire(), Component(), Garfield::ComponentCST::Coordinate2Index(), DelayedWeightingField(), Garfield::ComponentParallelPlate::DelayedWeightingField(), DelayedWeightingPotential(), Garfield::ComponentParallelPlate::DelayedWeightingPotential(), Garfield::ComponentFieldMap::DriftMedium(), Garfield::ComponentAnsys121::ElectricField(), Garfield::ComponentAnsys123::ElectricField(), Garfield::ComponentComsol::ElectricField(), Garfield::ComponentConstant::ElectricField(), Garfield::ComponentElmer::ElectricField(), Garfield::ComponentElmer2D::ElectricField(), Garfield::ComponentGrid::ElectricField(), Garfield::ComponentNeBem3d::ElectricField(), Garfield::ComponentNeBem3dMap::ElectricField(), Garfield::ComponentTcad2d::ElectricField(), Garfield::ComponentTcad3d::ElectricField(), Garfield::ComponentVoxel::ElectricField(), Garfield::ComponentParallelPlate::ElectricField(), Garfield::ComponentUser::ElectricField(), Garfield::ComponentAnalyticField::ElectricFieldAtWire(), Garfield::ComponentGrid::ElectronAttachment(), Garfield::ComponentGrid::ElectronVelocity(), Garfield::ComponentFieldMap::FindElement13(), Garfield::ComponentFieldMap::FindElement5(), Garfield::ComponentFieldMap::FindElementCube(), Garfield::ComponentAnalyticField::ForcesOnWire(), Garfield::ComponentFieldMap::GetConductivity(), Garfield::ComponentGrid::GetElectricField(), Garfield::ComponentGrid::GetElectricFieldRange(), Garfield::ComponentNeBem3dMap::GetElectricFieldRange(), Garfield::ComponentVoxel::GetElectricFieldRange(), Garfield::ComponentNeBem3dMap::GetElement(), Garfield::ComponentVoxel::GetElement(), Garfield::ComponentFieldMap::GetElement(), Garfield::ComponentTcad2d::GetElement(), Garfield::ComponentTcad3d::GetElement(), Garfield::ComponentCST::GetElement(), Garfield::ComponentNeBem3d::GetElement(), Garfield::ComponentAnsys121::GetMedium(), Garfield::ComponentAnsys123::GetMedium(), Garfield::ComponentComsol::GetMedium(), Garfield::ComponentCST::GetMedium(), Garfield::ComponentElmer::GetMedium(), Garfield::ComponentElmer2D::GetMedium(), Garfield::ComponentGrid::GetMedium(), Garfield::ComponentNeBem3dMap::GetMedium(), Garfield::ComponentTcad2d::GetMedium(), Garfield::ComponentTcad3d::GetMedium(), Garfield::ComponentVoxel::GetMedium(), Garfield::ComponentFieldMap::GetMedium(), Garfield::ComponentTcad2d::GetNode(), Garfield::ComponentFieldMap::GetNode(), Garfield::ComponentCST::GetNode(), Garfield::ComponentTcad3d::GetNode(), Garfield::ComponentFieldMap::GetPermittivity(), Garfield::ComponentAnalyticField::GetPlanePhi(), Garfield::ComponentAnalyticField::GetPlaneR(), Garfield::ComponentNeBem3d::GetPlaneX(), Garfield::ComponentAnalyticField::GetPlaneX(), Garfield::ComponentNeBem3d::GetPlaneY(), Garfield::ComponentAnalyticField::GetPlaneY(), Garfield::ComponentNeBem3d::GetPlaneZ(), Garfield::ComponentNeBem3d::GetPrimitive(), Garfield::ComponentAnalyticField::GetVoltageRange(), Garfield::ComponentConstant::GetVoltageRange(), Garfield::ComponentNeBem3d::GetVolume(), Garfield::ComponentAnalyticField::GetWire(), Garfield::ComponentGrid::HoleAttachment(), Garfield::ComponentGrid::HoleVelocity(), Garfield::ComponentNeBem2d::Initialise(), Garfield::ComponentNeBem3d::Initialise(), Garfield::ComponentElmer::Initialise(), Garfield::ComponentElmer2D::Initialise(), Garfield::ComponentComsol::Initialise(), Garfield::ComponentCST::Initialise(), Garfield::ComponentAnsys121::Initialise(), Garfield::ComponentAnsys123::Initialise(), IntegrateFluxCircle(), IntegrateFluxLine(), IntegrateFluxSphere(), Garfield::ComponentAnalyticField::IsInTrapRadius(), Garfield::ComponentAnalyticField::IsWireCrossed(), Garfield::ComponentNeBem3dMap::LoadElectricField(), Garfield::ComponentVoxel::LoadElectricField(), Garfield::ComponentNeBem3dMap::LoadMagneticField(), Garfield::ComponentVoxel::LoadMagneticField(), Garfield::ComponentNeBem3dMap::LoadMapInfo(), Garfield::ComponentVoxel::LoadWeightingField(), MagneticField(), Garfield::ComponentAnalyticField::MultipoleMoments(), Garfield::ComponentFieldMap::NotDriftMedium(), Garfield::ComponentFieldMap::Prepare(), Garfield::ComponentGrid::Print(), Garfield::ComponentAnalyticField::PrintCell(), Garfield::ComponentAnalyticField::PrintCharges(), Garfield::ComponentFieldMap::PrintCouldNotOpen(), Garfield::ComponentFieldMap::PrintElement(), Garfield::ComponentFieldMap::PrintMaterials(), Garfield::ComponentFieldMap::PrintNotReady(), Garfield::ComponentFieldMap::PrintRange(), Garfield::ComponentNeBem3dMap::PrintRegions(), Garfield::ComponentVoxel::PrintRegions(), Garfield::ComponentFieldMap::PrintWarning(), Garfield::ComponentGrid::SaveElectricField(), Garfield::ComponentGrid::SaveWeightingField(), Garfield::ComponentAnalyticField::SetCartesianCoordinates(), Garfield::ComponentFieldMap::SetDefaultDriftMedium(), Garfield::ComponentUser::SetDelayedWeightingField(), Garfield::ComponentComsol::SetDelayedWeightingPotential(), Garfield::ComponentConstant::SetElectricField(), Garfield::ComponentUser::SetElectricField(), SetGeometry(), Garfield::ComponentAnalyticField::SetGravity(), Garfield::ComponentUser::SetMagneticField(), Garfield::ComponentNeBem2d::SetMaxNumberOfIterations(), Garfield::ComponentNeBem3dMap::SetMedium(), Garfield::ComponentVoxel::SetMedium(), Garfield::ComponentFieldMap::SetMedium(), Garfield::ComponentGrid::SetMedium(), Garfield::ComponentGrid::SetMesh(), Garfield::ComponentNeBem3dMap::SetMesh(), Garfield::ComponentVoxel::SetMesh(), Garfield::ComponentNeBem3d::SetMinMaxNumberOfElements(), Garfield::ComponentNeBem3d::SetMirrorPeriodicityX(), Garfield::ComponentNeBem3d::SetMirrorPeriodicityY(), Garfield::ComponentNeBem3d::SetMirrorPeriodicityZ(), Garfield::ComponentNeBem2d::SetNumberOfCollocationPoints(), Garfield::ComponentNeBem2d::SetNumberOfDivisions(), Garfield::ComponentAnalyticField::SetNumberOfSteps(), Garfield::ComponentAnalyticField::SetPeriodicityPhi(), Garfield::ComponentAnalyticField::SetPeriodicityX(), Garfield::ComponentNeBem3d::SetPeriodicityX(), Garfield::ComponentAnalyticField::SetPeriodicityY(), Garfield::ComponentNeBem3d::SetPeriodicityY(), Garfield::ComponentNeBem3d::SetPeriodicityZ(), Garfield::ComponentAnalyticField::SetPolarCoordinates(), Garfield::ComponentUser::SetPotential(), Garfield::ComponentFieldMap::SetRange(), Garfield::ComponentAnsys121::SetRangeZ(), Garfield::ComponentCST::SetRangeZ(), Garfield::ComponentElmer2D::SetRangeZ(), Garfield::ComponentNeBem2d::SetRangeZ(), Garfield::ComponentTcad2d::SetRangeZ(), Garfield::ComponentAnalyticField::SetScanningArea(), Garfield::ComponentAnalyticField::SetScanningAreaFirstOrder(), Garfield::ComponentAnalyticField::SetScanningGrid(), Garfield::ComponentNeBem3d::SetTargetElementSize(), Garfield::ComponentComsol::SetTimeInterval(), Garfield::ComponentParallelPlate::Setup(), Garfield::ComponentComsol::SetWeightingField(), Garfield::ComponentUser::SetWeightingField(), Garfield::ComponentAnsys121::SetWeightingField(), Garfield::ComponentAnsys123::SetWeightingField(), Garfield::ComponentElmer::SetWeightingField(), Garfield::ComponentElmer2D::SetWeightingField(), Garfield::ComponentCST::SetWeightingField(), Garfield::ComponentConstant::SetWeightingPotential(), Garfield::ComponentUser::SetWeightingPotential(), Garfield::ComponentCST::ShiftComponent(), Garfield::ComponentNeBem3d::UpdatePeriodicity(), Garfield::ComponentFieldMap::UpdatePeriodicity2d(), Garfield::ComponentFieldMap::UpdatePeriodicityCommon(), WeightingField(), Garfield::ComponentConstant::WeightingField(), Garfield::ComponentNeBem3d::WeightingField(), WeightingPotential(), Garfield::ComponentCST::WeightingPotential(), and Garfield::ComponentAnalyticField::WireDisplacement().

◆ m_debug

bool Garfield::Component::m_debug = false
protected

Switch on/off debugging messages.

Definition at line 341 of file Component.hh.

Referenced by Garfield::ComponentNeBem2d::AddRegion(), Garfield::ComponentNeBem2d::AddSegment(), Garfield::ComponentNeBem2d::AddWire(), Garfield::ComponentCST::Coordinate2Index(), DelayedWeightingField(), Garfield::ComponentParallelPlate::DelayedWeightingField(), DelayedWeightingPotential(), Garfield::ComponentComsol::DelayedWeightingPotential(), Garfield::ComponentParallelPlate::DelayedWeightingPotential(), DisableDebugging(), Garfield::ComponentAnsys121::ElectricField(), Garfield::ComponentAnsys123::ElectricField(), Garfield::ComponentComsol::ElectricField(), Garfield::ComponentConstant::ElectricField(), Garfield::ComponentElmer::ElectricField(), Garfield::ComponentElmer2D::ElectricField(), Garfield::ComponentNeBem3dMap::ElectricField(), Garfield::ComponentParallelPlate::ElectricField(), Garfield::ComponentUser::ElectricField(), EnableDebugging(), Garfield::ComponentFieldMap::FindElement13(), Garfield::ComponentFieldMap::FindElement5(), Garfield::ComponentFieldMap::FindElementCube(), Garfield::ComponentAnalyticField::ForcesOnWire(), Garfield::ComponentNeBem3dMap::GetElement(), Garfield::ComponentAnsys121::GetMedium(), Garfield::ComponentAnsys123::GetMedium(), Garfield::ComponentComsol::GetMedium(), Garfield::ComponentCST::GetMedium(), Garfield::ComponentElmer::GetMedium(), Garfield::ComponentElmer2D::GetMedium(), Garfield::ComponentNeBem2d::Initialise(), Garfield::ComponentNeBem3d::Initialise(), Garfield::ComponentElmer::Initialise(), Garfield::ComponentElmer2D::Initialise(), Garfield::ComponentCST::Initialise(), Garfield::ComponentAnsys121::Initialise(), Garfield::ComponentAnsys123::Initialise(), Garfield::ComponentAnalyticField::IsInTrapRadius(), MagneticField(), Garfield::ComponentAnalyticField::MultipoleMoments(), Garfield::ComponentFieldMap::SetMedium(), Garfield::ComponentFieldMap::SetRange(), Garfield::ComponentCST::SetWeightingField(), Garfield::ComponentFieldMap::UpdatePeriodicityCommon(), WeightingField(), Garfield::ComponentAnsys121::WeightingField(), Garfield::ComponentAnsys123::WeightingField(), Garfield::ComponentComsol::WeightingField(), Garfield::ComponentConstant::WeightingField(), Garfield::ComponentElmer::WeightingField(), Garfield::ComponentElmer2D::WeightingField(), WeightingPotential(), Garfield::ComponentAnsys121::WeightingPotential(), Garfield::ComponentAnsys123::WeightingPotential(), Garfield::ComponentComsol::WeightingPotential(), Garfield::ComponentCST::WeightingPotential(), Garfield::ComponentElmer::WeightingPotential(), and Garfield::ComponentElmer2D::WeightingPotential().

◆ m_geometry

◆ m_mirrorPeriodic

◆ m_periodic

std::array<bool, 3> Garfield::Component::m_periodic = {{false, false, false}}
protected

Simple periodicity in x, y, z.

Definition at line 344 of file Component.hh.

Referenced by EnablePeriodicityX(), EnablePeriodicityY(), EnablePeriodicityZ(), Garfield::ComponentGrid::GetBoundingBox(), Garfield::ComponentNeBem3dMap::GetBoundingBox(), Garfield::ComponentTcad2d::GetBoundingBox(), Garfield::ComponentTcad3d::GetBoundingBox(), Garfield::ComponentVoxel::GetBoundingBox(), Garfield::ComponentNeBem3dMap::GetElement(), Garfield::ComponentVoxel::GetElement(), Garfield::ComponentGrid::GetMedium(), Garfield::ComponentAnalyticField::GetPeriodicityPhi(), Garfield::ComponentAnalyticField::GetPeriodicityX(), Garfield::ComponentNeBem3d::GetPeriodicityX(), Garfield::ComponentAnalyticField::GetPeriodicityY(), Garfield::ComponentNeBem3d::GetPeriodicityY(), Garfield::ComponentNeBem3d::GetPeriodicityZ(), IsPeriodic(), Garfield::ComponentFieldMap::MapCoordinates(), Garfield::ComponentFieldMap::PrintRange(), Garfield::ComponentNeBem3d::SetMirrorPeriodicityX(), Garfield::ComponentNeBem3d::SetMirrorPeriodicityY(), Garfield::ComponentNeBem3d::SetMirrorPeriodicityZ(), Garfield::ComponentAnalyticField::SetPeriodicityPhi(), Garfield::ComponentAnalyticField::SetPeriodicityX(), Garfield::ComponentNeBem3d::SetPeriodicityX(), Garfield::ComponentAnalyticField::SetPeriodicityY(), Garfield::ComponentNeBem3d::SetPeriodicityY(), Garfield::ComponentNeBem3d::SetPeriodicityZ(), Garfield::ComponentNeBem3d::UpdatePeriodicity(), Garfield::ComponentFieldMap::UpdatePeriodicity2d(), and Garfield::ComponentFieldMap::UpdatePeriodicityCommon().

◆ m_ready

bool Garfield::Component::m_ready = false
protected

Ready for use?

Definition at line 338 of file Component.hh.

Referenced by Garfield::ComponentNeBem3d::AddPlaneX(), Garfield::ComponentNeBem3d::AddPlaneY(), Garfield::ComponentNeBem3d::AddPlaneZ(), Garfield::ComponentNeBem2d::AddSegment(), Garfield::ComponentNeBem2d::AddWire(), Garfield::ComponentComsol::DelayedWeightingPotential(), Garfield::ComponentFieldMap::DriftMedium(), Garfield::ComponentAnsys121::ElectricField(), Garfield::ComponentAnsys123::ElectricField(), Garfield::ComponentComsol::ElectricField(), Garfield::ComponentElmer::ElectricField(), Garfield::ComponentElmer2D::ElectricField(), Garfield::ComponentGrid::ElectricField(), Garfield::ComponentNeBem3d::ElectricField(), Garfield::ComponentNeBem3dMap::ElectricField(), Garfield::ComponentTcad2d::ElectricField(), Garfield::ComponentTcad3d::ElectricField(), Garfield::ComponentVoxel::ElectricField(), Garfield::ComponentFieldMap::GetBoundingBox(), Garfield::ComponentGrid::GetBoundingBox(), Garfield::ComponentNeBem3dMap::GetBoundingBox(), Garfield::ComponentTcad2d::GetBoundingBox(), Garfield::ComponentTcad3d::GetBoundingBox(), Garfield::ComponentVoxel::GetBoundingBox(), Garfield::ComponentGrid::GetElectricField(), Garfield::ComponentGrid::GetElectricFieldRange(), Garfield::ComponentNeBem3dMap::GetElectricFieldRange(), Garfield::ComponentVoxel::GetElectricFieldRange(), Garfield::ComponentNeBem3dMap::GetElement(), Garfield::ComponentVoxel::GetElement(), Garfield::ComponentFieldMap::GetElementaryCell(), Garfield::ComponentGrid::GetElementaryCell(), Garfield::ComponentTcad2d::GetElementaryCell(), Garfield::ComponentTcad3d::GetElementaryCell(), Garfield::ComponentVoxel::GetElementaryCell(), Garfield::ComponentAnsys121::GetMedium(), Garfield::ComponentAnsys123::GetMedium(), Garfield::ComponentComsol::GetMedium(), Garfield::ComponentElmer::GetMedium(), Garfield::ComponentElmer2D::GetMedium(), Garfield::ComponentGrid::GetMedium(), Garfield::ComponentNeBem3dMap::GetMedium(), Garfield::ComponentTcad2d::GetMedium(), Garfield::ComponentTcad3d::GetMedium(), Garfield::ComponentVoxel::GetMedium(), Garfield::ComponentNeBem2d::GetRegion(), Garfield::ComponentGrid::GetVoltageRange(), Garfield::ComponentNeBem3dMap::GetVoltageRange(), Garfield::ComponentVoxel::GetVoltageRange(), Garfield::ComponentNeBem2d::Initialise(), Garfield::ComponentNeBem3d::Initialise(), Garfield::ComponentElmer::Initialise(), Garfield::ComponentElmer2D::Initialise(), Garfield::ComponentComsol::Initialise(), Garfield::ComponentCST::Initialise(), Garfield::ComponentAnsys121::Initialise(), Garfield::ComponentAnsys123::Initialise(), IsReady(), Garfield::ComponentGrid::LoadElectricField(), Garfield::ComponentNeBem3dMap::LoadElectricField(), Garfield::ComponentVoxel::LoadElectricField(), Garfield::ComponentFieldMap::NotDriftMedium(), Garfield::ComponentFieldMap::PrintMaterials(), Garfield::ComponentNeBem3dMap::PrintRegions(), Garfield::ComponentVoxel::PrintRegions(), Garfield::ComponentFieldMap::Reset(), Garfield::ComponentNeBem3d::Reset(), Garfield::ComponentComsol::SetDelayedWeightingPotential(), Garfield::ComponentConstant::SetElectricField(), Garfield::ComponentUser::SetElectricField(), Garfield::ComponentNeBem2d::SetNumberOfCollocationPoints(), Garfield::ComponentNeBem2d::SetNumberOfDivisions(), Garfield::ComponentFieldMap::SetRange(), Garfield::ComponentComsol::SetWeightingField(), Garfield::ComponentAnsys121::SetWeightingField(), Garfield::ComponentAnsys123::SetWeightingField(), Garfield::ComponentElmer::SetWeightingField(), Garfield::ComponentElmer2D::SetWeightingField(), Garfield::ComponentCST::SetWeightingField(), Garfield::ComponentFieldMap::UpdatePeriodicity2d(), Garfield::ComponentFieldMap::UpdatePeriodicityCommon(), Garfield::ComponentAnsys121::WeightingField(), Garfield::ComponentAnsys123::WeightingField(), Garfield::ComponentComsol::WeightingField(), Garfield::ComponentCST::WeightingField(), Garfield::ComponentElmer::WeightingField(), Garfield::ComponentElmer2D::WeightingField(), Garfield::ComponentAnsys121::WeightingPotential(), Garfield::ComponentAnsys123::WeightingPotential(), Garfield::ComponentComsol::WeightingPotential(), Garfield::ComponentCST::WeightingPotential(), Garfield::ComponentElmer::WeightingPotential(), and Garfield::ComponentElmer2D::WeightingPotential().

◆ m_rotationSymmetric


The documentation for this class was generated from the following files: