Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
ComponentElmer.hh
Go to the documentation of this file.
1// Copied and modified ComponentAnsys123.hh
2
3#ifndef G_COMPONENT_ELMER_H
4#define G_COMPONENT_ELMER_H
5
7
8namespace Garfield {
9
11
12 public:
13 // Constructors
15 ComponentElmer(std::string header, std::string elist, std::string nlist,
16 std::string mplist, std::string volt, std::string unit);
17 // Destructor
19
20 void ElectricField(const double x, const double y, const double z, double& ex,
21 double& ey, double& ez, Medium*& m, int& status);
22 void ElectricField(const double x, const double y, const double z, double& ex,
23 double& ey, double& ez, double& v, Medium*& m,
24 int& status);
25
26 void WeightingField(const double x, const double y, const double z,
27 double& wx, double& wy, double& wz,
28 const std::string label);
29
30 double WeightingPotential(const double x, const double y, const double z,
31 const std::string label);
32
33 Medium* GetMedium(const double& x, const double& y, const double& z);
34
35 bool IsInBoundingBox(const double x, const double y, const double z) {
36 return x >= xMinBoundingBox && x <= xMaxBoundingBox &&
37 y >= yMinBoundingBox && y <= yMaxBoundingBox &&
39 }
40
41 bool Initialise(std::string header = "mesh.header",
42 std::string elist = "mesh.elements",
43 std::string nlist = "mesh.nodes",
44 std::string mplist = "dielectrics.dat",
45 std::string volt = "out.result", std::string unit = "cm");
46
47 bool SetWeightingField(std::string prnsol, std::string label);
48
49 protected:
50 // Verify periodicities
52
53 double GetElementVolume(const int i);
54 void GetAspectRatio(const int i, double& dmin, double& dmax);
55};
56}
57#endif
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)
bool IsInBoundingBox(const double x, const double y, const double z)
double WeightingPotential(const double x, const double y, const double z, const std::string label)
void GetAspectRatio(const int i, double &dmin, double &dmax)
bool Initialise(std::string header="mesh.header", std::string elist="mesh.elements", std::string nlist="mesh.nodes", std::string mplist="dielectrics.dat", std::string volt="out.result", std::string unit="cm")
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string label)
double GetElementVolume(const int i)
Medium * GetMedium(const double &x, const double &y, const double &z)