1#ifndef G_COMPONENT_BASE_H
2#define G_COMPONENT_BASE_H
27 virtual Medium*
GetMedium(
const double x,
const double y,
const double z);
46 virtual void ElectricField(
const double x,
const double y,
const double z,
47 double& ex,
double& ey,
double& ez,
Medium*& m,
50 virtual void ElectricField(
const double x,
const double y,
const double z,
51 double& ex,
double& ey,
double& ez,
double& v,
52 Medium*& m,
int& status) = 0;
61 virtual void WeightingField(
const double x,
const double y,
const double z,
62 double& wx,
double& wy,
double& wz,
63 const std::string& label);
65 const double z,
const std::string& label);
73 virtual void MagneticField(
const double x,
const double y,
const double z,
74 double& bx,
double& by,
double& bz,
int& status);
82 virtual bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
83 double& xmax,
double& ymax,
double& zmax);
90 virtual bool IsWireCrossed(
const double x0,
const double y0,
const double z0,
91 const double x1,
const double y1,
const double z1,
92 double& xc,
double& yc,
double& zc);
99 virtual bool IsInTrapRadius(
const double q0,
const double x0,
const double y0,
100 const double z0,
double& xw,
double& yw,
196 const double ,
double& eta) {
202 const double ,
double& eta) {
208 const double ,
double& vx,
double& vy,
209 double& vz,
Medium*& ,
int& status) {
215 const double ,
double& vx,
double& vy,
216 double& vz,
Medium*& ,
int& status) {
221 const double ,
double& etau) {
226 const double ,
double& htau) {
Abstract base class for components.
void DisableRotationSymmetryZ()
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 ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)=0
ComponentBase()
Constructor.
void EnableDebugging()
Switch on debugging messages.
virtual ~ComponentBase()
Destructor.
virtual void HoleVelocity(const double, const double, const double, double &vx, double &vy, double &vz, Medium *&, int &status)
Get the hole drift velocity.
void ActivateVelocityMap()
Request velocity to be taken care of by the component (for TCAD).
void DisablePeriodicityY()
void DisableAxialPeriodicityX()
void DisableMirrorPeriodicityX()
void EnableAxialPeriodicityX(const bool on=true)
Enable axial periodicity in the direction.
bool m_zMirrorPeriodic
Mirror periodicity in z.
virtual double WeightingPotential(const double x, const double y, const double z, const std::string &label)
virtual void Clear()
Reset.
bool m_yAxiallyPeriodic
Axial periodicity in y.
GeometryBase * m_geometry
Pointer to the geometry.
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
void EnableRotationSymmetryX(const bool on=true)
Enable rotation symmetry around the axis.
virtual void UpdatePeriodicity()=0
Verify periodicities.
virtual bool IsReady()
Ready for use?
void SetMagneticField(const double bx, const double by, const double bz)
Set a constant magnetic field.
bool m_activeTraps
Does the component have traps?
void DisablePeriodicityZ()
void ActivateTraps()
Request trapping to be taken care of by the component (for TCAD).
void DisableAxialPeriodicityY()
virtual bool GetElectronLifetime(const double, const double, const double, double &etau)
void EnableMirrorPeriodicityZ(const bool on=true)
Enable mirror periodicity in the direction.
virtual void Reset()=0
Geometry checks.
void EnablePeriodicityZ(const bool on=true)
Enable simple periodicity in the direction.
void EnablePeriodicityX(const bool on=true)
Enable simple periodicity in the direction.
virtual void MagneticField(const double x, const double y, const double z, double &bx, double &by, double &bz, int &status)
bool m_zRotationSymmetry
Rotation symmetry around z-axis.
void DisableDebugging()
Switch off debugging messages.
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)
bool m_yRotationSymmetry
Rotation symmetry around y-axis.
void DisablePeriodicityX()
bool m_ready
Ready for use?
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
Get the bounding box coordinates.
bool m_zAxiallyPeriodic
Axial periodicity in z.
bool m_xRotationSymmetry
Rotation symmetry around x-axis.
virtual bool HoleAttachment(const double, const double, const double, double &eta)
Get the hole attachment coefficient.
void EnableMirrorPeriodicityY(const bool on=true)
Enable mirror periodicity in the direction.
virtual bool GetHoleLifetime(const double, const double, const double, double &htau)
bool m_yPeriodic
Simple periodicity in y.
void DectivateVelocityMap()
bool m_yMirrorPeriodic
Mirror periodicity in y.
void DisableMirrorPeriodicityZ()
void EnableMirrorPeriodicityX(const bool on=true)
Enable mirror periodicity in the direction.
virtual void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)
void EnableRotationSymmetryY(const bool on=true)
Enable rotation symmetry around the axis.
void EnableAxialPeriodicityY(const bool on=true)
Enable axial periodicity in the direction.
void EnablePeriodicityY(const bool on=true)
Enable simple periodicity in the direction.
void DisableAxialPeriodicityZ()
bool m_xPeriodic
Simple periodicity in x.
void DisableRotationSymmetryX()
bool m_zPeriodic
Simple periodicity in z.
void EnableAxialPeriodicityZ(const bool on=true)
Enable axial periodicity in the direction.
std::string m_className
Class name.
void DisableRotationSymmetryY()
bool m_xAxiallyPeriodic
Axial periodicity in x.
virtual void SetGeometry(GeometryBase *geo)
Define the geometry.
virtual bool IsInTrapRadius(const double q0, const double x0, const double y0, const double z0, double &xw, double &yw, double &rw)
bool m_debug
Switch on/off debugging messages.
bool m_xMirrorPeriodic
Mirror periodicity in x.
virtual bool ElectronAttachment(const double, const double, const double, double &eta)
Get the electron attachment coefficient.
void DisableMirrorPeriodicityY()
bool m_hasVelocityMap
Does the component have velocity maps?
virtual Medium * GetMedium(const double x, const double y, const double z)
Get the medium at a given location (x, y, z).
void EnableRotationSymmetryZ(const bool on=true)
Enable rotation symmetry around the axis.
virtual bool GetVoltageRange(double &vmin, double &vmax)=0
Calculate the voltage range [V].
Abstract base class for geometry classes.
Abstract base class for media.