15 const std::string &field,
const std::string &unit =
"m");
20 const double ymax,
const double zmin,
const double zmax) {
38 bool Initialise(
const std::string &header =
"mesh.mphtxt",
39 const std::string &mplist =
"dielectrics.dat",
40 const std::string &field =
"field.txt",
41 const std::string &unit =
"m");
50 const std::string &label);
57 bool m_timeset =
false;
58 static constexpr double MaxNodeDistance = 1.e-8;
60 bool GetTimeInterval(
const std::string &file);
77 bool CheckInRange(
const double x,
const double y,
const double z)
const {
78 if (!m_range.set)
return true;
80 if (x < m_range.xmin || x > m_range.xmax || y < m_range.ymin ||
81 y > m_range.ymax || z < m_range.zmin || z > m_range.zmax)
87 bool ElementInRange(
const Element& element,
88 const std::vector<Node>& nodes)
const {
90 for (
size_t i = 0; i < 10; i++) {
91 const Node& node = nodes[element.emap[i]];
92 if (!CheckInRange(node.x, node.y, node.z))
return false;
95 if (
m_materials[element.matmap].eps != 1)
return false;
98 bool LoadPotentials(
const std::string& field,
99 std::vector<double>& pot);
bool SetWeightingPotential(const std::string &file, const std::string &label)
Import the weighting potential maps.
void SetTimeInterval(const double mint, const double maxt, const double stept)
Set the time interval of the time-dependent weighting field.
bool Initialise(const std::string &header="mesh.mphtxt", const std::string &mplist="dielectrics.dat", const std::string &field="field.txt", const std::string &unit="m")
bool SetDynamicWeightingPotential(const std::string &file, const std::string &label)
Import the time-dependent weighting field maps.
bool SetWeightingField(const std::string &file, const std::string &label)
ComponentComsol()
Default constructor.
~ComponentComsol()
Destructor.
void SetImportRange(const double xmin, const double xmax, const double ymin, const double ymax, const double zmin, const double zmax)
std::vector< Material > m_materials
ComponentFieldMap()=delete
Default constructor.