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

Base class for components based on finite-element field maps. More...

#include <ComponentFieldMap.hh>

+ Inheritance diagram for Garfield::ComponentFieldMap:

Classes

struct  Element
 
struct  Material
 
struct  Node
 

Public Member Functions

 ComponentFieldMap ()
 Constructor.
 
virtual ~ComponentFieldMap ()
 Destructor.
 
virtual void SetRange ()
 Calculate x, y, z, V and angular ranges.
 
void PrintRange ()
 Show x, y, z, V and angular ranges.
 
virtual bool IsInBoundingBox (const double x, const double y, const double z) const
 
virtual bool GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
 Get the bounding box coordinates.
 
virtual bool GetVoltageRange (double &vmin, double &vmax)
 Calculate the voltage range [V].
 
void PrintMaterials ()
 List all currently defined materials.
 
void DriftMedium (const unsigned int imat)
 Flag a field map material as a drift medium.
 
void NotDriftMedium (const unsigned int imat)
 Flag a field map materials as a non-drift medium.
 
unsigned int GetNumberOfMaterials () const
 Return the number of materials in the field map.
 
double GetPermittivity (const unsigned int imat) const
 Return the permittivity of a field map material.
 
double GetConductivity (const unsigned int imat) const
 Return the conductivity of a field map material.
 
void SetMedium (const unsigned int imat, Medium *medium)
 Associate a field map material with a Medium class.
 
MediumGetMedium (const unsigned int i) const
 Return the Medium associated to a field map material.
 
MediumGetMedium (const double x, const double y, const double z)=0
 Get the medium at a given location (x, y, z).
 
unsigned int GetNumberOfMedia () const
 
int GetNumberOfElements () const
 Return the number of mesh elements.
 
bool GetElement (const unsigned int i, double &vol, double &dmin, double &dmax)
 Return the volume and aspect ratio of a mesh element.
 
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
 
virtual void WeightingField (const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)=0
 
virtual double WeightingPotential (const double x, const double y, const double z, const std::string &label)=0
 
void EnableCheckMapIndices ()
 
void DisableCheckMapIndices ()
 
void EnableDeleteBackgroundElements ()
 
void DisableDeleteBackgroundElements ()
 
void EnableTetrahedralTreeForElementSearch (const bool on=true)
 
- Public Member Functions inherited from Garfield::ComponentBase
 ComponentBase ()
 Constructor.
 
virtual ~ComponentBase ()
 Destructor.
 
virtual void SetGeometry (GeometryBase *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
 
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 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 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)
 
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 DisablePeriodicityX ()
 
void EnablePeriodicityY (const bool on=true)
 Enable simple periodicity in the $y$ direction.
 
void DisablePeriodicityY ()
 
void EnablePeriodicityZ (const bool on=true)
 Enable simple periodicity in the $z$ direction.
 
void DisablePeriodicityZ ()
 
void EnableMirrorPeriodicityX (const bool on=true)
 Enable mirror periodicity in the $x$ direction.
 
void DisableMirrorPeriodicityX ()
 
void EnableMirrorPeriodicityY (const bool on=true)
 Enable mirror periodicity in the $y$ direction.
 
void DisableMirrorPeriodicityY ()
 
void EnableMirrorPeriodicityZ (const bool on=true)
 Enable mirror periodicity in the $y$ direction.
 
void DisableMirrorPeriodicityZ ()
 
void EnableAxialPeriodicityX (const bool on=true)
 Enable axial periodicity in the $x$ direction.
 
void DisableAxialPeriodicityX ()
 
void EnableAxialPeriodicityY (const bool on=true)
 Enable axial periodicity in the $y$ direction.
 
void DisableAxialPeriodicityY ()
 
void EnableAxialPeriodicityZ (const bool on=true)
 Enable axial periodicity in the $z$ direction.
 
void DisableAxialPeriodicityZ ()
 
void EnableRotationSymmetryX (const bool on=true)
 Enable rotation symmetry around the $x$ axis.
 
void DisableRotationSymmetryX ()
 
void EnableRotationSymmetryY (const bool on=true)
 Enable rotation symmetry around the $y$ axis.
 
void DisableRotationSymmetryY ()
 
void EnableRotationSymmetryZ (const bool on=true)
 Enable rotation symmetry around the $z$ axis.
 
void DisableRotationSymmetryZ ()
 
void EnableDebugging ()
 Switch on debugging messages.
 
void DisableDebugging ()
 Switch off debugging messages.
 
void ActivateTraps ()
 Request trapping to be taken care of by the component (for TCAD).
 
void DeactivateTraps ()
 
bool IsTrapActive ()
 
void ActivateVelocityMap ()
 Request velocity to be taken care of by the component (for TCAD).
 
void DectivateVelocityMap ()
 
bool IsVelocityActive ()
 
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 void ElectronVelocity (const double, const double, const double, double &vx, double &vy, double &vz, Medium *&, int &status)
 Get the electron drift velocity.
 
virtual void HoleVelocity (const double, const double, const double, double &vx, double &vy, double &vz, Medium *&, int &status)
 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

void Reset ()
 Geometry checks.
 
virtual void UpdatePeriodicity ()=0
 Verify periodicities.
 
void UpdatePeriodicity2d ()
 
void UpdatePeriodicityCommon ()
 
int FindElement5 (const double x, const double y, const double z, double &t1, double &t2, double &t3, double &t4, double jac[4][4], double &det)
 Find the element for a point in curved quadratic quadrilaterals.
 
int FindElement13 (const double x, const double y, const double z, double &t1, double &t2, double &t3, double &t4, double jac[4][4], double &det)
 Find the element for a point in curved quadratic tetrahedra.
 
int FindElementCube (const double x, const double y, const double z, double &t1, double &t2, double &t3, TMatrixD *&jac, std::vector< TMatrixD * > &dN)
 Find the element for a point in a cube.
 
void MapCoordinates (double &xpos, double &ypos, double &zpos, bool &xmirrored, bool &ymirrored, bool &zmirrored, double &rcoordinate, double &rotation) const
 Move (xpos, ypos, zpos) to field map coordinates.
 
void UnmapFields (double &ex, double &ey, double &ez, double &xpos, double &ypos, double &zpos, bool &xmirrored, bool &ymirrored, bool &zmirrored, double &rcoordinate, double &rotation) const
 Move (ex, ey, ez) to global coordinates.
 
int ReadInteger (char *token, int def, bool &error)
 
double ReadDouble (char *token, double def, bool &error)
 
virtual double GetElementVolume (const unsigned int i)=0
 
virtual void GetAspectRatio (const unsigned int i, double &dmin, double &dmax)=0
 
void PrintWarning (const std::string &header)
 
void PrintNotReady (const std::string &header) const
 
void PrintElement (const std::string &header, const double x, const double y, const double z, const double t1, const double t2, const double t3, const double t4, const unsigned int i, const unsigned int n, const int iw=-1) const
 
virtual void Reset ()=0
 Geometry checks.
 
virtual void UpdatePeriodicity ()=0
 Verify periodicities.
 

Protected Attributes

bool m_is3d
 
int nElements
 
std::vector< Elementelements
 
int nNodes
 
std::vector< Nodenodes
 
unsigned int m_nMaterials
 
std::vector< Materialmaterials
 
int nWeightingFields
 
std::vector< std::string > wfields
 
std::vector< bool > wfieldsOk
 
bool hasBoundingBox
 
double xMinBoundingBox
 
double yMinBoundingBox
 
double zMinBoundingBox
 
double xMaxBoundingBox
 
double yMaxBoundingBox
 
double zMaxBoundingBox
 
double mapxmin
 
double mapymin
 
double mapzmin
 
double mapxmax
 
double mapymax
 
double mapzmax
 
double mapxamin
 
double mapyamin
 
double mapzamin
 
double mapxamax
 
double mapyamax
 
double mapzamax
 
double mapvmin
 
double mapvmax
 
bool setangx
 
bool setangy
 
bool setangz
 
double mapsx
 
double mapsy
 
double mapsz
 
double cellsx
 
double cellsy
 
double cellsz
 
double mapnxa
 
double mapnya
 
double mapnza
 
bool m_deleteBackground
 
bool m_warning
 
unsigned int m_nWarnings
 
- Protected Attributes inherited from Garfield::ComponentBase
std::string m_className
 Class name.
 
GeometryBasem_geometry
 Pointer to the geometry.
 
bool m_ready
 Ready for use?
 
bool m_activeTraps
 Does the component have traps?
 
bool m_hasVelocityMap
 Does the component have velocity maps?
 
bool m_xPeriodic
 Simple periodicity in x.
 
bool m_yPeriodic
 Simple periodicity in y.
 
bool m_zPeriodic
 Simple periodicity in z.
 
bool m_xMirrorPeriodic
 Mirror periodicity in x.
 
bool m_yMirrorPeriodic
 Mirror periodicity in y.
 
bool m_zMirrorPeriodic
 Mirror periodicity in z.
 
bool m_xAxiallyPeriodic
 Axial periodicity in x.
 
bool m_yAxiallyPeriodic
 Axial periodicity in y.
 
bool m_zAxiallyPeriodic
 Axial periodicity in z.
 
bool m_xRotationSymmetry
 Rotation symmetry around x-axis.
 
bool m_yRotationSymmetry
 Rotation symmetry around y-axis.
 
bool m_zRotationSymmetry
 Rotation symmetry around z-axis.
 
