13 ComponentComsol(std::string mesh, std::string mplist, std::string field);
17 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
18 double& ey,
double& ez,
Medium*& m,
int& status)
override;
19 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
20 double& ey,
double& ez,
double& v,
Medium*& m,
21 int& status)
override;
23 void WeightingField(
const double x,
const double y,
const double z,
24 double& wx,
double& wy,
double& wz,
25 const std::string& label)
override;
28 const std::string& label)
override;
30 Medium*
GetMedium(
const double x,
const double y,
const double z)
override;
32 bool Initialise(std::string header =
"mesh.mphtxt",
33 std::string mplist =
"dielectrics.dat",
34 std::string field =
"field.txt");
43 double& dmax)
override;
48 double dx = round(lhs.
x * 1e6) - round(rhs.
x * 1e6);
49 double dy = round(lhs.
y * 1e6) - round(rhs.
y * 1e6);
50 double dz = round(lhs.
z * 1e6) - round(rhs.
z * 1e6);
51 return dx < 0 || (dx == 0 && (dy < 0 || (dy == 0 && dz < 0)));
Component for importing and interpolating Comsol field maps.
void UpdatePeriodicity() override
Verify periodicities.
Medium * GetMedium(const double x, const double y, const double z) override
Get the medium at a given location (x, y, z).
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label) override
double WeightingPotential(const double x, const double y, const double z, const std::string &label) override
ComponentComsol()
Default constructor.
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status) override
~ComponentComsol()
Destructor.
double GetElementVolume(const unsigned int i) override
void GetAspectRatio(const unsigned int i, double &dmin, double &dmax) override
bool SetWeightingField(std::string file, std::string label)
bool Initialise(std::string header="mesh.mphtxt", std::string mplist="dielectrics.dat", std::string field="field.txt")
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