1#ifndef G_COMPONENT_FIELD_MAP_H
2#define G_COMPONENT_FIELD_MAP_H
23 virtual bool IsInBoundingBox(
const double x,
const double y,
const double z);
24 virtual bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
25 double& xmax,
double& ymax,
double& zmax);
54 bool GetElement(
const int i,
double& vol,
double& dmin,
double& dmax);
56 virtual void ElectricField(
const double x,
const double y,
const double z,
57 double& ex,
double& ey,
double& ez,
Medium*& m,
59 virtual void ElectricField(
const double x,
const double y,
const double z,
60 double& ex,
double& ey,
double& ez,
double& v,
61 Medium*& m,
int& status) = 0;
64 double& wx,
double& wy,
double& wz,
65 const std::string label) = 0;
69 const std::string label) = 0;
109 std::vector<double>
w;
167 int Coordinates3(
double x,
double y,
double z,
double& t1,
double& t2,
168 double& t3,
double& t4,
double jac[4][4],
double& det,
171 int Coordinates4(
double x,
double y,
double z,
double& t1,
double& t2,
172 double& t3,
double& t4,
double jac[4][4],
double& det,
175 int Coordinates5(
double x,
double y,
double z,
double& t1,
double& t2,
176 double& t3,
double& t4,
double jac[4][4],
double& det,
179 int Coordinates12(
double x,
double y,
double z,
double& t1,
double& t2,
180 double& t3,
double& t4,
int imap);
182 int Coordinates13(
double x,
double y,
double z,
double& t1,
double& t2,
183 double& t3,
double& t4,
double jac[4][4],
double& det,
186 int CoordinatesCube(
double x,
double y,
double z,
double& t1,
double& t2,
187 double& t3, TMatrixD*& jac, std::vector<TMatrixD*>& dN,
191 void Jacobian3(
int i,
double u,
double v,
double w,
double& det,
194 void Jacobian5(
int i,
double u,
double v,
double& det,
double jac[4][4]);
196 void Jacobian13(
int i,
double t,
double u,
double v,
double w,
double& det,
199 void JacobianCube(
int i,
double t1,
double t2,
double t3, TMatrixD*& jac,
200 std::vector<TMatrixD*>& dN);
203 int FindElement5(
const double x,
const double y,
const double z,
double& t1,
204 double& t2,
double& t3,
double& t4,
double jac[4][4],
207 int FindElement13(
const double x,
const double y,
const double z,
double& t1,
208 double& t2,
double& t3,
double& t4,
double jac[4][4],
212 double& t1,
double& t2,
double& t3, TMatrixD*& jac,
213 std::vector<TMatrixD*>& dN);
216 void MapCoordinates(
double& xpos,
double& ypos,
double& zpos,
bool& xmirrored,
217 bool& ymirrored,
bool& zmirrored,
double& rcoordinate,
218 double& rotation)
const;
220 void UnmapFields(
double& ex,
double& ey,
double& ez,
double& xpos,
221 double& ypos,
double& zpos,
bool& xmirrored,
bool& ymirrored,
222 bool& zmirrored,
double& rcoordinate,
double& rotation);
224 int ReadInteger(
char* token,
int def,
bool& error);
225 double ReadDouble(
char* token,
double def,
bool& error);
void CalculateElementBoundingBoxes(void)
void DriftMedium(int imat)
double GetPermittivity(const int imat)
int Coordinates13(double x, double y, double z, double &t1, double &t2, double &t3, double &t4, double jac[4][4], double &det, int imap)
int Coordinates5(double x, double y, double z, double &t1, double &t2, double &t3, double &t4, double jac[4][4], double &det, int imap)
void NotDriftMedium(int imat)
void EnableCheckMapIndices()
int GetNumberOfElements() const
double ReadDouble(char *token, double def, bool &error)
void DisableDeleteBackgroundElements()
void Jacobian5(int i, double u, double v, double &det, double jac[4][4])
virtual void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string label)=0
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
std::vector< bool > wfieldsOk
void MapCoordinates(double &xpos, double &ypos, double &zpos, bool &xmirrored, bool &ymirrored, bool &zmirrored, double &rcoordinate, double &rotation) const
virtual double WeightingPotential(const double x, const double y, const double z, const std::string label)=0
std::vector< material > materials
void DisableCheckMapIndices()
Medium * GetMedium(const unsigned int &i) const
int Coordinates12(double x, double y, double z, double &t1, double &t2, double &t3, double &t4, int imap)
void UnmapFields(double &ex, double &ey, double &ez, double &xpos, double &ypos, double &zpos, bool &xmirrored, bool &ymirrored, bool &zmirrored, double &rcoordinate, double &rotation)
void UpdatePeriodicityCommon()
int ReadInteger(char *token, int def, bool &error)
int FindElementCube(const double x, const double y, const double z, double &t1, double &t2, double &t3, TMatrixD *&jac, std::vector< TMatrixD * > &dN)
bool GetElement(const int i, double &vol, double &dmin, double &dmax)
Medium * GetMedium(const double &x, const double &y, const double &z)=0
void JacobianCube(int i, double t1, double t2, double t3, TMatrixD *&jac, std::vector< TMatrixD * > &dN)
int Coordinates4(double x, double y, double z, double &t1, double &t2, double &t3, double &t4, double jac[4][4], double &det, int imap)
virtual double GetElementVolume(const int i)=0
std::vector< element > elements
virtual ~ComponentFieldMap()
virtual void UpdatePeriodicity()=0
int FindElement5(const double x, const double y, const double z, double &t1, double &t2, double &t3, double &t4, double jac[4][4], double &det)
void Jacobian3(int i, double u, double v, double w, double &det, double jac[4][4])
bool checkMultipleElement
std::vector< node > nodes
int Coordinates3(double x, double y, double z, double &t1, double &t2, double &t3, double &t4, double jac[4][4], double &det, int imap)
virtual bool IsInBoundingBox(const double x, const double y, const double z)
void UpdatePeriodicity2d()
int FindElement13(const double x, const double y, const double z, double &t1, double &t2, double &t3, double &t4, double jac[4][4], double &det)
virtual void GetAspectRatio(const int i, double &dmin, double &dmax)=0
void EnableDeleteBackgroundElements()
virtual void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)=0
bool GetVoltageRange(double &vmin, double &vmax)
void Jacobian13(int i, double t, double u, double v, double w, double &det, double jac[4][4])
void SetMedium(const int imat, Medium *medium)
int GetNumberOfMaterials()
virtual void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status)=0
bool cacheElemBoundingBoxes
std::vector< std::string > wfields
int CoordinatesCube(double x, double y, double z, double &t1, double &t2, double &t3, TMatrixD *&jac, std::vector< TMatrixD * > &dN, int imap)
double GetConductivity(const int imat)