Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
ComponentAnsys121.hh
Go to the documentation of this file.
1#ifndef G_COMPONENT_ANSYS121_H
2#define G_COMPONENT_ANSYS121_H
3
5
6namespace Garfield {
7
8/// Component for importing and interpolating two-dimensional ANSYS field maps.
9
11
12 public:
13 /// Constructor
15 /// Destructor
17
18 Medium* GetMedium(const double x, const double y, const double z);
19 void ElectricField(const double x, const double y, const double z, double& ex,
20 double& ey, double& ez, Medium*& m, int& status);
21 void ElectricField(const double x, const double y, const double z, double& ex,
22 double& ey, double& ez, double& v, Medium*& m,
23 int& status);
24
25 void WeightingField(const double x, const double y, const double z,
26 double& wx, double& wy, double& wz,
27 const std::string& label);
28
29 double WeightingPotential(const double x, const double y, const double z,
30 const std::string& label);
31
32 bool Initialise(std::string elist = "ELIST.lis",
33 std::string nlist = "NLIST.lis",
34 std::string mplist = "MPLIST.lis",
35 std::string prnsol = "PRNSOL.lis", std::string unit = "cm");
36 bool SetWeightingField(std::string prnsol, std::string label);
37
38 // Range
39 virtual bool IsInBoundingBox(const double x, const double y,
40 const double z) const {
41 return x >= xMinBoundingBox && x <= xMaxBoundingBox &&
42 y >= yMinBoundingBox && y <= yMaxBoundingBox &&
44 }
45
46 void SetRangeZ(const double zmin, const double zmax);
47
48 protected:
49 // Verify periodicities
50 void UpdatePeriodicity();
51
52 double GetElementVolume(const unsigned int i);
53 void GetAspectRatio(const unsigned int i, double& dmin, double& dmax);
54};
55}
56
57#endif
Component for importing and interpolating two-dimensional ANSYS field maps.
bool SetWeightingField(std::string prnsol, std::string label)
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)
virtual bool IsInBoundingBox(const double x, const double y, const double z) const
void UpdatePeriodicity()
Verify periodicities.
bool Initialise(std::string elist="ELIST.lis", std::string nlist="NLIST.lis", std::string mplist="MPLIST.lis", std::string prnsol="PRNSOL.lis", std::string unit="cm")
void GetAspectRatio(const unsigned int i, double &dmin, double &dmax)
double WeightingPotential(const double x, const double y, const double z, const std::string &label)
void SetRangeZ(const double zmin, const double zmax)
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)
Medium * GetMedium(const double x, const double y, const double z)
Get the medium at a given location (x, y, z).
double GetElementVolume(const unsigned int i)
Base class for components based on finite-element field maps.
Abstract base class for media.
Definition: Medium.hh:11