double m_bx0
 
double m_by0
 
double m_bz0
 
bool m_debug
 Switch on/off debugging messages.
 

Friends

class ViewFEMesh
 

Detailed Description

Base class for components based on finite-element field maps.

Definition at line 13 of file ComponentFieldMap.hh.

Constructor & Destructor Documentation

◆ ComponentFieldMap()

Garfield::ComponentFieldMap::ComponentFieldMap ( )

Constructor.

Definition at line 13 of file ComponentFieldMap.cc.

13 : ComponentBase(),
14 m_is3d(true),
15 nElements(-1),
16 nNodes(-1),
17 m_nMaterials(0),
19 hasBoundingBox(false),
21 m_warning(false), m_nWarnings(0),
22 m_checkMultipleElement(false),
23 m_useTetrahedralTree(false),
24 m_isTreeInitialized(false),
25 m_tetTree(NULL),
26 m_cacheElemBoundingBoxes(false),
27 m_lastElement(-1) {
28
29 m_className = "ComponentFieldMap";
30}
ComponentBase()
Constructor.
Definition: ComponentBase.cc:6
std::string m_className
Class name.

◆ ~ComponentFieldMap()

Garfield::ComponentFieldMap::~ComponentFieldMap ( )
virtual

Destructor.

Definition at line 32 of file ComponentFieldMap.cc.

32 {
33 if (m_tetTree) delete m_tetTree;
34}

Member Function Documentation

◆ DisableCheckMapIndices()

void Garfield::ComponentFieldMap::DisableCheckMapIndices ( )
inline

Definition at line 82 of file ComponentFieldMap.hh.

82{ m_checkMultipleElement = false; }

◆ DisableDeleteBackgroundElements()

void Garfield::ComponentFieldMap::DisableDeleteBackgroundElements ( )
inline

Definition at line 84 of file ComponentFieldMap.hh.

84{ m_deleteBackground = false; }

◆ DriftMedium()

void Garfield::ComponentFieldMap::DriftMedium ( const unsigned int  imat)

Flag a field map material as a drift medium.

Definition at line 66 of file ComponentFieldMap.cc.

66 {
67
68 // Do not proceed if not properly initialised.
69 if (!m_ready) PrintNotReady("DriftMedium");
70
71 // Check value
72 if (imat >= m_nMaterials) {
73 std::cerr << m_className << "::DriftMedium:\n";
74 std::cerr << " Material index " << imat << " is out of range.\n";
75 return;
76 }
77
78 // Make drift medium
79 materials[imat].driftmedium = true;
80}
bool m_ready
Ready for use?
std::vector< Material > materials
void PrintNotReady(const std::string &header) const

◆ ElectricField() [1/2]

virtual void Garfield::ComponentFieldMap::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::ComponentFieldMap::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)

Implements Garfield::ComponentBase.

Implemented in Garfield::ComponentAnsys121, Garfield::ComponentAnsys123, Garfield::ComponentComsol, Garfield::ComponentCST, and Garfield::ComponentElmer.

◆ EnableCheckMapIndices()

void Garfield::ComponentFieldMap::EnableCheckMapIndices ( )
inline

Definition at line 78 of file ComponentFieldMap.hh.

78 {
79 m_checkMultipleElement = true;
80 m_lastElement = -1;
81 }

◆ EnableDeleteBackgroundElements()

void Garfield::ComponentFieldMap::EnableDeleteBackgroundElements ( )
inline

Definition at line 83 of file ComponentFieldMap.hh.

83{ m_deleteBackground = true; }

◆ EnableTetrahedralTreeForElementSearch()

void Garfield::ComponentFieldMap::EnableTetrahedralTreeForElementSearch ( const bool  on = true)
inline

Enable or disable the usage of the tetrahedral tree for searching the element in the mesh.

Definition at line 88 of file ComponentFieldMap.hh.

88 {
89 m_useTetrahedralTree = on;
90 }

◆ FindElement13()

int Garfield::ComponentFieldMap::FindElement13 ( const double  x,
const double  y,
const double  z,
double &  t1,
double &  t2,
double &  t3,
double &  t4,
double  jac[4][4],
double &  det 
)
protected

Find the element for a point in curved quadratic tetrahedra.

Definition at line 331 of file ComponentFieldMap.cc.

334 {
335 // Check if bounding boxes of elements have been computed
336 if (!m_cacheElemBoundingBoxes) {
337 std::cout << m_className << "::FindElement13:\n"
338 << " Caching the bounding boxes of all elements...";
339 CalculateElementBoundingBoxes();
340 std::cout << " done.\n";
341 m_cacheElemBoundingBoxes = true;
342 }
343
344 // Backup
345 double jacbak[4][4];
346 double detbak = 1.;
347 double t1bak = 0., t2bak = 0., t3bak = 0., t4bak = 0.;
348 int imapbak = -1;
349
350 // Initial values.
351 t1 = t2 = t3 = t4 = 0.;
352
353 // Check previously used element
354 if (m_lastElement > -1 && !m_checkMultipleElement) {
355 if (Coordinates13(x, y, z, t1, t2, t3, t4, jac, det, m_lastElement) == 0) {
356 if (t1 >= 0 && t1 <= +1 && t2 >= 0 && t2 <= +1 && t3 >= 0 && t3 <= +1 &&
357 t4 >= 0 && t4 <= +1) {
358 return m_lastElement;
359 }
360 }
361 }
362
363 // Tetra list in the block that contains the input 3D point.
364 std::vector<int> tetList;
365 if (m_useTetrahedralTree) {
366 if (!m_isTreeInitialized) {
367 if (!InitializeTetrahedralTree()) {
368 std::cerr << m_className << "::FindElement13:\n";
369 std::cerr << " Tetrahedral tree initialization failed.\n";
370 return -1;
371 }
372 }
373 tetList = m_tetTree->GetTetListInBlock(Vec3(x, y, z));
374 }
375 // Number of elements to scan.
376 // With tetra tree disabled, all elements are scanned.
377 const int numElemToSearch =
378 m_useTetrahedralTree ? tetList.size() : nElements;
379 // Verify the count of volumes that contain the point.
380 int nfound = 0;
381 int imap = -1;
382
383 // Scan all elements
384 for (int i = 0; i < numElemToSearch; i++) {
385 const int idxToElemList = m_useTetrahedralTree ? tetList[i] : i;
386 const Element& element = elements[idxToElemList];
387 // Tolerance
388 const double f = 0.2;
389 const double tolx = f * (element.xmax - element.xmin);
390 if (x < element.xmin - tolx || x > element.xmax + tolx) continue;
391 const double toly = f * (element.ymax - element.ymin);
392 if (y < element.ymin - toly || y > element.ymax + toly) continue;
393 const double tolz = f * (element.zmax - element.zmin);
394 if (z < element.zmin - tolz || z > element.zmax + tolz) continue;
395 if (Coordinates13(x, y, z, t1, t2, t3, t4, jac, det, idxToElemList) != 0) {
396 continue;
397 }
398 if (t1 < 0 || t1 > 1 || t2 < 0 || t2 > 1 || t3 < 0 || t3 > 1 || t4 < 0 ||
399 t4 > 1) {
400 continue;
401 }
402 ++nfound;
403 imap = idxToElemList;
404 m_lastElement = idxToElemList;
405 if (m_debug) {
406 std::cout << m_className << "::FindElement13:\n";
407 std::cout << " Found matching element " << i << ".\n";
408 }
409 if (!m_checkMultipleElement) return idxToElemList;
410 for (int j = 0; j < 4; ++j) {
411 for (int k = 0; k < 4; ++k) jacbak[j][k] = jac[j][k];
412 }
413 detbak = det;
414 t1bak = t1;
415 t2bak = t2;
416 t3bak = t3;
417 t4bak = t4;
418 imapbak = imap;
419 if (m_debug) {
420 PrintElement("FindElement13", x, y, z, t1, t2, t3, t4, imap, 10);
421 }
422 }
423
424 // In checking mode, verify the tetrahedron/triangle count.
425 if (m_checkMultipleElement) {
426 if (nfound < 1) {
427 if (m_debug) {
428 std::cout << m_className << "::FindElement13:\n";
429 std::cout << " No element matching point (" << x << ", " << y << ", "
430 << z << ") found.\n";
431 }
432 m_lastElement = -1;
433 return -1;
434 }
435 if (nfound > 1) {
436 std::cerr << m_className << "::FindElement13:\n";
437 std::cerr << " Found << " << nfound << " elements matching point ("
438 << x << ", " << y << ", " << z << ").\n";
439 }
440 if (nfound > 0) {
441 for (int j = 0; j < 4; ++j) {
442 for (int k = 0; k < 4; ++k) jac[j][k] = jacbak[j][k];
443 }
444 det = detbak;
445 t1 = t1bak;
446 t2 = t2bak;
447 t3 = t3bak;
448 t4 = t4bak;
449 imap = imapbak;
450 m_lastElement = imap;
451 return imap;
452 }
453 }
454
455 if (m_debug) {
456 std::cout << m_className << "::FindElement13:\n";
457 std::cout << " No element matching point (" << x << ", " << y << ", "
458 << z << ") found.\n";
459 }
460 return -1;
461}
bool m_debug
Switch on/off debugging messages.
void PrintElement(const std::string &header, const double x, const double y, const double z, const double t1, const double t2, const double t3, const double t4, const unsigned int i, const unsigned int n, const int iw=-1) const
std::vector< Element > elements
std::vector< int > GetTetListInBlock(const Vec3 &point)

