3#ifndef G_COMPONENT_VOXEL_H
4#define G_COMPONENT_VOXEL_H
21 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
22 double& ey,
double& ez,
double& v,
Medium*& m,
24 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
25 double& ey,
double& ez,
Medium*& m,
int& status);
31 double& eymax,
double& ezmin,
double& ezmax);
32 bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
double& xmax,
33 double& ymax,
double& zmax);
35 void SetMesh(
const unsigned int nx,
const unsigned int ny,
36 const unsigned int nz,
const double xmin,
const double xmax,
37 const double ymin,
const double ymax,
const double zmin,
52 bool LoadData(
const std::string filename, std::string format,
53 const bool withPotential,
const bool withRegion,
54 const double scaleX = 1.,
const double scaleE = 1.,
55 const double scaleP = 1.);
57 bool GetElement(
const double xi,
const double yi,
const double zi,
58 unsigned int& i,
unsigned int& j,
unsigned int& k,
59 bool& xMirrored,
bool& yMirrored,
bool& zMirrored);
60 bool GetElement(
const unsigned int i,
const unsigned int j,
61 const unsigned int k,
double& v,
double& ex,
double& ey,
70 std::map<int, Medium*> m_media;
80 std::vector<std::vector<std::vector<element> > > m_mesh;
82 unsigned int m_nX, m_nY, m_nZ;
83 double m_xMin, m_yMin, m_zMin;
84 double m_xMax, m_yMax, m_zMax;
91 double m_pMin, m_pMax;
96 void UpdatePeriodicity();
void SetMedium(const int i, Medium *m)
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
Medium * GetMedium(const double &x, const double &y, const double &z)
bool GetElectricFieldRange(double &exmin, double &exmax, double &eymin, double &eymax, double &ezmin, double &ezmax)
bool GetVoltageRange(double &vmin, double &vmax)
bool GetElement(const double xi, const double yi, const double zi, unsigned int &i, unsigned int &j, unsigned int &k, bool &xMirrored, bool &yMirrored, bool &zMirrored)
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status)
void SetMesh(const unsigned int nx, const unsigned int ny, const unsigned int nz, const double xmin, const double xmax, const double ymin, const double ymax, const double zmin, const double zmax)
bool LoadData(const std::string filename, std::string format, const bool withPotential, const bool withRegion, const double scaleX=1., const double scaleE=1., const double scaleP=1.)