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