Referenced by Garfield::ComponentAnsys123::ElectricField(), Garfield::ComponentComsol::ElectricField(), Garfield::ComponentElmer::ElectricField(), Garfield::ComponentAnsys123::GetMedium(), Garfield::ComponentComsol::GetMedium(), Garfield::ComponentElmer::GetMedium(), Garfield::ComponentAnsys123::WeightingField(), Garfield::ComponentComsol::WeightingField(), Garfield::ComponentElmer::WeightingField(), Garfield::ComponentAnsys123::WeightingPotential(), Garfield::ComponentComsol::WeightingPotential(), and Garfield::ComponentElmer::WeightingPotential().

◆ FindElement5()

int Garfield::ComponentFieldMap::FindElement5 ( const double  x,
const double  y,
const double  z,
double &  t1,
double &  t2,
double &  t3,
double &  t4,
double  jac[4][4],
double &  det 
)
protected

Find the element for a point in curved quadratic quadrilaterals.

Definition at line 166 of file ComponentFieldMap.cc.

169 {
170
171 // Check if bounding boxes of elements have been computed
172 if (!m_cacheElemBoundingBoxes) {
173 std::cout << m_className << "::FindElement5:\n"
174 << " Caching the bounding boxes of all elements...";
175 CalculateElementBoundingBoxes();
176 std::cout << " done.\n";
177 m_cacheElemBoundingBoxes = true;
178 }
179
180 // Tetra list in the block that contains the input 3D point.
181 std::vector<int> tetList;
182 if (m_useTetrahedralTree) {
183 if (!m_isTreeInitialized) {
184 if (!InitializeTetrahedralTree()) {
185 std::cerr << m_className << "::FindElement5:\n";
186 std::cerr << " Tetrahedral tree initialization failed.\n";
187 return -1;
188 }
189 }
190 tetList = m_tetTree->GetTetListInBlock(Vec3(x, y, z));
191 }
192 // Backup
193 double jacbak[4][4], detbak = 1.;
194 double t1bak = 0., t2bak = 0., t3bak = 0., t4bak = 0.;
195 int imapbak = -1;
196
197 // Initial values.
198 t1 = t2 = t3 = t4 = 0;
199
200 // Check previously used element
201 if (m_lastElement > -1 && !m_checkMultipleElement) {
202 if (elements[m_lastElement].degenerate) {
203 if (Coordinates3(x, y, z, t1, t2, t3, t4, jac, det, m_lastElement) == 0) {
204 if (t1 >= 0 && t1 <= +1 && t2 >= 0 && t2 <= +1 && t3 >= 0 && t3 <= +1) {
205 return m_lastElement;
206 }
207 }
208 } else {
209 if (Coordinates5(x, y, z, t1, t2, t3, t4, jac, det, m_lastElement) == 0) {
210 if (t1 >= -1 && t1 <= +1 && t2 >= -1 && t2 <= +1) return m_lastElement;
211 }
212 }
213 }
214
215 // Verify the count of volumes that contain the point.
216 int nfound = 0;
217 int imap = -1;
218
219 // Number of elements to scan.
220 // With tetra tree disabled, all elements are scanned.
221 const int numElemToSearch =
222 m_useTetrahedralTree ? tetList.size() : nElements;
223 for (int i = 0; i < numElemToSearch; ++i) {
224 const int idxToElemList = m_useTetrahedralTree ? tetList[i] : i;
225 const Element& element = elements[idxToElemList];
226 // Tolerance
227 const double f = 0.2;
228 const double tolx = f * (element.xmax - element.xmin);
229 if (x < element.xmin - tolx || x > element.xmax + tolx) continue;
230 const double toly = f * (element.ymax - element.ymin);
231 if (y < element.ymin - toly || y > element.ymax + toly) continue;
232 const double tolz = f * (element.zmax - element.zmin);
233 if (z < element.zmin - tolz || z > element.zmax + tolz) continue;
234
235 if (element.degenerate) {
236 // Degenerate element
237 if (Coordinates3(x, y, z, t1, t2, t3, t4, jac, det, idxToElemList) != 0) {
238 continue;
239 }
240 if (t1 < 0 || t1 > 1 || t2 < 0 || t2 > 1 || t3 < 0 || t3 > 1) continue;
241 ++nfound;
242 imap = idxToElemList;
243 m_lastElement = idxToElemList;
244 if (m_debug) {
245 std::cout << m_className << "::FindElement5:\n";
246 std::cout << " Found matching degenerate element " << idxToElemList
247 << ".\n";
248 }
249 if (!m_checkMultipleElement) return idxToElemList;
250 for (int j = 0; j < 4; ++j) {
251 for (int k = 0; k < 4; ++k) jacbak[j][k] = jac[j][k];
252 }
253 detbak = det;
254 t1bak = t1;
255 t2bak = t2;
256 t3bak = t3;
257 t4bak = t4;
258 imapbak = imap;
259 if (m_debug) {
260 PrintElement("FindElement5", x, y, z, t1, t2, t3, t4, imap, 6);
261 }
262 } else {
263 // Non-degenerate element
264 if (Coordinates5(x, y, z, t1, t2, t3, t4, jac, det, idxToElemList) != 0) {
265 continue;
266 }
267 if (t1 < -1 || t1 > 1 || t2 < -1 || t2 > 1) continue;
268 ++nfound;
269 imap = idxToElemList;
270 m_lastElement = idxToElemList;
271 if (m_debug) {
272 std::cout << m_className << "::FindElement5:\n";
273 std::cout << " Found matching non-degenerate element "
274 << idxToElemList << ".\n";
275 }
276 if (!m_checkMultipleElement) return idxToElemList;
277 for (int j = 0; j < 4; ++j) {
278 for (int k = 0; k < 4; ++k) jacbak[j][k] = jac[j][k];
279 }
280 detbak = det;
281 t1bak = t1;
282 t2bak = t2;
283 t3bak = t3;
284 t4bak = t4;
285 imapbak = imap;
286 if (m_debug) {
287 PrintElement("FindElement5", x, y, z, t1, t2, t3, t4, imap, 8);
288 }
289 }
290 }
291
292 // In checking mode, verify the tetrahedron/triangle count.
293 if (m_checkMultipleElement) {
294 if (nfound < 1) {
295 if (m_debug) {
296 std::cout << m_className << "::FindElement5:\n";
297 std::cout << " No element matching point (" << x << ", " << y
298 << ") found.\n";
299 }
300 m_lastElement = -1;
301 return -1;
302 }
303 if (nfound > 1) {
304 std::cout << m_className << "::FindElement5:\n";
305 std::cout << " Found " << nfound << " elements matching point (" << x
306 << ", " << y << ").\n";
307 }
308 if (nfound > 0) {
309 for (int j = 0; j < 4; ++j) {
310 for (int k = 0; k < 4; ++k) jac[j][k] = jacbak[j][k];
311 }
312 det = detbak;
313 t1 = t1bak;
314 t2 = t2bak;
315 t3 = t3bak;
316 t4 = t4bak;
317 imap = imapbak;
318 m_lastElement = imap;
319 return imap;
320 }
321 }
322
323 if (m_debug) {
324 std::cout << m_className << "::FindElement5:\n";
325 std::cout << " No element matching point (" << x << ", " << y
326 << ") found.\n";
327 }
328 return -1;
329}

Referenced by Garfield::ComponentAnsys121::ElectricField(), Garfield::ComponentAnsys121::GetMedium(), Garfield::ComponentAnsys121::WeightingField(), and Garfield::ComponentAnsys121::WeightingPotential().

◆ FindElementCube()

int Garfield::ComponentFieldMap::FindElementCube ( const double  x,
const double  y,
const double  z,
double &  t1,
double &  t2,
double &  t3,
TMatrixD *&  jac,
std::vector< TMatrixD * > &  dN 
)
protected

Find the element for a point in a cube.

Definition at line 463 of file ComponentFieldMap.cc.

