1#ifndef G_COMPONENT_TCAD_BASE_H
2#define G_COMPONENT_TCAD_BASE_H
27 void WeightingField(
const double x,
const double y,
const double z,
28 double& wx,
double& wy,
double& wz,
29 const std::string& label)
override;
31 const std::string& label)
override;
39 bool Initialise(
const std::string& gridfilename,
40 const std::string& datafilename);
53 const std::string& datfile2,
const double dv,
54 const std::string& label);
59 const double x,
const double y,
const double z);
66 void GetRegion(
const size_t ireg, std::string& name,
bool& active)
const;
85 double& vx,
double& vy,
double& vz)
override;
86 bool HoleVelocity(
const double x,
const double y,
const double z,
87 double& vx,
double& vy,
double& vz)
override;
100 bool SetDonor(
const size_t donorNumber,
const double exsec,
101 const double hxsec,
const double concentration);
103 bool SetAcceptor(
const size_t acceptorNumber,
const double exsec,
104 const double hxsec,
const double concentration);
112 double& eta)
override;
113 bool HoleAttachment(
const double x,
const double y,
const double z,
114 double& eta)
override;
117 double& etau)
override;
119 double& htau)
override;
215 std::array<double, 3>
m_bbMin = {{0., 0., 0.}};
216 std::array<double, 3>
m_bbMax = {{0., 0., 0.}};
227 return std::min(element.
type + 1, 4U);
229 virtual bool Interpolate(
const double x,
const double y,
const double z,
230 const std::vector<double>& field,
double& f) = 0;
231 virtual bool Interpolate(
const double x,
const double y,
const double z,
232 const std::vector<std::array<double, N> >& field,
233 double& fx,
double& fy,
double& fz) = 0;
236 size_t FindRegion(
const std::string& name)
const;
238 std::array<bool, N>& mirr)
const;
240 for (
size_t i = 0; i < N; ++i) {
247 bool LoadGrid(
const std::string& gridfilename);
248 bool LoadData(
const std::string& datafilename);
249 bool ReadDataset(std::ifstream& datafile,
const std::string& dataset);
251 std::vector<std::array<double, N> >& wf,
252 std::vector<double>& wp);
Interpolation in a field map created by Sentaurus Device.
bool GetElectronLifetime(const double x, const double y, const double z, double &etau) override
bool InBoundingBox(const std::array< double, N > &x) const
std::vector< double > m_hMobility
bool LoadGrid(const std::string &gridfilename)
void GetRegion(const size_t ireg, std::string &name, bool &active) const
Get the name and "active volume" flag of a region.
void UnsetDriftRegion(const size_t ireg)
Make a region inactive.
ComponentTcadBase(const std::string &name)
Constructor.
std::vector< Defect > m_acceptors
virtual void FillTree()=0
std::vector< std::vector< float > > m_acceptorOcc
double WeightingPotential(const double x, const double y, const double z, const std::string &label) override
std::vector< std::string > m_wlabel
size_t FindRegion(const std::string &name) const
std::vector< std::array< double, 3 > > m_wshift
virtual bool Interpolate(const double x, const double y, const double z, const std::vector< double > &field, double &f)=0
bool GetElectronMobility(const double x, const double y, const double z, double &mob)
bool HasVelocityMap() const override
Does the component have velocity maps?
std::vector< std::vector< float > > m_donorOcc
std::vector< std::array< double, N > > m_vertices
bool GetHoleMobility(const double x, const double y, const double z, double &mob)
bool SetWeightingField(const std::string &datfile1, const std::string &datfile2, const double dv, const std::string &label)
std::vector< Element > m_elements
void EnableVelocityMap(const bool on)
Switch use of the imported velocity map on/off.
bool GetVoltageRange(double &vmin, double &vmax) override
Calculate the voltage range [V].
bool HoleAttachment(const double x, const double y, const double z, double &eta) override
Get the hole attachment coefficient.
std::vector< double > m_eAttachment
std::vector< Region > m_regions
bool LoadWeightingField(const std::string &datafilename, std::vector< std::array< double, N > > &wf, std::vector< double > &wp)
std::vector< std::array< double, N > > m_hVelocity
static unsigned int ElementVertices(const Element &element)
std::array< double, 3 > m_bbMax
bool ReadDataset(std::ifstream &datafile, const std::string &dataset)
size_t GetNumberOfNodes() const
Get the number of vertices in the mesh.
static constexpr size_t nMaxVertices
size_t GetNumberOfRegions() const
Get the number of regions in the device.
std::vector< double > m_epot
bool LoadData(const std::string &datafilename)
std::vector< std::array< double, N > > m_efield
std::vector< std::array< double, N > > m_eVelocity
std::vector< double > m_hLifetime
size_t GetNumberOfDonors()
Get the number of donor states found in the map.
bool GetHoleLifetime(const double x, const double y, const double z, double &htau) override
void MapCoordinates(std::array< double, N > &x, std::array< bool, N > &mirr) const
void PrintRegions() const
List all currently defined regions.
std::vector< double > m_wpot
void EnableAttachmentMap(const bool on)
Switch use of the imported trapping map on/off.
virtual bool Interpolate(const double x, const double y, const double z, const std::vector< std::array< double, N > > &field, double &fx, double &fy, double &fz)=0
bool SetAcceptor(const size_t acceptorNumber, const double exsec, const double hxsec, const double concentration)
Set the properties of an acceptor-type defect state.
ComponentTcadBase()=delete
Default constructor.
bool ElectronAttachment(const double x, const double y, const double z, double &eta) override
Get the electron attachment coefficient.
std::vector< Defect > m_donors
size_t GetNumberOfElements() const
Get the number of elements in the mesh.
size_t GetNumberOfAcceptors()
Get the number of acceptor states found in the map.
bool HasAttachmentMap() const override
Does the component have attachment maps?
bool SetWeightingFieldShift(const std::string &label, const double x, const double y, const double z)
bool Initialise(const std::string &gridfilename, const std::string &datafilename)
std::vector< double > m_eMobility
virtual ~ComponentTcadBase()
Destructor.
void UpdatePeriodicity() override
Verify periodicities.
bool ElectronVelocity(const double x, const double y, const double z, double &vx, double &vy, double &vz) override
Get the electron drift velocity.
void SetDriftRegion(const size_t ireg)
Make a region active ("driftable").
bool HoleVelocity(const double x, const double y, const double z, double &vx, double &vy, double &vz) override
Get the hole drift velocity.
std::vector< std::array< double, N > > m_wfield
bool SetDonor(const size_t donorNumber, const double exsec, const double hxsec, const double concentration)
void SetMedium(const size_t ireg, Medium *m)
Set the medium to be associated to a given region.
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label) override
std::vector< double > m_hAttachment
std::array< double, 3 > m_bbMin
std::vector< double > m_eLifetime
Abstract base class for components.
Abstract base class for media.
std::array< float, N > bbMin
std::array< float, N > bbMax
unsigned int vertex[nMaxVertices]