Garfield++ 5.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
ComponentElmer2d.hh
Go to the documentation of this file.
1#ifndef G_COMPONENT_ELMER_2D_H
2#define G_COMPONENT_ELMER_2D_H
3
5
6namespace Garfield {
7
8/// Component for importing two-dimensional field maps computed by Elmer.
9
11 public:
12 /// Default constructor
14 /// Constructor with a set of field map files, see Initialise().
15 ComponentElmer2d(const std::string& header, const std::string& elist,
16 const std::string& nlist, const std::string& mplist,
17 const std::string& volt, const std::string& unit);
18 /// Destructor
20
21 /** Import a field map from a set of files.
22 * \param header name of the header file
23 (contains the number of elements and nodes).
24 * \param elist name of the file that contains the list of mesh elements
25 * \param nlist name of the file that contains the list of mesh nodes
26 * \param mplist name of the file that contains the material properties
27 * \param volt output of the field solver (list of voltages)
28 * \param unit length unit to be used
29 */
30 bool Initialise(const std::string& header = "mesh.header",
31 const std::string& elist = "mesh.elements",
32 const std::string& nlist = "mesh.nodes",
33 const std::string& mplist = "dielectrics.dat",
34 const std::string& volt = "out.result",
35 const std::string& unit = "cm");
36 /// Import a list of voltages to be used as weighting potentials.
37 bool SetWeightingPotential(const std::string& prnsol,
38 const std::string& label) {
39 return SetWeightingField(prnsol, label);
40 }
41 bool SetWeightingField(const std::string& prnsol, const std::string& label);
42
43 void SetRangeZ(const double zmin, const double zmax);
44 private:
45 bool LoadPotentials(const std::string& prnsol, std::vector<double>& pot);
46};
47}
48#endif
ComponentElmer2d()
Default constructor.
void SetRangeZ(const double zmin, const double zmax)
bool Initialise(const std::string &header="mesh.header", const std::string &elist="mesh.elements", const std::string &nlist="mesh.nodes", const std::string &mplist="dielectrics.dat", const std::string &volt="out.result", const std::string &unit="cm")
bool SetWeightingField(const std::string &prnsol, const std::string &label)
bool SetWeightingPotential(const std::string &prnsol, const std::string &label)
Import a list of voltages to be used as weighting potentials.
ComponentFieldMap()=delete
Default constructor.