466 {
467
468 int imap = -1;
469 if (m_lastElement >= 0) {
470 const Element& element = elements[m_lastElement];
471 const Node& n3 = nodes[element.emap[3]];
472 if (x >= n3.x && y >= n3.y && z >= n3.z) {
473 const Node& n0 = nodes[element.emap[0]];
474 const Node& n2 = nodes[element.emap[2]];
475 const Node& n7 = nodes[element.emap[7]];
476 if (x < n0.x && y < n2.y && z < n7.z) {
477 imap = m_lastElement;
478 }
479 }
480 }
481
482 // Default element loop
483 if (imap == -1) {
484 for (int i = 0; i < nElements; ++i) {
485 const Element& element = elements[i];
486 const Node& n3 = nodes[element.emap[3]];
487 if (x < n3.x || y < n3.y || z < n3.z) continue;
488 const Node& n0 = nodes[element.emap[0]];
489 const Node& n2 = nodes[element.emap[2]];
490 const Node& n7 = nodes[element.emap[7]];
491 if (x < n0.x && y < n2.y && z < n7.z) {
492 imap = i;
493 break;
494 }
495 }
496 }
497
498 if (imap < 0) {
499 if (m_debug) {
500 std::cout << m_className << "::FindElementCube:\n";
501 std::cout << " Point (" << x << "," << y << "," << z
502 << ") not in the mesh, it is background or PEC.\n";
503 const Node& first0 = nodes[elements.front().emap[0]];
504 const Node& first2 = nodes[elements.front().emap[2]];
505 const Node& first3 = nodes[elements.front().emap[3]];
506 const Node& first7 = nodes[elements.front().emap[7]];
507 std::cout << " First node (" << first3.x << ","
508 << first3.y << "," << first3.z << ") in the mesh.\n";
509 std::cout << " dx= " << (first0.x - first3.x)
510 << ", dy= " << (first2.y - first3.y)
511 << ", dz= " << (first7.z - first3.z) << "\n";
512 const Node& last0 = nodes[elements.back().emap[0]];
513 const Node& last2 = nodes[elements.back().emap[2]];
514 const Node& last3 = nodes[elements.back().emap[3]];
515 const Node& last5 = nodes[elements.back().emap[5]];
516 const Node& last7 = nodes[elements.back().emap[7]];
517 std::cout << " Last node (" << last5.x << ","
518 << last5.y << "," << last5.z << ") in the mesh.\n";
519 std::cout << " dx= " << (last0.x - last3.x)
520 << ", dy= " << (last2.y - last3.y)
521 << ", dz= " << (last7.z - last3.z) << "\n";
522 }
523 return -1;
524 }
525 CoordinatesCube(x, y, z, t1, t2, t3, jac, dN, imap);
526 if (m_debug) {
527 PrintElement("FindElementCube", x, y, z, t1, t2, t3, 0., imap, 8);
528 }
529 return imap;
530}

◆ GetAspectRatio()

virtual void Garfield::ComponentFieldMap::GetAspectRatio ( const unsigned int  i,
double &  dmin,
double &  dmax 
)
protectedpure virtual

◆ GetBoundingBox()

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

Get the bounding box coordinates.

Reimplemented from Garfield::ComponentBase.

Definition at line 2426 of file ComponentFieldMap.cc.

2428 {
2429
2430 if (!m_ready) return false;
2431
2432 xmin = xMinBoundingBox;
2433 xmax = xMaxBoundingBox;
2434 ymin = yMinBoundingBox;
2435 ymax = yMaxBoundingBox;
2436 zmin = zMinBoundingBox;
2437 zmax = zMaxBoundingBox;
2438 return true;
2439}

◆ GetConductivity()

double Garfield::ComponentFieldMap::GetConductivity ( const unsigned int  imat) const

Return the conductivity of a field map material.

Definition at line 109 of file ComponentFieldMap.cc.

109 {
110
111 if (imat >= m_nMaterials) {
112 std::cerr << m_className << "::GetConductivity:\n"
113 << " Material index " << imat << " is out of range.\n";
114 return -1.;
115 }
116
117 return materials[imat].ohm;
118}

◆ GetElement()

bool Garfield::ComponentFieldMap::GetElement ( const unsigned int  i,
double &  vol,
double &  dmin,
double &  dmax 
)

Return the volume and aspect ratio of a mesh element.

Definition at line 152 of file ComponentFieldMap.cc.

153 {
154
155 if ((int)i >= nElements) {
156 std::cerr << m_className << "::GetElement:\n";
157 std::cerr << " Element index (" << i << ") out of range.\n";
158 return false;
159 }
160
161 vol = GetElementVolume(i);
162 GetAspectRatio(i, dmin, dmax);
163 return true;
164}
virtual double GetElementVolume(const unsigned int i)=0
virtual void GetAspectRatio(const unsigned int i, double &dmin, double &dmax)=0

◆ GetElementVolume()

virtual double Garfield::ComponentFieldMap::GetElementVolume ( const unsigned int  i)
protectedpure virtual

◆ GetMedium() [1/2]

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

◆ GetMedium() [2/2]

Medium * Garfield::ComponentFieldMap::GetMedium ( const unsigned int  i) const

Return the Medium associated to a field map material.

Definition at line 141 of file ComponentFieldMap.cc.

141 {
142
143 if (imat >= m_nMaterials) {
144 std::cerr << m_className << "::GetMedium:\n"
145 << " Material index " << imat << " is out of range.\n";
146 return NULL;
147 }
148
149 return materials[imat].medium;
150}

◆ GetNumberOfElements()

int Garfield::ComponentFieldMap::GetNumberOfElements ( ) const
inline

Return the number of mesh elements.

Definition at line 57 of file ComponentFieldMap.hh.

57{ return nElements; }

◆ GetNumberOfMaterials()

unsigned int Garfield::ComponentFieldMap::GetNumberOfMaterials ( ) const
inline

Return the number of materials in the field map.

Definition at line 43 of file ComponentFieldMap.hh.

43{ return m_nMaterials; }

◆ GetNumberOfMedia()

unsigned int Garfield::ComponentFieldMap::GetNumberOfMedia ( ) const
inline

Definition at line 54 of file ComponentFieldMap.hh.

54{ return m_nMaterials; }

◆ GetPermittivity()

double Garfield::ComponentFieldMap::GetPermittivity ( const unsigned int  imat) const

Return the permittivity of a field map material.

Definition at line 98 of file ComponentFieldMap.cc.

98 {
99
100 if (imat >= m_nMaterials) {
101 std::cerr << m_className << "::GetPermittivity:\n"
102 << " Material index " << imat << " is out of range.\n";
103 return -1.;
104 }
105
106 return materials[imat].eps;
107}

◆ GetVoltageRange()

virtual bool Garfield::ComponentFieldMap::GetVoltageRange ( double &  vmin,
double &  vmax 
)
inlinevirtual

Calculate the voltage range [V].

Implements Garfield::ComponentBase.

Definition at line 30 of file ComponentFieldMap.hh.

30 {
31 vmin = mapvmin;
32 vmax = mapvmax;
33 return true;
34 }

Referenced by Garfield::ViewFEMesh::Plot().

◆ IsInBoundingBox()

bool Garfield::ComponentFieldMap::IsInBoundingBox ( const double  x,
const double  y,
const double  z 
) const
virtual

◆ MapCoordinates()

void Garfield::ComponentFieldMap::MapCoordinates ( double &  xpos,
double &  ypos,
double &  zpos,
bool &  xmirrored,
bool &  ymirrored,
bool &  zmirrored,
double &  rcoordinate,
double &  rotation 
) const
protected

Move (xpos, ypos, zpos) to field map coordinates.

Definition at line 2441 of file ComponentFieldMap.cc.

