1#ifndef G_COMPONENT_NEBEM_2D_H
2#define G_COMPONENT_NEBEM_2D_H
18 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
19 double& ey,
double& ez,
Medium*& m,
int& status);
21 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
22 double& ey,
double& ez,
double& v,
Medium*& m,
31 void AddPanel(
const double x0,
const double y0,
const double x1,
32 const double y1,
const int bctype,
const double bcval,
34 void AddWire(
const double x0,
const double y0,
const double d,
51 static const int Local2Global = -1;
52 static const int Global2Local = 1;
55 std::vector<std::vector<double> > influenceMatrix;
57 std::vector<std::vector<double> > inverseMatrix;
59 std::vector<double> boundaryConditions;
61 std::vector<double> col;
62 std::vector<int> index;
66 int nCollocationPoints;
69 bool randomCollocation;
85 std::vector<panel> panels;
96 std::vector<wire> wires;
118 std::vector<element> elements;
120 bool matrixInversionFlag;
124 bool ComputeInfluenceMatrix();
125 void SplitElement(
const int iel);
127 bool LUDecomposition();
128 void LUSubstitution();
129 bool GetBoundaryConditions();
131 bool CheckConvergence();
133 void Rotate(
const double xIn,
const double yIn,
const double phi,
134 const int opt,
double& xOut,
double& yOut);
137 bool ComputePotential(
const int gt,
const double len,
const double x,
138 const double y,
double& p) {
142 p = LinePotential(len, x, y);
145 p = WirePotential(len, x, y);
154 bool ComputeFlux(
const int gt,
const double len,
const double rot,
155 const double x,
const double y,
double& ex,
double& ey) {
160 LineFlux(len, x, y, fx, fy);
163 WireFlux(len, x, y, fx, fy);
169 Rotate(fx, fy, rot, Local2Global, ex, ey);
173 double LinePotential(
const double a,
const double x,
const double y);
174 double WirePotential(
const double r0,
const double x,
const double y);
175 void LineFlux(
const double a,
const double x,
const double y,
double& ex,
177 void WireFlux(
const double r0,
const double x,
const double y,
double& ex,
181 void UpdatePeriodicity();
Abstract base class for components.
Two-dimensional implementation of the nearly exact Boundary Element Method.
void SetNumberOfDivisions(const int ndiv)
void EnableRandomCollocation()
void SetMaxNumberOfIterations(const int niter)
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)
void EnableAutoResizing()
void DisableAutoResizing()
void AddWire(const double x0, const double y0, const double d, const double bcval)
void SetNumberOfCollocationPoints(const int ncoll)
void AddPanel(const double x0, const double y0, const double x1, const double y1, const int bctype, const double bcval, const double lambda)
int GetNumberOfElements()
bool GetVoltageRange(double &vmin, double &vmax)
Calculate the voltage range [V].
void SetMinimumElementSize(const double min)
void DisableRandomCollocation()
Abstract base class for media.