14 ComponentComsol(std::string mesh, std::string mplist, std::string field);
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,
24 void WeightingField(
const double x,
const double y,
const double z,
25 double& wx,
double& wy,
double& wz,
26 const std::string& label);
29 const std::string& label);
34 const double z)
const {
40 bool Initialise(std::string header =
"mesh.mphtxt",
41 std::string mplist =
"dielectrics.dat",
42 std::string field =
"field.txt");
51 void GetAspectRatio(
const unsigned int i,
double& dmin,
double& dmax);
56 double dx = round(lhs.
x * 1e6) - round(rhs.
x * 1e6);
57 double dy = round(lhs.
y * 1e6) - round(rhs.
y * 1e6);
58 double dz = round(lhs.
z * 1e6) - round(rhs.
z * 1e6);
59 return dx < 0 || (dx == 0 && (dy < 0 || (dy == 0 && dz < 0)));
Component for importing and interpolating Comsol field maps.
Medium * GetMedium(const double x, const double y, const double z)
Get the medium at a given location (x, y, z).
void UpdatePeriodicity()
Verify periodicities.
void GetAspectRatio(const unsigned int i, double &dmin, double &dmax)
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)
double GetElementVolume(const unsigned int i)
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)
bool SetWeightingField(std::string file, std::string label)
double WeightingPotential(const double x, const double y, const double z, const std::string &label)
bool Initialise(std::string header="mesh.mphtxt", std::string mplist="dielectrics.dat", std::string field="field.txt")
virtual bool IsInBoundingBox(const double x, const double y, const double z) const
Base class for components based on finite-element field maps.
void UpdatePeriodicityCommon()
Abstract base class for media.
bool operator()(const ComponentFieldMap::Node &lhs, const ComponentFieldMap::Node &rhs) const