2444 {
2445
2446 // Initial values
2447 rotation = 0;
2448
2449 // If chamber is periodic, reduce to the cell volume.
2450 xmirrored = false;
2451 double auxr, auxphi;
2452 if (m_xPeriodic) {
2453 xpos = mapxmin + fmod(xpos - mapxmin, mapxmax - mapxmin);
2454 if (xpos < mapxmin) xpos += mapxmax - mapxmin;
2455 } else if (m_xMirrorPeriodic) {
2456 double xnew = mapxmin + fmod(xpos - mapxmin, mapxmax - mapxmin);
2457 if (xnew < mapxmin) xnew += mapxmax - mapxmin;
2458 int nx = int(floor(0.5 + (xnew - xpos) / (mapxmax - mapxmin)));
2459 if (nx != 2 * (nx / 2)) {
2460 xnew = mapxmin + mapxmax - xnew;
2461 xmirrored = true;
2462 }
2463 xpos = xnew;
2464 }
2465 if (m_xAxiallyPeriodic && (zpos != 0 || ypos != 0)) {
2466 auxr = sqrt(zpos * zpos + ypos * ypos);
2467 auxphi = atan2(zpos, ypos);
2468 rotation = (mapxamax - mapxamin) *
2469 floor(0.5 + (auxphi - 0.5 * (mapxamin + mapxamax)) /
2470 (mapxamax - mapxamin));
2471 if (auxphi - rotation < mapxamin)
2472 rotation = rotation - (mapxamax - mapxamin);
2473 if (auxphi - rotation > mapxamax)
2474 rotation = rotation + (mapxamax - mapxamin);
2475 auxphi = auxphi - rotation;
2476 ypos = auxr * cos(auxphi);
2477 zpos = auxr * sin(auxphi);
2478 }
2479
2480 ymirrored = false;
2481 if (m_yPeriodic) {
2482 ypos = mapymin + fmod(ypos - mapymin, mapymax - mapymin);
2483 if (ypos < mapymin) ypos += mapymax - mapymin;
2484 } else if (m_yMirrorPeriodic) {
2485 double ynew = mapymin + fmod(ypos - mapymin, mapymax - mapymin);
2486 if (ynew < mapymin) ynew += mapymax - mapymin;
2487 int ny = int(floor(0.5 + (ynew - ypos) / (mapymax - mapymin)));
2488 if (ny != 2 * (ny / 2)) {
2489 ynew = mapymin + mapymax - ynew;
2490 ymirrored = true;
2491 }
2492 ypos = ynew;
2493 }
2494 if (m_yAxiallyPeriodic && (xpos != 0 || zpos != 0)) {
2495 auxr = sqrt(xpos * xpos + zpos * zpos);
2496 auxphi = atan2(xpos, zpos);
2497 rotation = (mapyamax - mapyamin) *
2498 floor(0.5 + (auxphi - 0.5 * (mapyamin + mapyamax)) /
2499 (mapyamax - mapyamin));
2500 if (auxphi - rotation < mapyamin)
2501 rotation = rotation - (mapyamax - mapyamin);
2502 if (auxphi - rotation > mapyamax)
2503 rotation = rotation + (mapyamax - mapyamin);
2504 auxphi = auxphi - rotation;
2505 zpos = auxr * cos(auxphi);
2506 xpos = auxr * sin(auxphi);
2507 }
2508
2509 zmirrored = false;
2510 if (m_zPeriodic) {
2511 zpos = mapzmin + fmod(zpos - mapzmin, mapzmax - mapzmin);
2512 if (zpos < mapzmin) zpos += mapzmax - mapzmin;
2513 } else if (m_zMirrorPeriodic) {
2514 double znew = mapzmin + fmod(zpos - mapzmin, mapzmax - mapzmin);
2515 if (znew < mapzmin) znew += mapzmax - mapzmin;
2516 int nz = int(floor(0.5 + (znew - zpos) / (mapzmax - mapzmin)));
2517 if (nz != 2 * (nz / 2)) {
2518 znew = mapzmin + mapzmax - znew;
2519 zmirrored = true;
2520 }
2521 zpos = znew;
2522 }
2523 if (m_zAxiallyPeriodic && (ypos != 0 || xpos != 0)) {
2524 auxr = sqrt(ypos * ypos + xpos * xpos);
2525 auxphi = atan2(ypos, xpos);
2526 rotation = (mapzamax - mapzamin) *
2527 floor(0.5 + (auxphi - 0.5 * (mapzamin + mapzamax)) /
2528 (mapzamax - mapzamin));
2529 if (auxphi - rotation < mapzamin)
2530 rotation = rotation - (mapzamax - mapzamin);
2531 if (auxphi - rotation > mapzamax)
2532 rotation = rotation + (mapzamax - mapzamin);
2533 auxphi = auxphi - rotation;
2534 xpos = auxr * cos(auxphi);
2535 ypos = auxr * sin(auxphi);
2536 }
2537
2538 // If we have a rotationally symmetric field map, store coordinates.
2539 rcoordinate = 0;
2540 double zcoordinate = 0;
2541 if (m_xRotationSymmetry) {
2542 rcoordinate = sqrt(ypos * ypos + zpos * zpos);
2543 zcoordinate = xpos;
2544 } else if (m_yRotationSymmetry) {
2545 rcoordinate = sqrt(xpos * xpos + zpos * zpos);
2546 zcoordinate = ypos;
2547 } else if (m_zRotationSymmetry) {
2548 rcoordinate = sqrt(xpos * xpos + ypos * ypos);
2549 zcoordinate = zpos;
2550 }
2551
2553 xpos = rcoordinate;
2554 ypos = zcoordinate;
2555 zpos = 0;
2556 }
2557}
bool m_zMirrorPeriodic
Mirror periodicity in z.
bool m_yAxiallyPeriodic
Axial periodicity in y.
bool m_zRotationSymmetry
Rotation symmetry around z-axis.
bool m_yRotationSymmetry
Rotation symmetry around y-axis.
bool m_zAxiallyPeriodic
Axial periodicity in z.
bool m_xRotationSymmetry
Rotation symmetry around x-axis.
bool m_yPeriodic
Simple periodicity in y.
bool m_yMirrorPeriodic
Mirror periodicity in y.
bool m_xPeriodic
Simple periodicity in x.
bool m_zPeriodic
Simple periodicity in z.
bool m_xAxiallyPeriodic
Axial periodicity in x.
bool m_xMirrorPeriodic
Mirror periodicity in x.
DoubleAc cos(const DoubleAc &f)
Definition: DoubleAc.cpp:432
DoubleAc sin(const DoubleAc &f)
Definition: DoubleAc.cpp:384
DoubleAc sqrt(const DoubleAc &f)
Definition: DoubleAc.cpp:314

Referenced by Garfield::ComponentCST::Coordinate2Index(), Garfield::ComponentAnsys121::ElectricField(), Garfield::ComponentAnsys123::ElectricField(), Garfield::ComponentComsol::ElectricField(), Garfield::ComponentElmer::ElectricField(), Garfield::ComponentAnsys121::GetMedium(), Garfield::ComponentAnsys123::GetMedium(), Garfield::ComponentComsol::GetMedium(), Garfield::ComponentElmer::GetMedium(), Garfield::ComponentAnsys121::WeightingField(), Garfield::ComponentAnsys123::WeightingField(), Garfield::ComponentComsol::WeightingField(), Garfield::ComponentElmer::WeightingField(), Garfield::ComponentAnsys121::WeightingPotential(), Garfield::ComponentAnsys123::WeightingPotential(), Garfield::ComponentComsol::WeightingPotential(), and Garfield::ComponentElmer::WeightingPotential().

◆ NotDriftMedium()

void Garfield::ComponentFieldMap::NotDriftMedium ( const unsigned int  imat)

Flag a field map materials as a non-drift medium.

Definition at line 82 of file ComponentFieldMap.cc.

82 {
83
84 // Do not proceed if not properly initialised.
85 if (!m_ready) PrintNotReady("NotDriftMedium");
86
87 // Check value
88 if (imat >= m_nMaterials) {
89 std::cerr << m_className << "::NotDriftMedium:\n";
90 std::cerr << " Material index " << imat << " is out of range.\n";
91 return;
92 }
93
94 // Make drift medium
95 materials[imat].driftmedium = false;
96}

◆ PrintElement()

void Garfield::ComponentFieldMap::PrintElement ( const std::string &  header,
const double  x,
const double  y,
const double  z,
const double  t1,
const double  t2,
const double  t3,
const double  t4,
const unsigned int  i,
const unsigned int  n,
const int  iw = -1 
) const
protected

Definition at line 2740 of file ComponentFieldMap.cc.

2745 {
2746
2747 const Element& element = elements[i];
2748 std::cout << m_className << "::" << header << ":\n"
2749 << " Global = (" << x << ", " << y << ", " << z << ")\n"
2750 << " Local = (" << t1 << ", " << t2 << ", " << t3 << ", " << t4
2751 << ")\n"
2752 << " Element = " << i << " (degenerate: " << element.degenerate
2753 << ")\n "
2754 << " Node x y z V\n";
2755 for (unsigned int ii = 0; ii < n; ++ii) {
2756 const Node& node = nodes[element.emap[ii]];
2757 const double v = iw < 0 ? node.v : node.w[iw];
2758 printf(" %-5d %12g %12g %12g %12g\n", element.emap[i], node.x, node.y,
2759 node.z, v);
2760 }
2761}

Referenced by Garfield::ComponentAnsys121::ElectricField(), Garfield::ComponentAnsys123::ElectricField(), Garfield::ComponentComsol::ElectricField(), Garfield::ComponentElmer::ElectricField(), FindElement13(), FindElement5(), FindElementCube(), Garfield::ComponentAnsys121::GetMedium(), Garfield::ComponentAnsys123::GetMedium(), Garfield::ComponentComsol::GetMedium(), Garfield::ComponentElmer::GetMedium(), Garfield::ComponentAnsys121::WeightingField(), Garfield::ComponentAnsys123::WeightingField(), Garfield::ComponentComsol::WeightingField(), Garfield::ComponentElmer::WeightingField(), Garfield::ComponentAnsys121::WeightingPotential(), Garfield::ComponentAnsys123::WeightingPotential(), Garfield::ComponentComsol::WeightingPotential(), and Garfield::ComponentElmer::WeightingPotential().

◆ PrintMaterials()

void Garfield::ComponentFieldMap::PrintMaterials ( )

List all currently defined materials.

Definition at line 36 of file ComponentFieldMap.cc.

36 {
37
38 // Do not proceed if not properly initialised.
39 if (!m_ready) PrintNotReady("PrintMaterials");
40
41 if (materials.empty()) {
42 std::cerr << m_className << "::PrintMaterials:\n"
43 << " No materials are currently defined.\n";
44 return;
45 }
46
47 std::cout << m_className << "::PrintMaterials:\n"
48 << " Currently " << m_nMaterials << " materials are defined.\n"
49 << " Index Permittivity Resistivity Notes\n";
50 for (unsigned int i = 0; i < m_nMaterials; ++i) {
51 printf(" %5d %12g %12g", i, materials[i].eps, materials[i].ohm);
52 if (materials[i].medium) {
53 std::string name = materials[i].medium->GetName();
54 std::cout << " " << name;
55 if (materials[i].medium->IsDriftable()) std::cout << ", drift medium";
56 if (materials[i].medium->IsIonisable()) std::cout << ", ionisable";
57 }
58 if (materials[i].driftmedium) {
59 std::cout << " (drift medium)\n";
60 } else {
61 std::cout << "\n";
62 }
63 }
64}

Referenced by Garfield::ComponentCST::Initialise(), Garfield::ComponentAnsys121::Initialise(), and Garfield::ComponentAnsys123::Initialise().

◆ PrintNotReady()

◆ PrintRange()

void Garfield::ComponentFieldMap::PrintRange ( )

Show x, y, z, V and angular ranges.

Definition at line 2354 of file ComponentFieldMap.cc.

