![]() |
Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
|
Interface to neBEM. More...
#include <ComponentNeBem3d.hh>
Classes | |
| struct | Element |
| struct | Primitive |
Public Member Functions | |
| ComponentNeBem3d () | |
| Constructor. | |
| ~ComponentNeBem3d () | |
| Destructor. | |
| Medium * | GetMedium (const double x, const double y, const double z) override |
| Get the medium at a given location (x, y, z). | |
| void | AddPlaneX (const double x, const double voltage) |
| Add a plane at constant x. | |
| void | AddPlaneY (const double y, const double voltage) |
| Add a plane at constant y. | |
| void | AddPlaneZ (const double z, const double voltage) |
| Add a plane at constant z. | |
| unsigned int | GetNumberOfPlanesX () const |
| Get the number of equipotential planes at constant x. | |
| unsigned int | GetNumberOfPlanesY () const |
| Get the number of equipotential planes at constant y. | |
| unsigned int | GetNumberOfPlanesZ () const |
| Get the number of equipotential planes at constant z. | |
| bool | GetPlaneX (const unsigned int i, double &x, double &v) const |
| Retrieve the parameters of a plane at constant x. | |
| bool | GetPlaneY (const unsigned int i, double &y, double &v) const |
| Retrieve the parameters of a plane at constant y. | |
| bool | GetPlaneZ (const unsigned int i, double &z, double &v) const |
| Retrieve the parameters of a plane at constant z. | |
| unsigned int | GetNumberOfPrimitives () const |
| bool | GetPrimitive (const unsigned int i, double &a, double &b, double &c, std::vector< double > &xv, std::vector< double > &yv, std::vector< double > &zv, int &interface, double &v, double &q, double &lambda) const |
| bool | GetPrimitive (const unsigned int i, double &a, double &b, double &c, std::vector< double > &xv, std::vector< double > &yv, std::vector< double > &zv, int &vol1, int &vol2) const |
| bool | GetVolume (const unsigned int vol, int &shape, int &material, double &eps, double &potential, double &charge, int &bc) |
| int | GetVolume (const double x, const double y, const double z) |
| size_t | GetNumberOfElements () const override |
| Return the number of mesh elements. | |
| bool | GetElement (const unsigned int i, std::vector< double > &xv, std::vector< double > &yv, std::vector< double > &zv, int &interface, double &bc, double &lambda) const |
| bool | Initialise () |
| Retrieve surface panels, remove contacts and cut polygons to rectangles and right-angle triangles. | |
| void | SetTargetElementSize (const double length) |
| Set the default value of the target linear size of the elements produced by neBEM's discretisation process. | |
| void | SetMinMaxNumberOfElements (const unsigned int nmin, const unsigned int nmax) |
| Set the smallest and largest allowed number of elements along the lenght of a primitive. | |
| void | SetNewModel (const unsigned int NewModel) |
| void | SetNewMesh (const unsigned int NewMesh) |
| void | SetNewBC (const unsigned int NewBC) |
| void | SetNewPP (const unsigned int NewPP) |
| void | SetModelOptions (const unsigned int NewModel, const unsigned int NewMesh, const unsigned int NewBC, const unsigned int NewPP) |
| void | SetStoreInflMatrix (const unsigned int OptStoreInflMatrix) |
| Set storing options (OptStoreInflMatrix, OptStoreInvMatrix, OptStoreInvMatrix, OptStoreInvMatrix) OptStorePrimitives, OptStorePrimitives) OptStoreElements, OptStoreElements) OptFormattedFile, OptUnformattedFile) | |
| void | SetReadInflMatrix (const unsigned int OptReadInflMatrix) |
| void | SetStoreInvMatrix (const unsigned int OptStoreInvMatrix) |
| void | SetReadInvMatrix (const unsigned int OptReadInvMatrix) |
| void | SetStorePrimitives (const unsigned int OptStorePrimitives) |
| void | SetReadPrimitives (const unsigned int OptReadPrimitives) |
| void | SetStoreElements (const unsigned int OptStoreElements) |
| void | SetReadElements (const unsigned int OptReadElements) |
| void | SetFormattedFile (const unsigned int OptFormattedFile) |
| void | SetUnformattedFile (const unsigned int OptUnformattedFile) |
| void | SetStoreReadOptions (const unsigned int OptStoreInflMatrix, const unsigned int OptReadInflMatrix, const unsigned int OptStoreInvMatrix, const unsigned int OptReadInvMatrix, const unsigned int OptStorePrimitives, const unsigned int OptReadPrimitives, const unsigned int OptStoreElements, const unsigned int OptReadElements, const unsigned int OptFormattedFile, const unsigned int OptUnformattedFile) |
| void | SetReuseModel (void) |
| void | SetSystemChargeZero (const unsigned int OptSystemChargeZero) |
| Other functions to be, are void SetPlotOptions(OptGnuplot=0, OptGnuplotPrimitives=0, OptGnuplotElements=0, OptPrimitiveFiles=0, OptElementFiles=0) | |
| void | SetValidateSolution (const unsigned int OptValidateSolution) |
| void | SetForceValidation (const unsigned int OptForceValidation) |
| void | SetRepeatLHMatrix (const unsigned int OptRepeatLHMatrix) |
| void | SetComputeOptions (const unsigned int OptSystemChargeZero, const unsigned int OptValidateSolution, const unsigned int OptForceValidation, const unsigned int OptRepeatLHMatrix) |
| void | SetFastVolOptions (const unsigned int OptFastVol, const unsigned int OptCreateFastPF, const unsigned int OptReadFastPF) |
| void | SetFastVolVersion (const unsigned int VersionFV) |
| void | SetFastVolBlocks (const unsigned int NbBlocksFV) |
| void | SetWtFldFastVolOptions (const unsigned int IdWtField, const unsigned int OptWtFldFastVol, const unsigned int OptCreateWtFldFastPF, const unsigned int OptReadWtFldFastPF) |
| void | SetWtFldFastVolVersion (const unsigned int IdWtField, const unsigned int VersionWtFldFV) |
| void | SetWtFldFastVolBlocks (const unsigned int IdWtField, const unsigned int NbBlocksWtFldFV) |
| void | SetKnownChargeOptions (const unsigned int OptKnownCharge) |
| void | SetChargingUpOptions (const unsigned int OptChargingUp) |
| void | UseLUInversion () |
| Invert the influence matrix using lower-upper (LU) decomposition. | |
| void | UseSVDInversion () |
| Invert the influence matrix using singular value decomposition. | |
| void | SetPeriodicCopies (const unsigned int nx, const unsigned int ny, const unsigned int nz) |
| Set the parameters | |
| void | GetPeriodicCopies (unsigned int &nx, unsigned int &ny, unsigned int &nz) const |
| Retrieve the number of periodic copies used by neBEM. | |
| void | SetPeriodicityX (const double s) |
| Set the periodic length [cm] in the x-direction. | |
| void | SetPeriodicityY (const double s) |
| Set the periodic length [cm] in the y-direction. | |
| void | SetPeriodicityZ (const double s) |
| Set the periodic length [cm] in the z-direction. | |
| void | SetMirrorPeriodicityX (const double s) |
| Set the periodic length [cm] in the x-direction. | |
| void | SetMirrorPeriodicityY (const double s) |
| Set the periodic length [cm] in the y-direction. | |
| void | SetMirrorPeriodicityZ (const double s) |
| Set the periodic length [cm] in the z-direction. | |
| bool | GetPeriodicityX (double &s) const |
| Get the periodic length in the x-direction. | |
| bool | GetPeriodicityY (double &s) const |
| Get the periodic length in the y-direction. | |
| bool | GetPeriodicityZ (double &s) const |
| Get the periodic length in the z-direction. | |
| void | SetNumberOfThreads (const unsigned int n) |
| Set the number of threads to be used by neBEM. | |
| void | SetPrimAfter (const int n) |
| Set the number of repetitions after which primitive properties are used for the physical field. | |
| void | SetWtFldPrimAfter (const int n) |
| Set the number of repetitions after which primitive properties are used for the weighting field. | |
| void | SetOptRmPrim (const unsigned int n) |
| Set option related to removal of primitives. | |
| void | ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status) override |
| Calculate the drift field at given point. | |
| void | ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status) override |
| Calculate the drift field [V/cm] and potential [V] at (x, y, z). | |
| bool | GetVoltageRange (double &vmin, double &vmax) override |
| Calculate the voltage range [V]. | |
| void | WeightingField (const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label) override |
| Calculate the weighting field at a given point and for a given electrode. | |
| double | WeightingPotential (const double x, const double y, const double z, const std::string &label) override |
| Calculate the weighting potential at a given point. | |
| std::array< double, 3 > | ElectricField (const double x, const double y, const double z) |
| Calculate the drift field [V/cm] at (x, y, z). | |
| Public Member Functions inherited from Garfield::Component | |
| Component ()=delete | |
| Default constructor. | |
| Component (const std::string &name) | |
| Constructor. | |
| virtual | ~Component ()=default |
| Destructor. | |
| virtual void | SetGeometry (Geometry *geo) |
| Define the geometry. | |
| virtual void | Clear () |
| Reset. | |
| std::array< double, 3 > | ElectricField (const double x, const double y, const double z) |
| Calculate the drift field [V/cm] at (x, y, z). | |
| virtual double | ElectricPotential (const double x, const double y, const double z) |
| Calculate the (drift) electrostatic potential [V] at (x, y, z). | |
| virtual const std::vector< double > & | DelayedSignalTimes (const std::string &) |
| Return the time steps at which the delayed weighting potential/field are stored/evaluated. | |
| 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) |
| Calculate the delayed weighting field at a given point and time and for a given electrode. | |
| virtual double | DelayedWeightingPotential (const double x, const double y, const double z, const double t, const std::string &label) |
| Calculate the delayed weighting potential at a given point and time and for a given electrode. | |
| virtual void | DelayedWeightingPotentials (const double x, const double y, const double z, const std::string &label, std::vector< double > &dwp) |
| Calculate the delayed weighting potentials at a given point and for a given electrode, for a set of pre-defined times. | |
| virtual void | MagneticField (const double x, const double y, const double z, double &bx, double &by, double &bz, int &status) |
| Calculate the magnetic field at a given point. | |
| void | SetMagneticField (const double bx, const double by, const double bz) |
| Set a constant magnetic field. | |
| virtual bool | IsReady () |
| Ready for use? | |
| virtual bool | Is3d () |
| Does the component have a 3D field (map)? | |
| 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 | CellSizeX () |
| double | CellSizeY () |
| double | CellSizeZ () |
| virtual bool | GetElementNodes (const size_t, std::vector< size_t > &) const |
| Get the indices of the nodes constituting a given element. | |
| virtual bool | GetElementRegion (const size_t, size_t &, bool &) const |
| Get the region/material of a mesh element and a flag whether it is associated to an active medium. | |
| virtual size_t | GetNumberOfNodes () const |
| Return the number of mesh nodes. | |
| virtual bool | GetNode (const size_t i, double &x, double &y, double &z) const |
| Get the coordinates of a mesh node. | |
| double | 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. | |
| double | 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. | |
| 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) |
| Integrate the normal component of the electric field over a parallelogram. | |
| 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) |
| Integrate the normal component of the weighting field over a parallelogram. | |
| 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) |
| Integrate the electric field flux through a line from (x0,y0,z0) to (x1,y1,z1) along a direction (xp,yp,zp). | |
| virtual bool | CrossedWire (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) |
| Determine whether the line between two points crosses a wire. | |
| virtual bool | InTrapRadius (const double q0, const double x0, const double y0, const double z0, double &xw, double &yw, double &rw) |
| Determine whether a particle is inside the trap radius of a wire. | |
| virtual bool | CrossedPlane (const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, double &xc, double &yc, double &zc) |
| Determine whether the line between two points crosses a plane. | |
| void | EnablePeriodicityX (const bool on=true) |
| Enable simple periodicity in the | |
| void | EnablePeriodicityY (const bool on=true) |
| Enable simple periodicity in the | |
| void | EnablePeriodicityZ (const bool on=true) |
| Enable simple periodicity in the | |
| void | IsPeriodic (bool &perx, bool &pery, bool &perz) |
| Return periodicity flags. | |
| void | EnableMirrorPeriodicityX (const bool on=true) |
| Enable mirror periodicity in the | |
| void | EnableMirrorPeriodicityY (const bool on=true) |
| Enable mirror periodicity in the | |
| void | EnableMirrorPeriodicityZ (const bool on=true) |
| Enable mirror periodicity in the | |
| void | IsMirrorPeriodic (bool &perx, bool &pery, bool &perz) |
| Return mirror periodicity flags. | |
| void | EnableAxialPeriodicityX (const bool on=true) |
| Enable axial periodicity in the | |
| void | EnableAxialPeriodicityY (const bool on=true) |
| Enable axial periodicity in the | |
| void | EnableAxialPeriodicityZ (const bool on=true) |
| Enable axial periodicity in the | |
| void | IsAxiallyPeriodic (bool &perx, bool &pery, bool &perz) |
| Return axial periodicity flags. | |
| void | EnableRotationSymmetryX (const bool on=true) |
| Enable rotation symmetry around the | |
| void | EnableRotationSymmetryY (const bool on=true) |
| Enable rotation symmetry around the | |
| void | EnableRotationSymmetryZ (const bool on=true) |
| Enable rotation symmetry around the | |
| void | IsRotationSymmetric (bool &rotx, bool &roty, bool &rotz) |
| Return rotation symmetry flags. | |
| void | EnableTriangleSymmetricXY (const bool on=true, const bool oct=2) |
| Enable triangular periodicity in the | |
| void | EnableTriangleSymmetricXZ (const bool on=true, const bool oct=2) |
| Enable triangular periodicity in the | |
| void | EnableTriangleSymmetricYZ (const bool on=true, const bool oct=2) |
| Enable triangular periodicity in the | |
| void | EnableDebugging (const bool on=true) |
| Switch on debugging messages. | |
| void | DisableDebugging () |
| Switch off debugging messages. | |
| virtual bool | HasMagneticField () const |
| Does the component have a non-zero magnetic field? | |
| virtual bool | HasTownsendMap () const |
| Does the component have maps of the Townsend coefficient? | |
| virtual bool | HasAttachmentMap () const |
| Does the component have maps of the attachment coefficient? | |
| virtual bool | HasMobilityMap () const |
| Does the component have maps of the low-field mobility? | |
| 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 | ElectronMobility (const double, const double, const double, double &mu) |
| virtual bool | HoleMobility (const double, const double, const double, double &mu) |
| Get the hole Mobility coefficient. | |
| virtual bool | ElectronTownsend (const double, const double, const double, double &alpha) |
| Get the electron Townsend coefficient. | |
| virtual bool | HoleTownsend (const double, const double, const double, double &alpha) |
| Get the hole Townsend 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 double | StepSizeHint () |
| virtual double | CreateGPUTransferObject (ComponentGPU *&comp_gpu) |
| Create and initialise GPU Transfer class. | |
Protected Member Functions | |
| void | Reset () override |
| Reset the component. | |
| void | UpdatePeriodicity () override |
| Verify periodicities. | |
Private Types | |
| enum class | Inversion { LU = 0 , SVD } |
Private Member Functions | |
| void | InitValues () |
| void | ShiftPanels (std::vector< Panel > &panels) const |
| Reduce panels to the basic period. | |
| bool | EliminateOverlaps (const Panel &panel1, const Panel &panel2, std::vector< Panel > &panelsOut, std::vector< int > &itypo) |
| Isolate the parts of polygon 1 that are not hidden by 2 and vice versa. | |
| bool | TraceEnclosed (const std::vector< double > &xl1, const std::vector< double > &yl1, const std::vector< double > &xl2, const std::vector< double > &yl2, const Panel &originalPanel, std::vector< Panel > &newPanels) const |
| void | TraceNonOverlap (const std::vector< double > &xp1, const std::vector< double > &yp1, const std::vector< double > &xl1, const std::vector< double > &yl1, const std::vector< double > &xl2, const std::vector< double > &yl2, const std::vector< int > &flags1, const std::vector< int > &flags2, const std::vector< int > &links1, const std::vector< int > &links2, std::vector< bool > &mark1, int ip1, const Panel &originalPanel, std::vector< Panel > &newPanels) const |
| void | TraceOverlap (const std::vector< double > &xp1, const std::vector< double > &yp1, const std::vector< double > &xp2, const std::vector< double > &yp2, const std::vector< double > &xl1, const std::vector< double > &yl1, const std::vector< double > &xl2, const std::vector< double > &yl2, const std::vector< int > &flags1, const std::vector< int > &links1, const std::vector< int > &links2, std::vector< bool > &mark1, int ip1, int ip2, const Panel &originalPanel, std::vector< Panel > &newPanels) const |
| bool | MakePrimitives (const Panel &panelIn, std::vector< Panel > &panelsOut) const |
| Split a polygon into rectangles and right-angled triangles. | |
| bool | SplitTrapezium (const Panel panelIn, std::vector< Panel > &stack, std::vector< Panel > &panelsOut, const double epsang) const |
| Check whether a polygon contains parallel lines. | |
| unsigned int | NbOfSegments (const double length, const double target) const |
| bool | DiscretizeWire (const Primitive &primitive, const double targetSize, std::vector< Element > &elements) const |
| bool | DiscretizeTriangle (const Primitive &primitive, const double targetSize, std::vector< Element > &elements) const |
| bool | DiscretizeRectangle (const Primitive &prim, const double targetSize, std::vector< Element > &elements) const |
| int | InterfaceType (const Solid::BoundaryCondition bc) const |
Private Attributes | |
| std::vector< Primitive > | m_primitives |
| List of primitives. | |
| std::vector< Element > | m_elements |
| List of elements. | |
| std::array< bool, 6 > | m_ynplan {{false, false, false, false, false, false}} |
| Plane existence. | |
| std::array< double, 6 > | m_coplan {{0., 0., 0., 0., 0., 0.}} |
| Plane coordinates. | |
| std::array< double, 6 > | m_vtplan {{0., 0., 0., 0., 0., 0.}} |
| Plane potentials. | |
| unsigned int | m_newModel = 1 |
| unsigned int | m_newMesh = 1 |
| unsigned int | m_newBC = 1 |
| unsigned int | m_newPP = 1 |
| unsigned int | m_optStoreInflMatrix = 0 |
| unsigned int | m_optReadInflMatrix = 0 |
| unsigned int | m_optStoreInvMatrix = 1 |
| unsigned int | m_optReadInvMatrix = 0 |
| unsigned int | m_optStorePrimitives = 0 |
| unsigned int | m_optReadPrimitives = 0 |
| unsigned int | m_optStoreElements = 0 |
| unsigned int | m_optReadElements = 0 |
| unsigned int | m_optStoreFormatted = 1 |
| unsigned int | m_optStoreUnformatted = 0 |
| unsigned int | m_optSystemChargeZero = 1 |
| unsigned int | m_optValidateSolution = 1 |
| unsigned int | m_optForceValidation = 0 |
| unsigned int | m_optRepeatLHMatrix = 0 |
| unsigned int | m_optFastVol = 0 |
| unsigned int | m_optCreateFastPF = 0 |
| unsigned int | m_optReadFastPF = 0 |
| unsigned int | m_versionFV = 0 |
| unsigned int | m_nbBlocksFV = 0 |
| unsigned int | m_idWtField = 0 |
| unsigned int | m_optWtFldFastVol [11] |
| unsigned int | m_optCreateWtFldFastPF [11] |
| unsigned int | m_optReadWtFldFastPF [11] |
| unsigned int | m_versionWtFldFV [11] |
| unsigned int | m_nbBlocksWtFldFV [11] |
| unsigned int | m_optKnownCharge = 0 |
| unsigned int | m_optChargingUp = 0 |
| unsigned int | m_nThreads = 1 |
| int | m_primAfter = -1 |
| int | m_wtFldPrimAfter = -1 |
| unsigned int | m_optRmPrim = 0 |
| double | m_targetElementSize = 50.0e-4 |
| Target size of elements [cm]. | |
| unsigned int | m_minNbElementsOnLength = 1 |
| Smallest number of elements produced along the axis of a primitive. | |
| unsigned int | m_maxNbElementsOnLength = 100 |
| Largest number of elements produced along the axis of a primitive. | |
| std::array< double, 3 > | m_periodicLength {{0., 0., 0.}} |
| Periodic lengths. | |
| unsigned int | m_nCopiesX = 5 |
| Number of periodic copies along x. | |
| unsigned int | m_nCopiesY = 5 |
| Number of periodic copies along y. | |
| unsigned int | m_nCopiesZ = 5 |
| Number of periodic copies along z. | |
| Inversion | m_inversion = Inversion::LU |
| std::map< std::string, int > | m_wfields |
| Electrode labels and corresponding neBEM weighting field indices. | |
Static Private Attributes | |
| static constexpr double | MinDist = 1.e-6 |
Additional Inherited Members | |
| Protected Attributes inherited from Garfield::Component | |
| std::string | m_className {"Component"} |
| Class name. | |
| Geometry * | m_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. | |
| std::array< bool, 3 > | m_triangleSymmetric = {{false, false, false}} |
| Triangle symmetric in the xy, xz, and yz plane. | |
| int | m_triangleSymmetricOct = 0 |
| Triangle symmetric octant of imported map (0 < phi < Pi/4 --> octant 1). | |
| const std::array< int, 4 > | m_triangleOctRules = {1, 4, 5, 8} |
| Octants where |x| >= |y|. | |
| bool | m_outsideCone = false |
| std::vector< double > | m_wdtimes |
| Time steps at which the delayed weighting potentials/fields are stored. | |
Interface to neBEM.
Definition at line 14 of file ComponentNeBem3d.hh.
|
strongprivate |
| Garfield::ComponentNeBem3d::ComponentNeBem3d | ( | ) |
Constructor.
|
inline |
| void Garfield::ComponentNeBem3d::AddPlaneX | ( | const double | x, |
| const double | voltage ) |
Add a plane at constant x.
| void Garfield::ComponentNeBem3d::AddPlaneY | ( | const double | y, |
| const double | voltage ) |
Add a plane at constant y.
| void Garfield::ComponentNeBem3d::AddPlaneZ | ( | const double | z, |
| const double | voltage ) |
Add a plane at constant z.
|
private |
|
private |
|
private |
| std::array< double, 3 > Garfield::Component::ElectricField | ( | const double | x, |
| const double | y, | ||
| const double | z ) |
Calculate the drift field [V/cm] at (x, y, z).
|
overridevirtual |
Calculate the drift field [V/cm] and potential [V] at (x, y, z).
Implements Garfield::Component.
|
overridevirtual |
Calculate the drift field at given point.
| x,y,z | coordinates [cm]. |
| ex,ey,ez | components of the electric field [V/cm]. |
| m | pointer to the medium at this location. |
| status | status 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::Component.
|
private |
Isolate the parts of polygon 1 that are not hidden by 2 and vice versa.
| bool Garfield::ComponentNeBem3d::GetElement | ( | const unsigned int | i, |
| std::vector< double > & | xv, | ||
| std::vector< double > & | yv, | ||
| std::vector< double > & | zv, | ||
| int & | interface, | ||
| double & | bc, | ||
| double & | lambda ) const |
|
overridevirtual |
Get the medium at a given location (x, y, z).
Reimplemented from Garfield::Component.
|
inlineoverridevirtual |
Return the number of mesh elements.
Reimplemented from Garfield::Component.
Definition at line 54 of file ComponentNeBem3d.hh.
| unsigned int Garfield::ComponentNeBem3d::GetNumberOfPlanesX | ( | ) | const |
Get the number of equipotential planes at constant x.
| unsigned int Garfield::ComponentNeBem3d::GetNumberOfPlanesY | ( | ) | const |
Get the number of equipotential planes at constant y.
| unsigned int Garfield::ComponentNeBem3d::GetNumberOfPlanesZ | ( | ) | const |
Get the number of equipotential planes at constant z.
|
inline |
Definition at line 42 of file ComponentNeBem3d.hh.
|
inline |
Retrieve the number of periodic copies used by neBEM.
Definition at line 159 of file ComponentNeBem3d.hh.
| bool Garfield::ComponentNeBem3d::GetPeriodicityX | ( | double & | s | ) | const |
Get the periodic length in the x-direction.
| bool Garfield::ComponentNeBem3d::GetPeriodicityY | ( | double & | s | ) | const |
Get the periodic length in the y-direction.
| bool Garfield::ComponentNeBem3d::GetPeriodicityZ | ( | double & | s | ) | const |
Get the periodic length in the z-direction.
| bool Garfield::ComponentNeBem3d::GetPlaneX | ( | const unsigned int | i, |
| double & | x, | ||
| double & | v ) const |
Retrieve the parameters of a plane at constant x.
| bool Garfield::ComponentNeBem3d::GetPlaneY | ( | const unsigned int | i, |
| double & | y, | ||
| double & | v ) const |
Retrieve the parameters of a plane at constant y.
| bool Garfield::ComponentNeBem3d::GetPlaneZ | ( | const unsigned int | i, |
| double & | z, | ||
| double & | v ) const |
Retrieve the parameters of a plane at constant z.
| bool Garfield::ComponentNeBem3d::GetPrimitive | ( | const unsigned int | i, |
| double & | a, | ||
| double & | b, | ||
| double & | c, | ||
| std::vector< double > & | xv, | ||
| std::vector< double > & | yv, | ||
| std::vector< double > & | zv, | ||
| int & | interface, | ||
| double & | v, | ||
| double & | q, | ||
| double & | lambda ) const |
| bool Garfield::ComponentNeBem3d::GetPrimitive | ( | const unsigned int | i, |
| double & | a, | ||
| double & | b, | ||
| double & | c, | ||
| std::vector< double > & | xv, | ||
| std::vector< double > & | yv, | ||
| std::vector< double > & | zv, | ||
| int & | vol1, | ||
| int & | vol2 ) const |
|
overridevirtual |
Calculate the voltage range [V].
Implements Garfield::Component.
| int Garfield::ComponentNeBem3d::GetVolume | ( | const double | x, |
| const double | y, | ||
| const double | z ) |
| bool Garfield::ComponentNeBem3d::GetVolume | ( | const unsigned int | vol, |
| int & | shape, | ||
| int & | material, | ||
| double & | eps, | ||
| double & | potential, | ||
| double & | charge, | ||
| int & | bc ) |
| bool Garfield::ComponentNeBem3d::Initialise | ( | ) |
Retrieve surface panels, remove contacts and cut polygons to rectangles and right-angle triangles.
|
private |
|
private |
|
private |
Split a polygon into rectangles and right-angled triangles.
|
private |
|
overrideprotectedvirtual |
Reset the component.
Implements Garfield::Component.
| void Garfield::ComponentNeBem3d::SetChargingUpOptions | ( | const unsigned int | OptChargingUp | ) |
| void Garfield::ComponentNeBem3d::SetComputeOptions | ( | const unsigned int | OptSystemChargeZero, |
| const unsigned int | OptValidateSolution, | ||
| const unsigned int | OptForceValidation, | ||
| const unsigned int | OptRepeatLHMatrix ) |
| void Garfield::ComponentNeBem3d::SetFastVolBlocks | ( | const unsigned int | NbBlocksFV | ) |
| void Garfield::ComponentNeBem3d::SetFastVolOptions | ( | const unsigned int | OptFastVol, |
| const unsigned int | OptCreateFastPF, | ||
| const unsigned int | OptReadFastPF ) |
| void Garfield::ComponentNeBem3d::SetFastVolVersion | ( | const unsigned int | VersionFV | ) |
| void Garfield::ComponentNeBem3d::SetForceValidation | ( | const unsigned int | OptForceValidation | ) |
| void Garfield::ComponentNeBem3d::SetFormattedFile | ( | const unsigned int | OptFormattedFile | ) |
| void Garfield::ComponentNeBem3d::SetKnownChargeOptions | ( | const unsigned int | OptKnownCharge | ) |
| void Garfield::ComponentNeBem3d::SetMinMaxNumberOfElements | ( | const unsigned int | nmin, |
| const unsigned int | nmax ) |
Set the smallest and largest allowed number of elements along the lenght of a primitive.
| void Garfield::ComponentNeBem3d::SetMirrorPeriodicityX | ( | const double | s | ) |
Set the periodic length [cm] in the x-direction.
| void Garfield::ComponentNeBem3d::SetMirrorPeriodicityY | ( | const double | s | ) |
Set the periodic length [cm] in the y-direction.
| void Garfield::ComponentNeBem3d::SetMirrorPeriodicityZ | ( | const double | s | ) |
Set the periodic length [cm] in the z-direction.
| void Garfield::ComponentNeBem3d::SetModelOptions | ( | const unsigned int | NewModel, |
| const unsigned int | NewMesh, | ||
| const unsigned int | NewBC, | ||
| const unsigned int | NewPP ) |
| void Garfield::ComponentNeBem3d::SetNewBC | ( | const unsigned int | NewBC | ) |
| void Garfield::ComponentNeBem3d::SetNewMesh | ( | const unsigned int | NewMesh | ) |
| void Garfield::ComponentNeBem3d::SetNewModel | ( | const unsigned int | NewModel | ) |
| void Garfield::ComponentNeBem3d::SetNewPP | ( | const unsigned int | NewPP | ) |
|
inline |
Set the number of threads to be used by neBEM.
Definition at line 185 of file ComponentNeBem3d.hh.
|
inline |
Set option related to removal of primitives.
Definition at line 198 of file ComponentNeBem3d.hh.
| void Garfield::ComponentNeBem3d::SetPeriodicCopies | ( | const unsigned int | nx, |
| const unsigned int | ny, | ||
| const unsigned int | nz ) |
Set the parameters 
neBEM will use 

