1#ifndef G_COMPONENT_NEBEM_3D_H
2#define G_COMPONENT_NEBEM_3D_H
16 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
17 double& ey,
double& ez,
Medium*& m,
int& status)
override;
18 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
19 double& ey,
double& ez,
double& v,
Medium*& m,
20 int& status)
override;
24 bool GetPrimitive(
const unsigned int i,
double& a,
double& b,
double& c,
25 std::vector<double>& xv, std::vector<double>& yv,
26 std::vector<double>& zv,
int& interface,
double& v,
27 double& q,
double& lambda)
const;
30 std::vector<double>& xv, std::vector<double>& yv,
31 std::vector<double>& zv,
int& interface,
double& bc,
32 double& lambda)
const;
34 void Reset()
override;
50 std::vector<double> xv;
52 std::vector<double> yv;
54 std::vector<double> zv;
67 std::vector<Primitive> m_primitives;
71 std::array<double, 3> origin;
77 std::array<std::array<double, 3>, 3> dcos;
79 std::vector<double> xv;
81 std::vector<double> yv;
83 std::vector<double> zv;
89 std::array<double, 3> collocationPoint;
98 std::vector<Element> m_elements;
100 static constexpr double MinDist = 1.e-6;
102 double m_targetElementSize = 50.0e-4;
104 unsigned int m_minNbElementsOnLength = 1;
106 unsigned int m_maxNbElementsOnLength = 100;
109 bool EliminateOverlaps(
const Panel& panel1,
const Panel& panel2,
110 std::vector<Panel>& panelsOut,
111 std::vector<int>& itypo);
113 bool TraceEnclosed(
const std::vector<double>& xl1,
114 const std::vector<double>& yl1,
115 const std::vector<double>& xl2,
116 const std::vector<double>& yl2,
const Panel& originalPanel,
117 std::vector<Panel>& newPanels)
const;
119 void TraceNonOverlap(
120 const std::vector<double>& xp1,
const std::vector<double>& yp1,
121 const std::vector<double>& xl1,
const std::vector<double>& yl1,
122 const std::vector<double>& xl2,
const std::vector<double>& yl2,
123 const std::vector<int>& flags1,
const std::vector<int>& flags2,
124 const std::vector<int>& links1,
const std::vector<int>& links2,
125 std::vector<bool>& mark1,
int ip1,
const Panel& originalPanel,
126 std::vector<Panel>& newPanels)
const;
129 const std::vector<double>& xp1,
const std::vector<double>& yp1,
130 const std::vector<double>& xp2,
const std::vector<double>& yp2,
131 const std::vector<double>& xl1,
const std::vector<double>& yl1,
132 const std::vector<double>& xl2,
const std::vector<double>& yl2,
133 const std::vector<int>& flags1,
const std::vector<int>& links1,
134 const std::vector<int>& links2, std::vector<bool>& mark1,
int ip1,
135 int ip2,
const Panel& originalPanel, std::vector<Panel>& newPanels)
const;
138 bool MakePrimitives(
const Panel& panelIn,
139 std::vector<Panel>& panelsOut)
const;
143 bool SplitTrapezium(
const Panel panelIn, std::vector<Panel>& stack,
144 std::vector<Panel>& panelsOut,
const double epsang)
const;
146 unsigned int NbOfSegments(
const double length,
const double target)
const;
147 bool DiscretizeWire(
const Primitive& primitive,
const double targetSize,
148 std::vector<Element>& elements)
const;
149 bool DiscretizeTriangle(
const Primitive& primitive,
const double targetSize,
150 std::vector<Element>& elements)
const;
151 bool DiscretizeRectangle(
const Primitive& prim,
const double targetSize,
152 std::vector<Element>& elements)
const;
Abstract base class for components.
ComponentNeBem3d()
Constructor.
unsigned int GetNumberOfPrimitives() const
void Reset() override
Reset the component.
void UpdatePeriodicity() override
Verify periodicities.
bool GetVoltageRange(double &vmin, double &vmax) override
Calculate the voltage range [V].
bool GetElement(const unsigned int i, std::vector< double > &xv, std::vector< double > &yv, std::vector< double > &zv, int &interface, double &bc, double &lambda) const
void SetTargetElementSize(const double length)
~ComponentNeBem3d()
Destructor.
bool GetPrimitive(const unsigned int i, double &a, double &b, double &c, std::vector< double > &xv, std::vector< double > &yv, std::vector< double > &zv, int &interface, double &v, double &q, double &lambda) const
unsigned int GetNumberOfElements() const
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status) override
Abstract base class for media.