2354 {
2355
2356 std::cout << m_className << "::PrintRange:\n";
2357 std::cout << " Dimensions of the elementary block\n";
2358 printf(" %15g < x < %-15g cm,\n", mapxmin, mapxmax);
2359 printf(" %15g < y < %-15g cm,\n", mapymin, mapymax);
2360 printf(" %15g < z < %-15g cm,\n", mapzmin, mapzmax);
2361 printf(" %15g < V < %-15g V.\n", mapvmin, mapvmax);
2362
2363 std::cout << " Periodicities\n";
2364
2365 std::cout << " x:";
2366 if (m_xPeriodic) {
2367 std::cout << " simple with length " << cellsx << " cm";
2368 }
2369 if (m_xMirrorPeriodic) {
2370 std::cout << " mirror with length " << cellsx << " cm";
2371 }
2372 if (m_xAxiallyPeriodic) {
2373 std::cout << " axial " << int(0.5 + mapnxa) << "-fold repetition";
2374 }
2375 if (m_xRotationSymmetry) std::cout << " rotational symmetry";
2378 std::cout << " none";
2379 std::cout << "\n";
2380
2381 std::cout << " y:";
2382 if (m_yPeriodic) {
2383 std::cout << " simple with length " << cellsy << " cm";
2384 }
2385 if (m_yMirrorPeriodic) {
2386 std::cout << " mirror with length " << cellsy << " cm";
2387 }
2388 if (m_yAxiallyPeriodic) {
2389 std::cout << " axial " << int(0.5 + mapnya) << "-fold repetition";
2390 }
2391 if (m_yRotationSymmetry) {
2392 std::cout << " rotational symmetry";
2393 }
2396 std::cout << " none";
2397 std::cout << "\n";
2398
2399 std::cout << " z:";
2400 if (m_zPeriodic) {
2401 std::cout << " simple with length " << cellsz << " cm";
2402 }
2403 if (m_zMirrorPeriodic) {
2404 std::cout << " mirror with length " << cellsz << " cm";
2405 }
2406 if (m_zAxiallyPeriodic) {
2407 std::cout << " axial " << int(0.5 + mapnza) << "-fold repetition";
2408 }
2409 if (m_zRotationSymmetry) {
2410 std::cout << " rotational symmetry";
2411 }
2414 std::cout << " none";
2415 std::cout << "\n";
2416}

Referenced by Garfield::ComponentCST::Coordinate2Index(), SetRange(), and UpdatePeriodicityCommon().

◆ PrintWarning()

◆ ReadDouble()

double Garfield::ComponentFieldMap::ReadDouble ( char *  token,
double  def,
bool &  error 
)
protected

◆ ReadInteger()

int Garfield::ComponentFieldMap::ReadInteger ( char *  token,
int  def,
bool &  error 
)
protected

◆ Reset()

void Garfield::ComponentFieldMap::Reset ( )
inlineprotectedvirtual

Geometry checks.

Implements Garfield::ComponentBase.

Definition at line 165 of file ComponentFieldMap.hh.

165{};

◆ SetMedium()

void Garfield::ComponentFieldMap::SetMedium ( const unsigned int  imat,
Medium medium 
)

Associate a field map material with a Medium class.

Definition at line 120 of file ComponentFieldMap.cc.

120 {
121
122 if (imat >= m_nMaterials) {
123 std::cerr << m_className << "::SetMedium:\n";
124 std::cerr << " Material index " << imat << " is out of range.\n";
125 return;
126 }
127
128 if (!m) {
129 std::cerr << m_className << "::SetMedium: Null pointer.\n";
130 return;
131 }
132
133 if (m_debug) {
134 std::cout << m_className << "::SetMedium:\n Associated material "
135 << imat << " with medium " << m->GetName() << ".\n";
136 }
137
138 materials[imat].medium = m;
139}

◆ SetRange()

void Garfield::ComponentFieldMap::SetRange ( )
virtual

Calculate x, y, z, V and angular ranges.

Reimplemented in Garfield::ComponentCST.

Definition at line 2239 of file ComponentFieldMap.cc.

2239 {
2240
2241 // Initial values
2242 mapxmin = mapymin = mapzmin = 0.;
2243 mapxmax = mapymax = mapzmax = 0.;
2244 mapxamin = mapyamin = mapzamin = 0.;
2245 mapxamax = mapyamax = mapzamax = 0.;
2246 mapvmin = mapvmax = 0.;
2247 setangx = setangy = setangz = false;
2248
2249 // Make sure the required data is available.
2250 if (!m_ready || nNodes < 1) {
2251 std::cerr << m_className << "::SetRange:\n";
2252 std::cerr << " Field map not yet set.\n";
2253 return;
2254 }
2255 if (nNodes < 1) {
2256 std::cerr << m_className << "::SetRange:\n";
2257 std::cerr << " Number of nodes < 1.\n";
2258 return;
2259 }
2260
2261 // Loop over the nodes.
2262 mapxmin = mapxmax = nodes[0].x;
2263 mapymin = mapymax = nodes[0].y;
2264 mapzmin = mapzmax = nodes[0].z;
2265 mapvmin = mapvmax = nodes[0].v;
2266
2267 double ang;
2268 for (int i = 1; i < nNodes; i++) {
2269 if (mapxmin > nodes[i].x) mapxmin = nodes[i].x;
2270 if (mapxmax < nodes[i].x) mapxmax = nodes[i].x;
2271 if (mapymin > nodes[i].y) mapymin = nodes[i].y;
2272 if (mapymax < nodes[i].y) mapymax = nodes[i].y;
2273 if (mapzmin > nodes[i].z) mapzmin = nodes[i].z;
2274 if (mapzmax < nodes[i].z) mapzmax = nodes[i].z;
2275 if (mapvmin > nodes[i].v) mapvmin = nodes[i].v;
2276 if (mapvmax < nodes[i].v) mapvmax = nodes[i].v;
2277
2278 if (nodes[i].y != 0 || nodes[i].z != 0) {
2279 ang = atan2(nodes[i].z, nodes[i].y);
2280 if (setangx) {
2281 if (ang < mapxamin) mapxamin = ang;
2282 if (ang > mapxamax) mapxamax = ang;
2283 } else {
2284 mapxamin = mapxamax = ang;
2285 setangx = true;
2286 }
2287 }
2288
2289 if (nodes[i].z != 0 || nodes[i].x != 0) {
2290 ang = atan2(nodes[i].x, nodes[i].z);
2291 if (setangy) {
2292 if (ang < mapyamin) mapyamin = ang;
2293 if (ang > mapyamax) mapyamax = ang;
2294 } else {
2295 mapyamin = mapyamax = ang;
2296 setangy = true;
2297 }
2298 }
2299
2300 if (nodes[i].x != 0 || nodes[i].y != 0) {
2301 ang = atan2(nodes[i].y, nodes[i].x);
2302 if (setangz) {
2303 if (ang < mapzamin) mapzamin = ang;
2304 if (ang > mapzamax) mapzamax = ang;
2305 } else {
2306 mapzamin = mapzamax = ang;
2307 setangz = true;
2308 }
2309 }
2310 }
2311
2312 // Fix the angular ranges.
2313 if (mapxamax - mapxamin > Pi) {
2314 double aux = mapxamin;
2316 mapxamax = aux + TwoPi;
2317 }
2318
2319 if (mapyamax - mapyamin > Pi) {
2320 double aux = mapyamin;
2322 mapyamax = aux + TwoPi;
2323 }
2324
2325 if (mapzamax - mapzamin > Pi) {
2326 double aux = mapzamin;
2328 mapzamax = aux + TwoPi;
2329 }
2330
2331 // Set the periodicity length (maybe not needed).
2335
2336 // Set provisional cell dimensions.
2341 if (m_is3d) {
2344 } else {
2347 }
2348 hasBoundingBox = true;
2349
2350 // Display the range if requested.
2351 if (m_debug) PrintRange();
2352}
void PrintRange()
Show x, y, z, V and angular ranges.
DoubleAc fabs(const DoubleAc &f)
Definition: DoubleAc.h:615

Referenced by Garfield::ComponentElmer::Initialise(), Garfield::ComponentAnsys121::Initialise(), Garfield::ComponentAnsys123::Initialise(), and Garfield::ComponentComsol::Initialise().

◆ UnmapFields()

void Garfield::ComponentFieldMap::UnmapFields ( double &  ex,
double &  ey,
double &  ez,
double &  xpos,
double &  ypos,
double &  zpos,
bool &  xmirrored,
bool &  ymirrored,
bool &  zmirrored,
double &  rcoordinate,
double &  rotation 
) const
protected

Move (ex, ey, ez) to global coordinates.

Definition at line 2559 of file ComponentFieldMap.cc.