| void Garfield::ComponentNeBem3d::SetPeriodicityX | ( | const double | s | ) |
Set the periodic length [cm] in the x-direction.
| void Garfield::ComponentNeBem3d::SetPeriodicityY | ( | const double | s | ) |
Set the periodic length [cm] in the y-direction.
| void Garfield::ComponentNeBem3d::SetPeriodicityZ | ( | const double | s | ) |
Set the periodic length [cm] in the z-direction.
|
inline |
Set the number of repetitions after which primitive properties are used for the physical field.
A negative value (default) implies all the elements are always evaluated.
Definition at line 190 of file ComponentNeBem3d.hh.
| void Garfield::ComponentNeBem3d::SetReadElements | ( | const unsigned int | OptReadElements | ) |
| void Garfield::ComponentNeBem3d::SetReadInflMatrix | ( | const unsigned int | OptReadInflMatrix | ) |
| void Garfield::ComponentNeBem3d::SetReadInvMatrix | ( | const unsigned int | OptReadInvMatrix | ) |
| void Garfield::ComponentNeBem3d::SetReadPrimitives | ( | const unsigned int | OptReadPrimitives | ) |
| void Garfield::ComponentNeBem3d::SetRepeatLHMatrix | ( | const unsigned int | OptRepeatLHMatrix | ) |
| void Garfield::ComponentNeBem3d::SetReuseModel | ( | void | ) |
| void Garfield::ComponentNeBem3d::SetStoreElements | ( | const unsigned int | OptStoreElements | ) |
| void Garfield::ComponentNeBem3d::SetStoreInflMatrix | ( | const unsigned int | OptStoreInflMatrix | ) |
Set storing options (OptStoreInflMatrix, OptStoreInvMatrix, OptStoreInvMatrix, OptStoreInvMatrix) OptStorePrimitives, OptStorePrimitives) OptStoreElements, OptStoreElements) OptFormattedFile, OptUnformattedFile)
| void Garfield::ComponentNeBem3d::SetStoreInvMatrix | ( | const unsigned int | OptStoreInvMatrix | ) |
| void Garfield::ComponentNeBem3d::SetStorePrimitives | ( | const unsigned int | OptStorePrimitives | ) |
| void Garfield::ComponentNeBem3d::SetStoreReadOptions | ( | const unsigned int | OptStoreInflMatrix, |
| const unsigned int | OptReadInflMatrix, | ||
| const unsigned int | OptStoreInvMatrix, | ||
| const unsigned int | OptReadInvMatrix, | ||
| const unsigned int | OptStorePrimitives, | ||
| const unsigned int | OptReadPrimitives, | ||
| const unsigned int | OptStoreElements, | ||
| const unsigned int | OptReadElements, | ||
| const unsigned int | OptFormattedFile, | ||
| const unsigned int | OptUnformattedFile ) |
| void Garfield::ComponentNeBem3d::SetSystemChargeZero | ( | const unsigned int | OptSystemChargeZero | ) |
Other functions to be, are void SetPlotOptions(OptGnuplot=0, OptGnuplotPrimitives=0, OptGnuplotElements=0, OptPrimitiveFiles=0, OptElementFiles=0)
| void Garfield::ComponentNeBem3d::SetTargetElementSize | ( | const double | length | ) |
Set the default value of the target linear size of the elements produced by neBEM's discretisation process.
| void Garfield::ComponentNeBem3d::SetUnformattedFile | ( | const unsigned int | OptUnformattedFile | ) |
| void Garfield::ComponentNeBem3d::SetValidateSolution | ( | const unsigned int | OptValidateSolution | ) |
| void Garfield::ComponentNeBem3d::SetWtFldFastVolBlocks | ( | const unsigned int | IdWtField, |
| const unsigned int | NbBlocksWtFldFV ) |
| void Garfield::ComponentNeBem3d::SetWtFldFastVolOptions | ( | const unsigned int | IdWtField, |
| const unsigned int | OptWtFldFastVol, | ||
| const unsigned int | OptCreateWtFldFastPF, | ||
| const unsigned int | OptReadWtFldFastPF ) |
| void Garfield::ComponentNeBem3d::SetWtFldFastVolVersion | ( | const unsigned int | IdWtField, |
| const unsigned int | VersionWtFldFV ) |
|
inline |
Set the number of repetitions after which primitive properties are used for the weighting field.
A negative value (default) implies all the elements are always evaluated.
Definition at line 195 of file ComponentNeBem3d.hh.
|
private |
Reduce panels to the basic period.
|
private |
Check whether a polygon contains parallel lines.
If it does, split it in rectangular and non-rectangular parts.
|
private |
|
private |
|
private |
|
overrideprotectedvirtual |
Verify periodicities.
Implements Garfield::Component.
|
inline |
Invert the influence matrix using lower-upper (LU) decomposition.
Definition at line 149 of file ComponentNeBem3d.hh.
|
inline |
Invert the influence matrix using singular value decomposition.
Definition at line 151 of file ComponentNeBem3d.hh.
|
overridevirtual |
Calculate the weighting field at a given point and for a given electrode.
| x,y,z | coordinates [cm]. |
| wx,wy,wz | components of the weighting field [1/cm]. |
| label | name of the electrode |
Reimplemented from Garfield::Component.
|
overridevirtual |
Calculate the weighting potential at a given point.
| x,y,z | coordinates [cm]. |
| label | name of the electrode. |
Reimplemented from Garfield::Component.
|
private |
Plane coordinates.
Definition at line 278 of file ComponentNeBem3d.hh.
|
private |
List of elements.
Definition at line 273 of file ComponentNeBem3d.hh.
|
private |
Definition at line 320 of file ComponentNeBem3d.hh.
|
private |
Definition at line 366 of file ComponentNeBem3d.hh.
|
private |
Largest number of elements produced along the axis of a primitive.
Definition at line 355 of file ComponentNeBem3d.hh.
|
private |
Smallest number of elements produced along the axis of a primitive.
Definition at line 353 of file ComponentNeBem3d.hh.
|
private |
Definition at line 317 of file ComponentNeBem3d.hh.
|
private |
Definition at line 325 of file ComponentNeBem3d.hh.
|
private |
Number of periodic copies along x.
Definition at line 359 of file ComponentNeBem3d.hh.
|
private |
Number of periodic copies along y.
Definition at line 361 of file ComponentNeBem3d.hh.
|
private |
Number of periodic copies along z.
Definition at line 363 of file ComponentNeBem3d.hh.
|
private |
Definition at line 285 of file ComponentNeBem3d.hh.
|
private |
Definition at line 284 of file ComponentNeBem3d.hh.
|
private |
Definition at line 283 of file ComponentNeBem3d.hh.
|
private |
Definition at line 286 of file ComponentNeBem3d.hh.
|
private |
Definition at line 334 of file ComponentNeBem3d.hh.
|
private |
Definition at line 331 of file ComponentNeBem3d.hh.
|
private |
Definition at line 314 of file ComponentNeBem3d.hh.
|
private |
Definition at line 322 of file ComponentNeBem3d.hh.
|
private |
Definition at line 313 of file ComponentNeBem3d.hh.
|
private |
Definition at line 309 of file ComponentNeBem3d.hh.
|
private |
Definition at line 328 of file ComponentNeBem3d.hh.
|
private |
Definition at line 296 of file ComponentNeBem3d.hh.
|
private |
Definition at line 315 of file ComponentNeBem3d.hh.
|
private |
Definition at line 290 of file ComponentNeBem3d.hh.
|
private |
Definition at line 292 of file ComponentNeBem3d.hh.
|
private |
Definition at line 294 of file ComponentNeBem3d.hh.
|
private |
Definition at line 323 of file ComponentNeBem3d.hh.
|
private |
Definition at line 310 of file ComponentNeBem3d.hh.
|
private |
Definition at line 347 of file ComponentNeBem3d.hh.
|
private |
Definition at line 295 of file ComponentNeBem3d.hh.
|
private |
Definition at line 297 of file ComponentNeBem3d.hh.
|
private |
Definition at line 289 of file ComponentNeBem3d.hh.
|
private |
Definition at line 291 of file ComponentNeBem3d.hh.
|
private |
Definition at line 293 of file ComponentNeBem3d.hh.
|
private |
Definition at line 298 of file ComponentNeBem3d.hh.
|
private |
Definition at line 307 of file ComponentNeBem3d.hh.
|
private |
Definition at line 308 of file ComponentNeBem3d.hh.
|
private |
Definition at line 321 of file ComponentNeBem3d.hh.
|
private |
|
private |
Definition at line 338 of file ComponentNeBem3d.hh.
|
private |
List of primitives.
Definition at line 242 of file ComponentNeBem3d.hh.
|
private |
Target size of elements [cm].
Definition at line 351 of file ComponentNeBem3d.hh.
|
private |
Definition at line 316 of file ComponentNeBem3d.hh.
|
private |
Definition at line 324 of file ComponentNeBem3d.hh.
|
private |
Plane potentials.
Definition at line 280 of file ComponentNeBem3d.hh.
|
private |
Electrode labels and corresponding neBEM weighting field indices.
Definition at line 369 of file ComponentNeBem3d.hh.
|
private |
Definition at line 343 of file ComponentNeBem3d.hh.
|
private |
Plane existence.
Definition at line 276 of file ComponentNeBem3d.hh.
|
staticconstexprprivate |
Definition at line 349 of file ComponentNeBem3d.hh.