2563 {
2564
2565 // Apply mirror imaging.
2566 if (xmirrored) ex = -ex;
2567 if (ymirrored) ey = -ey;
2568 if (zmirrored) ez = -ez;
2569
2570 // Rotate the field.
2571 double er, theta;
2572 if (m_xAxiallyPeriodic) {
2573 er = sqrt(ey * ey + ez * ez);
2574 theta = atan2(ez, ey);
2575 theta += rotation;
2576 ey = er * cos(theta);
2577 ez = er * sin(theta);
2578 }
2579 if (m_yAxiallyPeriodic) {
2580 er = sqrt(ez * ez + ex * ex);
2581 theta = atan2(ex, ez);
2582 theta += rotation;
2583 ez = er * cos(theta);
2584 ex = er * sin(theta);
2585 }
2586 if (m_zAxiallyPeriodic) {
2587 er = sqrt(ex * ex + ey * ey);
2588 theta = atan2(ey, ex);
2589 theta += rotation;
2590 ex = er * cos(theta);
2591 ey = er * sin(theta);
2592 }
2593
2594 // Take care of symmetry.
2595 double eaxis;
2596 er = ex;
2597 eaxis = ey;
2598
2599 // Rotational symmetry
2600 if (m_xRotationSymmetry) {
2601 if (rcoordinate <= 0) {
2602 ex = eaxis;
2603 ey = 0;
2604 ez = 0;
2605 } else {
2606 ex = eaxis;
2607 ey = er * ypos / rcoordinate;
2608 ez = er * zpos / rcoordinate;
2609 }
2610 }
2611 if (m_yRotationSymmetry) {
2612 if (rcoordinate <= 0) {
2613 ex = 0;
2614 ey = eaxis;
2615 ez = 0;
2616 } else {
2617 ex = er * xpos / rcoordinate;
2618 ey = eaxis;
2619 ez = er * zpos / rcoordinate;
2620 }
2621 }
2622 if (m_zRotationSymmetry) {
2623 if (rcoordinate <= 0) {
2624 ex = 0;
2625 ey = 0;
2626 ez = eaxis;
2627 } else {
2628 ex = er * xpos / rcoordinate;
2629 ey = er * ypos / rcoordinate;
2630 ez = eaxis;
2631 }
2632 }
2633}

Referenced by Garfield::ComponentAnsys121::ElectricField(), Garfield::ComponentAnsys123::ElectricField(), Garfield::ComponentComsol::ElectricField(), Garfield::ComponentElmer::ElectricField(), Garfield::ComponentAnsys121::WeightingField(), Garfield::ComponentAnsys123::WeightingField(), Garfield::ComponentComsol::WeightingField(), and Garfield::ComponentElmer::WeightingField().

◆ UpdatePeriodicity()

virtual void Garfield::ComponentFieldMap::UpdatePeriodicity ( )
protectedpure virtual

◆ UpdatePeriodicity2d()

void Garfield::ComponentFieldMap::UpdatePeriodicity2d ( )
protected

Definition at line 2209 of file ComponentFieldMap.cc.

2209 {
2210
2211 // Check the required data is available.
2212 if (!m_ready) {
2213 std::cerr << m_className << "::UpdatePeriodicity2d:\n";
2214 std::cerr << " No valid field map available.\n";
2215 return;
2216 }
2217
2218 // No z-periodicity in 2d
2220 std::cerr << m_className << "::UpdatePeriodicity2d:\n";
2221 std::cerr << " Simple or mirror periodicity along z\n";
2222 std::cerr << " requested for a 2d map; reset.\n";
2223 m_zPeriodic = false;
2224 m_zMirrorPeriodic = false;
2225 m_warning = true;
2226 }
2227
2228 // Only z-axial periodicity in 2d maps
2230 std::cerr << m_className << "::UpdatePeriodicity2d:\n";
2231 std::cerr << " Axial symmetry has been requested \n";
2232 std::cerr << " around x or y for a 2D map; reset.\n";
2233 m_xAxiallyPeriodic = false;
2234 m_yAxiallyPeriodic = false;
2235 m_warning = true;
2236 }
2237}

Referenced by Garfield::ComponentAnsys121::UpdatePeriodicity(), and Garfield::ComponentCST::UpdatePeriodicity().

◆ UpdatePeriodicityCommon()

void Garfield::ComponentFieldMap::UpdatePeriodicityCommon ( )
protected

Definition at line 2008 of file ComponentFieldMap.cc.

2008 {
2009
2010 // Check the required data is available.
2011 if (!m_ready) {
2012 std::cerr << m_className << "::UpdatePeriodicityCommon:\n";
2013 std::cerr << " No valid field map available.\n";
2014 return;
2015 }
2016
2017 // No regular and mirror periodicity at the same time.
2019 std::cerr << m_className << "::UpdatePeriodicityCommon:\n";
2020 std::cerr << " Both simple and mirror periodicity\n";
2021 std::cerr << " along x requested; reset.\n";
2022 m_xPeriodic = false;
2023 m_xMirrorPeriodic = false;
2024 m_warning = true;
2025 }
2027 std::cerr << m_className << "::UpdatePeriodicityCommon:\n";
2028 std::cerr << " Both simple and mirror periodicity\n";
2029 std::cerr << " along y requested; reset.\n";
2030 m_yPeriodic = false;
2031 m_yMirrorPeriodic = false;
2032 m_warning = true;
2033 }
2035 std::cerr << m_className << "::UpdatePeriodicityCommon:\n";
2036 std::cerr << " Both simple and mirror periodicity\n";
2037 std::cerr << " along z requested; reset.\n";
2038 m_zPeriodic = false;
2039 m_zMirrorPeriodic = false;
2040 m_warning = true;
2041 }
2042
2043 // In case of axial periodicity,
2044 // the range must be an integral part of two pi.
2045 if (m_xAxiallyPeriodic) {
2046 if (mapxamin >= mapxamax) {
2047 mapnxa = 0;
2048 } else {
2049 mapnxa = TwoPi / (mapxamax - mapxamin);
2050 }
2051 if (fabs(mapnxa - int(0.5 + mapnxa)) > 0.001 || mapnxa < 1.5) {
2052 std::cerr << m_className << "::UpdatePeriodicityCommon:\n";
2053 std::cerr << " X-axial symmetry has been requested but the map\n";
2054 std::cerr << " does not cover an integral fraction of 2 pi; reset.\n";
2055 m_xAxiallyPeriodic = false;
2056 m_warning = true;
2057 }
2058 }
2059
2060 if (m_yAxiallyPeriodic) {
2061 if (mapyamin >= mapyamax) {
2062 mapnya = 0;
2063 } else {
2064 mapnya = TwoPi / (mapyamax - mapyamin);
2065 }
2066 if (fabs(mapnya - int(0.5 + mapnya)) > 0.001 || mapnya < 1.5) {
2067 std::cerr << m_className << "::UpdatePeriodicityCommon:\n";
2068 std::cerr << " Y-axial symmetry has been requested but the map\n";
2069 std::cerr << " does not cover an integral fraction of 2 pi; reset.\n";
2070 m_yAxiallyPeriodic = false;
2071 m_warning = true;
2072 }
2073 }
2074
2075 if (m_zAxiallyPeriodic) {
2076 if (mapzamin >= mapzamax) {
2077 mapnza = 0;
2078 } else {
2079 mapnza = TwoPi / (mapzamax - mapzamin);
2080 }
2081 if (fabs(mapnza - int(0.5 + mapnza)) > 0.001 || mapnza < 1.5) {
2082 std::cerr << m_className << "::UpdatePeriodicityCommon:\n";
2083 std::cerr << " Z-axial symmetry has been requested but the map\n";
2084 std::cerr << " does not cover an integral fraction of 2 pi; reset.\n";
2085 m_zAxiallyPeriodic = false;
2086 m_warning = true;
2087 }
2088 }
2089
2090 // Not more than 1 rotational symmetry
2094 std::cerr << m_className << "::UpdatePeriodicityCommon:\n";
2095 std::cerr << " Only 1 rotational symmetry allowed; reset.\n";
2096 m_xRotationSymmetry = false;
2097 m_yRotationSymmetry = false;
2098 m_zRotationSymmetry = false;
2099 m_warning = true;
2100 }
2101
2102 // No rotational symmetry as well as axial periodicity
2105 std::cerr << m_className << "::UpdatePeriodicityCommon:\n";
2106 std::cerr << " Not allowed to combine rotational symmetry\n";
2107 std::cerr << " and axial periodicity; reset.\n";
2108 m_xAxiallyPeriodic = false;
2109 m_yAxiallyPeriodic = false;
2110 m_zAxiallyPeriodic = false;
2111 m_xRotationSymmetry = false;
2112 m_yRotationSymmetry = false;
2113 m_zRotationSymmetry = false;
2114 m_warning = true;
2115 }
2116
2117 // In case of rotational symmetry, the x-range should not straddle 0.
2119 if (mapxmin * mapxmax < 0) {
2120 std::cerr << m_className << "::UpdatePeriodicityCommon:\n";
2121 std::cerr << " Rotational symmetry requested, \n";
2122 std::cerr << " but x-range straddles 0; reset.\n";
2123 m_xRotationSymmetry = false;
2124 m_yRotationSymmetry = false;
2125 m_zRotationSymmetry = false;
2126 m_warning = true;
2127 }
2128 }
2129
2130 // Recompute the cell ranges.
2140 if (m_xRotationSymmetry) {
2143 yMinBoundingBox = -std::max(fabs(mapxmin), fabs(mapxmax));
2144 yMaxBoundingBox = +std::max(fabs(mapxmin), fabs(mapxmax));
2145 zMinBoundingBox = -std::max(fabs(mapxmin), fabs(mapxmax));
2146 zMaxBoundingBox = +std::max(fabs(mapxmin), fabs(mapxmax));
2147 } else if (m_yRotationSymmetry) {
2148 xMinBoundingBox = -std::max(fabs(mapxmin), fabs(mapxmax));
2149 xMaxBoundingBox = +std::max(fabs(mapxmin), fabs(mapxmax));
2152 zMinBoundingBox = -std::max(fabs(mapxmin), fabs(mapxmax));
2153 zMaxBoundingBox = +std::max(fabs(mapxmin), fabs(mapxmax));
2154 } else if (m_zRotationSymmetry) {
2155 xMinBoundingBox = -std::max(fabs(mapxmin), fabs(mapxmax));
2156 xMaxBoundingBox = +std::max(fabs(mapxmin), fabs(mapxmax));
2157 yMinBoundingBox = -std::max(fabs(mapxmin), fabs(mapxmax));
2158 yMaxBoundingBox = +std::max(fabs(mapxmin), fabs(mapxmax));
2161 }
2162
2163 if (m_xAxiallyPeriodic) {
2164 yMinBoundingBox = -std::max(std::max(fabs(mapymin), fabs(mapymax)),
2165 std::max(fabs(mapzmin), fabs(mapzmax)));
2166 yMaxBoundingBox = +std::max(std::max(fabs(mapymin), fabs(mapymax)),
2167 std::max(fabs(mapzmin), fabs(mapzmax)));
2168 zMinBoundingBox = -std::max(std::max(fabs(mapymin), fabs(mapymax)),
2169 std::max(fabs(mapzmin), fabs(mapzmax)));
2170 zMaxBoundingBox = +std::max(std::max(fabs(mapymin), fabs(mapymax)),
2171 std::max(fabs(mapzmin), fabs(mapzmax)));
2172 } else if (m_yAxiallyPeriodic) {
2173 xMinBoundingBox = -std::max(std::max(fabs(mapxmin), fabs(mapxmax)),
2174 std::max(fabs(mapzmin), fabs(mapzmax)));
2175 xMaxBoundingBox = +std::max(std::max(fabs(mapxmin), fabs(mapxmax)),
2176 std::max(fabs(mapzmin), fabs(mapzmax)));
2177 zMinBoundingBox = -std::max(std::max(fabs(mapxmin), fabs(mapxmax)),
2178 std::max(fabs(mapzmin), fabs(mapzmax)));
2179 zMaxBoundingBox = +std::max(std::max(fabs(mapxmin), fabs(mapxmax)),
2180 std::max(fabs(mapzmin), fabs(mapzmax)));
2181 } else if (m_zAxiallyPeriodic) {
2182 xMinBoundingBox = -std::max(std::max(fabs(mapxmin), fabs(mapxmax)),
2183 std::max(fabs(mapymin), fabs(mapymax)));
2184 xMaxBoundingBox = +std::max(std::max(fabs(mapxmin), fabs(mapxmax)),
2185 std::max(fabs(mapymin), fabs(mapymax)));
2186 yMinBoundingBox = -std::max(std::max(fabs(mapxmin), fabs(mapxmax)),
2187 std::max(fabs(mapymin), fabs(mapymax)));
2188 yMaxBoundingBox = +std::max(std::max(fabs(mapxmin), fabs(mapxmax)),
2189 std::max(fabs(mapymin), fabs(mapymax)));
2190 }
2191
2193 xMinBoundingBox = -INFINITY;
2194 xMaxBoundingBox = +INFINITY;
2195 }
2197 yMinBoundingBox = -INFINITY;
2198 yMaxBoundingBox = +INFINITY;
2199 }
2201 zMinBoundingBox = -INFINITY;
2202 zMaxBoundingBox = +INFINITY;
2203 }
2204
2205 // Display the range if requested.
2206 if (m_debug) PrintRange();
2207}

Referenced by Garfield::ComponentAnsys121::UpdatePeriodicity(), Garfield::ComponentAnsys123::UpdatePeriodicity(), Garfield::ComponentComsol::UpdatePeriodicity(), Garfield::ComponentCST::UpdatePeriodicity(), and Garfield::ComponentElmer::UpdatePeriodicity().

◆ WeightingField()

virtual void Garfield::ComponentFieldMap::WeightingField ( const double  x,
const double  y,
const double  z,
double &  wx,
double &  wy,
double &  wz,
const std::string &  label 
)
pure 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 from Garfield::ComponentBase.

Implemented in Garfield::ComponentAnsys121, Garfield::ComponentAnsys123, Garfield::ComponentComsol, Garfield::ComponentCST, and Garfield::ComponentElmer.

◆ WeightingPotential()

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

Friends And Related Function Documentation

◆ ViewFEMesh

friend class ViewFEMesh
friend

Definition at line 92 of file ComponentFieldMap.hh.

Member Data Documentation

◆ cellsx

double Garfield::ComponentFieldMap::cellsx
protected

Definition at line 154 of file ComponentFieldMap.hh.

Referenced by PrintRange(), and UpdatePeriodicityCommon().

◆ cellsy

double Garfield::ComponentFieldMap::cellsy
protected

Definition at line 154 of file ComponentFieldMap.hh.

Referenced by PrintRange(), and UpdatePeriodicityCommon().

◆ cellsz

double Garfield::ComponentFieldMap::cellsz
protected

Definition at line 154 of file ComponentFieldMap.hh.

Referenced by PrintRange(), and UpdatePeriodicityCommon().

◆ elements

◆ hasBoundingBox

bool Garfield::ComponentFieldMap::hasBoundingBox
protected

Definition at line 140 of file ComponentFieldMap.hh.

Referenced by Garfield::ComponentCST::SetRange(), and SetRange().

◆ m_deleteBackground

◆ m_is3d

bool Garfield::ComponentFieldMap::m_is3d
protected

◆ m_nMaterials

◆ m_nWarnings

◆ m_warning

◆ mapnxa

double Garfield::ComponentFieldMap::mapnxa
protected

Definition at line 155 of file ComponentFieldMap.hh.

Referenced by PrintRange(), and UpdatePeriodicityCommon().

◆ mapnya

double Garfield::ComponentFieldMap::mapnya
protected

Definition at line 155 of file ComponentFieldMap.hh.

Referenced by PrintRange(), and UpdatePeriodicityCommon().

◆ mapnza

double Garfield::ComponentFieldMap::mapnza
protected

Definition at line 155 of file ComponentFieldMap.hh.

Referenced by PrintRange(), and UpdatePeriodicityCommon().

◆ mapsx

double Garfield::ComponentFieldMap::mapsx
protected

Definition at line 152 of file ComponentFieldMap.hh.

Referenced by Garfield::ComponentCST::SetRange(), and SetRange().

◆ mapsy

double Garfield::ComponentFieldMap::mapsy
protected

Definition at line 152 of file ComponentFieldMap.hh.

Referenced by Garfield::ComponentCST::SetRange(), and SetRange().

◆ mapsz

double Garfield::ComponentFieldMap::mapsz
protected

Definition at line 152 of file ComponentFieldMap.hh.

Referenced by Garfield::ComponentCST::SetRange(), and SetRange().

◆ mapvmax

double Garfield::ComponentFieldMap::mapvmax
protected

◆ mapvmin

double Garfield::ComponentFieldMap::mapvmin
protected

◆ mapxamax

double Garfield::ComponentFieldMap::mapxamax
protected

Definition at line 148 of file ComponentFieldMap.hh.

Referenced by MapCoordinates(), SetRange(), and UpdatePeriodicityCommon().

◆ mapxamin

double Garfield::ComponentFieldMap::mapxamin
protected

Definition at line 147 of file ComponentFieldMap.hh.

Referenced by MapCoordinates(), SetRange(), and UpdatePeriodicityCommon().

◆ mapxmax

double Garfield::ComponentFieldMap::mapxmax
protected

◆ mapxmin

double Garfield::ComponentFieldMap::mapxmin
protected

◆ mapyamax

double Garfield::ComponentFieldMap::mapyamax
protected

Definition at line 148 of file ComponentFieldMap.hh.

Referenced by MapCoordinates(), SetRange(), and UpdatePeriodicityCommon().

◆ mapyamin

double Garfield::ComponentFieldMap::mapyamin
protected

Definition at line 147 of file ComponentFieldMap.hh.

Referenced by MapCoordinates(), SetRange(), and UpdatePeriodicityCommon().

◆ mapymax

double Garfield::ComponentFieldMap::mapymax
protected

◆ mapymin

double Garfield::ComponentFieldMap::mapymin
protected

◆ mapzamax

double Garfield::ComponentFieldMap::mapzamax
protected

Definition at line 148 of file ComponentFieldMap.hh.

Referenced by MapCoordinates(), SetRange(), and UpdatePeriodicityCommon().

◆ mapzamin

double Garfield::ComponentFieldMap::mapzamin
protected

Definition at line 147 of file ComponentFieldMap.hh.

Referenced by MapCoordinates(), SetRange(), and UpdatePeriodicityCommon().

◆ mapzmax

double Garfield::ComponentFieldMap::mapzmax
protected

◆ mapzmin

double Garfield::ComponentFieldMap::mapzmin
protected

◆ materials

◆ nElements

◆ nNodes

◆ nodes

◆ nWeightingFields

◆ setangx

bool Garfield::ComponentFieldMap::setangx
protected

Definition at line 151 of file ComponentFieldMap.hh.

Referenced by SetRange().

◆ setangy

bool Garfield::ComponentFieldMap::setangy
protected

Definition at line 151 of file ComponentFieldMap.hh.

Referenced by SetRange().

◆ setangz

bool Garfield::ComponentFieldMap::setangz
protected

Definition at line 151 of file ComponentFieldMap.hh.

Referenced by SetRange().

◆ wfields

◆ wfieldsOk

◆ xMaxBoundingBox

◆ xMinBoundingBox

◆ yMaxBoundingBox

◆ yMinBoundingBox

◆ zMaxBoundingBox

◆ zMinBoundingBox


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