Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
neBEM.h
Go to the documentation of this file.
1/*
2(c) 2005, Supratik Mukhopadhayay, Nayana Majumdar
3*/
4#ifndef _neBEM_H_
5#define _neBEM_H_
6
7#ifdef DEFINE_neBEMGLOBAL
8#define neBEMGLOBAL
9#else
10#define neBEMGLOBAL extern
11#endif
12
13#include <math.h>
14#include <stdio.h>
15#include <stdlib.h>
16#include <string.h>
17
18#include "Vector.h"
19
20#define EPS0 8.854187817e-12 // in C2/Nm2 (SI) equivalent to pF/m
21#define MyFACTOR 111.26500547e-12 // 4 pi eps_0 is ofn reqrd for normalization
22// #define EPS0 1.0 // relevant for other physics
23// problems
24// #define MyFACTOR 1.0 // relevant for other physics
25// problems
26
27#define Q_E -1.60217646e-19 // charge of electron in SI units (Coulomb)
28#define Q_I 1.60217646e-19 // charge of ion in SI units (Coulomb)
29
30#ifdef __cplusplus
31namespace neBEM {
32#endif
33
35
36// options to decide whether or not storage of influence and inverted matrices
37// are desired
38// The following, especially OptValidateSolution should, prefereably, be 1
39// Storing geometry and other info consumes disk space
40// RepeatLHMatrix consumes time
54
55// Geometry variables
58neBEMGLOBAL int OrgnlNbPrimitives; // original nmbr may be less than effective
59neBEMGLOBAL int MaxNbVertices; // maximum allowed number (only 4, at present)
60 // allocation from 0 to MaxNbVertices - 1
61
62// Related to volumes
65
66// Related to primitives
68 *InterfaceType; // removed redundant *PrimCnt in V1.7.2
91
92// Related to both primitives and elements
93// Beginning and ending element numbers on a griven primitive
95
96// Related to surfaces and wires
100
101// Related to elements
102// minimum number of elements allowed along Length
104// maximum number of elements allowed along Length
106// user requested length of along Length
108
109// int MinNbElementsOnSurface; // minimum number of elements allowed on a
110// surface int MaxNbElementsOnSurface; // maximum number of elements allowed on
111// a surface double ElementAreaRqstd; // user requested area of each element
112neBEMGLOBAL int EleCntr; // Element counter
113neBEMGLOBAL int NbElements; // total number of elements
115
116// Related to solution constraints
117// Whether total charge in the system is zero
119// which eqn / unknown is related to this constraint
121// voltage shift necessary to enforce zero charge
123
124neBEMGLOBAL int NbFloatingConductors; // Number of floating conductors
125// which eqn / unknown is related to this constraint
127// value of floating potential on the conductor
129
130typedef struct {
131 short int Type; // 4: rectangular, 3: triangular, 2: linear (wire)
132 Point3D Origin; // centroid / barycenter / axis-center (local origin)
133 Point3D Vertex[4]; // element vertex begins with index 0 and goes to max 3
134 double LX, LZ; // length, breadth / base, height / radius, length
135 double dA; // area
136 DirnCosn3D DC; // Direction cosines
137} GeomProp;
138
139// 1: conductor at known potential, 2: charged conductor, 3: floating conductor
140// 4: DD interface satisfying continuity, 5: charged DD interface
141// 6: E parallel symmetry, 7: E perpendicular symmetry.
142typedef struct {
143 short int Type;
144 double Lambda; // ratio of dielectric permiitivites
145} ElecProp;
146
147typedef struct {
148 short int NbOfBCs; // nb of boundary conditions on this element
149 Point3D CollPt; // Collocation (only one, for the time being)
150 double Value; // potential / charge density
151} BCProp;
152
153// we need a reference to the volumes (volref1 and volref2) that an element
154// belongs to
155typedef struct {
156 short int DeviceNb; // each setup can be made of several devices
157 int ComponentNb; // each device made of several components
158 int PrimitiveNb; // each component can be made of several primitives
160 int Id; // element id number - each made of several elements
161 // Point3D Vertex[4]; // since we consider only upto rectangles: within G
162 GeomProp G; // geomtype, origin, vertex, lengths, area, direction cosines
163 ElecProp E; // electype, BC value
164 BCProp BC; // boundary condn properties (should this BC thing be freed?)
165 double Solution; // accumulated charge, or similar solution
166 double Assigned; // assigned charge, or similar property
167} Element;
168
169neBEMGLOBAL Element *EleArr; // represents an array of elements
170
171// Number of points, lines, areas, volumes with known property (density) values
173// Details of each of the above entities with known property
174// Point with known charge
175typedef struct {
176 int Nb;
177 Point3D P; // available from Vector.h
178 double Assigned;
179} PointKnCh;
180
182
183// Line with known linear charge density
184typedef struct {
185 int Nb;
186 Point3D Start; // the line extends from Start to Stop
188 double Radius;
189 double Assigned;
190} LineKnCh;
191
193
194// Surface with known charge density
195// Surfaces can be right-triangular or rectangular
196// Needs to be extended to arbitrary polygons
197typedef struct {
198 int Nb;
199 int NbVertices; // number of vertices defining the surface (restricted to 4)
200 Point3D Vertex[5]; // the surface is defined by Vertex[1-4]
201 double Assigned;
202} AreaKnCh;
203
205
206// Volumes with known charge density
207// Volumes can be tetrahedral or rectangular
208// Needs to be extended to arbitrarly-shaped volumes
209typedef struct {
210 int Nb;
211 int NbVertices; // number of vertices defining the volume (restricted to 8)
212 Point3D Vertex[9];
213 double Assigned;
214} VolumeKnCh;
215
217
218// Various flags that need to be passed on to the solver to decide from what
219// level the solution should proceed
221// Various counters to keep track of the various possible solutions for a
222// given device.
223// The first of these variables is being maintained for possible future use.
225
226// Computation parameter
227// Variables used throughout the solution procedure
228// Unless we have an over- or under-determined system, the number of equations
229// and unknowns will be the same.
230// The number of equations will be as follows:
231// One for each element that carries an unknown charge density
232// One for each unknown related to each constraint equation
233neBEMGLOBAL int NbConstraints; // Arising of different physical considerations
234neBEMGLOBAL int NbEqns, NbUnknowns, // rows and columns in [Inf]
236neBEMGLOBAL int OptSVD, OptLU, OptGSL; // option SVD, LU and GSL decompositions
239
240// Variables to facilitate time stepping
243
244// Variables related to geometry viewing
245neBEMGLOBAL char GnuplotTmpDir[256], GnuplotScriptFile[256]; // Dirs and files
246
247// Outputs are written in various subdirectories.
248// DeviceOutDir:
249// The top level directory for a device under study.
250// ModelOutDir:
251// Files related to a unique model used to define a given device are kept here.
252// MeshOutDir :
253// Files down to elements used to discretize primitves device are kept here.
254// This directory is also the place to store the inverted matrix file.
255// BCOutDir :
256// Files down to RHS, solution vectors, XChk are kept here.
257// PPDir:
258// Rest of the files, i.e., those related to post-processing are kept here.
259// In addition, we have the GViewDir directory (as a subdirectory of each
260// MeshOutDir) wherein the gnuplot files needed to view the element geometry,
261// primitives, elements and mesh are stored.
264
265// Source code: PreProcess/ReTrim.c
266neBEMGLOBAL int SurfaceElements(int prim, int nvertex, double xvert[],
267 double yvert[], double zvert[], double xnorm,
268 double ynorm, double znorm, int volref1,
269 int volref2, int inttype, double potential,
270 double charge, double lambda, int NbSegX,
271 int NbSegZ);
272neBEMGLOBAL int WireElements(int prim, int nvertex, double xvert[],
273 double yvert[], double zvert[], double radius,
274 int volref1, int volref2, int inttype,
275 double potential, double charge, double lambda,
276 int NbWireSeg);
278neBEMGLOBAL int AnalyzePrimitive(int, int *, int *);
279neBEMGLOBAL int AnalyzeWire(int, int *);
280neBEMGLOBAL int AnalyzeSurface(int, int *, int *);
281neBEMGLOBAL int DiscretizeWire(int prim, int nvertex, double xvert[],
282 double yvert[], double zvert[], double radius,
283 int volref1, int volref2, int inttype,
284 double potential, double charge, double lambda,
285 int NbSegs);
286neBEMGLOBAL int DiscretizeTriangle(int prim, int nvertex, double xvert[],
287 double yvert[], double zvert[], double xnorm,
288 double ynorm, double znorm, int volref1,
289 int volref2, int inttype, double potential,
290 double charge, double lambda, int NbSegX,
291 int NbSegZ);
292neBEMGLOBAL int DiscretizeRectangle(int prim, int nvertex, double xvert[],
293 double yvert[], double zvert[],
294 double xnorm, double ynorm, double znorm,
295 int volref1, int volref2, int inttype,
296 double potential, double charge,
297 double lambda, int NbSegX, int NbSegZ);
298neBEMGLOBAL int DiscretizePolygon(int prim, int nvertex, double xvert[],
299 double yvert[], double zvert[], double xnorm,
300 double ynorm, double znorm, int volref1,
301 int volref2, int inttype, double potential,
302 double charge, double lambda, int NbSegX,
303 int NbSegZ);
305
306// Source code: Solve/neBEM.c
308neBEMGLOBAL int ReadSolution(void);
309
310// Apparently, localPt need not be passed to ComputeInfluence. This is true if
311// there are no repetitions / reflections. With these and similar possibilities,
312// localPt may not strictly be computed using only the details of the field
313// and source elements. It would further require information on repetition and
314// reflection which can lead to a quick increase in the amount of arguments
315// being passed to the function and, as a result, detrimental to the efficiency.
316neBEMGLOBAL double ComputeInfluence(int fld, int src, Point3D *localPt,
317 DirnCosn3D *DirCos);
318neBEMGLOBAL double SatisfyValue(int src, Point3D *localPt);
319neBEMGLOBAL double SatisfyContinuity(int fld, int src, Point3D *localPt,
320 DirnCosn3D *DirCos);
321// neBEMGLOBAL double EffectChUp(int caseid, int fld);
322neBEMGLOBAL double EffectChUp(int fld);
323neBEMGLOBAL double ValueChUp(int fld);
325// neBEMGLOBAL double EffectKnCh(int caseid, int fld);
326neBEMGLOBAL double EffectKnCh(int fld);
327neBEMGLOBAL double ValueKnCh(int fld);
328neBEMGLOBAL double ContinuityKnCh(int fld);
329
330// Weighting field charge density solution
331// arguments: boundary condition array, and the solution (charge density, for
332// electrostatic problems) array; returns success (0) or failure (non-zero)
334neBEMGLOBAL int WeightingFieldSolution(int NbPrimsWtField,
335 int PrimListWtField[],
336 double WtFieldChDen[]);
337neBEMGLOBAL Point3D ReflectPrimitiveOnMirror(char Axis, int prim, Point3D srcpt,
338 Point3D fieldpt, double distance,
339 DirnCosn3D *DirCos);
340neBEMGLOBAL Point3D ReflectOnMirror(char Axis, int elesrc, Point3D srcpt,
341 Point3D fieldpt, double distance,
342 DirnCosn3D *DirCos);
343
344// Source code: Solve/ComputeProperties.c
345// Compute potential and flux components at globalPt due to all elements
346neBEMGLOBAL int PFAtPoint(Point3D *globalPt, double *Pot, Vector3D *Flux);
347neBEMGLOBAL int ElePFAtPoint(Point3D *globalPt, double *Pot, Vector3D *Flux);
348neBEMGLOBAL int KnChPFAtPoint(Point3D *globalPt, double *Pot, Vector3D *Flux);
349
350// Choose between element and primitive representations
352
353// Variables and functions related to voxelized output for Garfield++
356// inputs for the voxelized volume
357typedef struct {
358 double Xmin;
359 double Xmax;
360 double Ymin;
361 double Ymax;
362 double Zmin;
363 double Zmax;
364 double XStagger;
365 double YStagger;
366 double ZStagger;
370} VoxelVol;
372
373// Compute flux components, potential and regions within the voxelized
374// volume and store them in an external file
375neBEMGLOBAL int VoxelFPR(void);
376
377// Variables and functions related to output 3dMap for Garfield++
381// inputs for the voxelized volume
382typedef struct {
383 double Xmin;
384 double Xmax;
385 double Ymin;
386 double Ymax;
387 double Zmin;
388 double Zmax;
389 double XStagger;
390 double YStagger;
391 double ZStagger;
395} MapVol;
397
398// Compute flux components, potential and regions within the 3dMap volume
399// and store them in an external file
400neBEMGLOBAL int MapFPR(void);
401
402// Variables and functions related to the FAST algorithm
409// inputs for the fast volume
410typedef struct {
411 double LX;
412 double LY;
413 double LZ;
414 double CrnrX;
415 double CrnrY;
416 double CrnrZ;
417 double YStagger;
423// inputs for each block within the fast volume
441// The following could have been members of a structure
442// (see above for examples of creating arrays of structures)
444neBEMGLOBAL double ****FastFX, ****FastFY, ****FastFZ;
451
452// Compute potential and flux components within the FAST volume
453neBEMGLOBAL int FastVolPF(void);
454neBEMGLOBAL int FastVolElePF(void);
456
457// Compute potential and flux components at globalPt using FAST algorithm
458neBEMGLOBAL int FastPFAtPoint(Point3D *globalPt, double *Pot, Vector3D *Flux);
459neBEMGLOBAL int FastElePFAtPoint(Point3D *globalPt, double *Pot,
460 Vector3D *Flux);
461neBEMGLOBAL int FastKnChPFAtPoint(Point3D *globalPt, double *Pot,
462 Vector3D *Flux);
463
464// variables related to FIXED weighting field
470
471// Variable related to the weighting field FAST algorithm
478// inputs for the fast volume
479typedef struct {
480 double LX;
481 double LY;
482 double LZ;
483 double CrnrX;
484 double CrnrY;
485 double CrnrZ;
486 double YStagger;
492// inputs for each block within the fast volume
510// The following could have been members of a structure
511// (see above for examples of creating arrays of structures)
516
517// Compute weighting potential and flux components within the FAST volume
519
520// Compute weighting potential and flux components at globalPt using FAST
521// algorithm
522neBEMGLOBAL int WtFldFastPFAtPoint(Point3D *globalPt, double *Pot,
523 Vector3D *Flux);
524
525// Compute potential at xlocal, ylocal, zlocal due to an element defined by
526// gtsrc (type), lxsrc (dimension), lzsrc (dimension), (length), dA (area)
527// xlocal, ylocal, zlocal are measured in the element local coordinate system
528// and the charge on the element is assumed to be unity
529neBEMGLOBAL double GetPotential(int src, Point3D *localPt);
530
531// Flux components at xlocal, ylocal, zlocal due to an element defined by
532// gtsrc (type), lxsrc (dimension), lzsrc (dimension), (length), dA (area)
533// xlocal, ylocal, zlocal and flux components are in the element local
534// coordinate system and the charge on the element is assumed to be unity
535neBEMGLOBAL void GetFluxGCS(int src, Point3D *localPt, Vector3D *Flux);
536neBEMGLOBAL void GetFlux(int src, Point3D *localPt, Vector3D *Flux);
537neBEMGLOBAL double RecPot(int src, Point3D *localPt);
538neBEMGLOBAL double TriPot(int src, Point3D *localPt);
539neBEMGLOBAL double WirePot(int src, Point3D *localPt);
540neBEMGLOBAL void RecFlux(int src, Point3D *localPt, Vector3D *Flux);
541neBEMGLOBAL void TriFlux(int src, Point3D *localPt, Vector3D *Flux);
542neBEMGLOBAL void WireFlux(int src, Point3D *localPt, Vector3D *Flux);
543
544// get both potential and flux
545neBEMGLOBAL void GetPFGCS(int type, double a, double b, Point3D *localPt,
546 double *Pot, Vector3D *Flux, DirnCosn3D *DirCos);
547neBEMGLOBAL void GetPF(int type, double a, double b, double x, double y, double z,
548 double *Pot, Vector3D *Flux);
549neBEMGLOBAL void RecPF(double a, double b, double x, double y, double z,
550 double *Pot, Vector3D *Flux);
551neBEMGLOBAL void TriPF(double a, double b, double x, double y, double z,
552 double *Pot, Vector3D *Flux);
553neBEMGLOBAL void WirePF(double rW, double lW, double x, double y, double z,
554 double *Pot, Vector3D *Flux);
555neBEMGLOBAL void GetPrimPFGCS(int src, Point3D *localPt, double *Pot,
556 Vector3D *Flux, DirnCosn3D *DirCos);
557neBEMGLOBAL void GetPrimPF(int src, Point3D *localPt, double *Pot,
558 Vector3D *Flux);
559neBEMGLOBAL void RecPrimPF(int src, Point3D *localPt, double *Pot,
560 Vector3D *Flux);
561neBEMGLOBAL void TriPrimPF(int src, Point3D *localPt, double *Pot,
562 Vector3D *Flux);
563neBEMGLOBAL void WirePrimPF(int src, Point3D *localPt, double *Pot,
564 Vector3D *Flux);
565
566// Weighting field values
567neBEMGLOBAL int WtPFAtPoint(Point3D *globalPt, double *Pot, Vector3D *Flux,
568 int Id);
569
570#ifdef __cplusplus
571} // namespace
572#endif
573
574#endif
int KnChPFAtPoint(Point3D *globalP, double *Potential, Vector3D *globalF)
int FastVolPF(void)
int VoxelFPR(void)
int FastVolElePF(void)
void GetFlux(int ele, Point3D *localP, Vector3D *localF)
double GetPotential(int ele, Point3D *localP)
int FastPFAtPoint(Point3D *globalP, double *Potential, Vector3D *globalF)
void WirePrimPF(int prim, Point3D *localP, double *Potential, Vector3D *localF)
int FastKnChPFAtPoint(Point3D *globalP, double *Potential, Vector3D *globalF)
double TriPot(int ele, Point3D *localP)
void RecPrimPF(int prim, Point3D *localP, double *Potential, Vector3D *localF)
double WirePot(int ele, Point3D *localP)
void TriFlux(int ele, Point3D *localP, Vector3D *localF)
void RecFlux(int ele, Point3D *localP, Vector3D *localF)
void GetPrimPFGCS(int prim, Point3D *localP, double *Potential, Vector3D *globalF, DirnCosn3D *DirCos)
double RecPot(int ele, Point3D *localP)
int WtPFAtPoint(Point3D *globalP, double *Potential, Vector3D *globalF, int IdWtField)
void WireFlux(int ele, Point3D *localP, Vector3D *localF)
void RecPF(double a, double b, double x, double y, double z, double *Potential, Vector3D *localF)
int ElePFAtPoint(Point3D *globalP, double *Potential, Vector3D *globalF)
void TriPF(double a, double b, double x, double y, double z, double *Potential, Vector3D *localF)
void GetPFGCS(int type, double a, double b, Point3D *localP, double *Potential, Vector3D *globalF, DirnCosn3D *DirCos)
int PFAtPoint(Point3D *globalP, double *Potential, Vector3D *globalF)
int FastElePFAtPoint(Point3D *, double *, Vector3D *)
int MapFPR(void)
void TriPrimPF(int prim, Point3D *localP, double *Potential, Vector3D *localF)
void WirePF(double rW, double lW, double x, double y, double z, double *Potential, Vector3D *localF)
void GetPrimPF(int prim, Point3D *localP, double *Potential, Vector3D *localF)
void GetPF(int type, double a, double b, double x, double y, double z, double *Potential, Vector3D *localF)
void GetFluxGCS(int ele, Point3D *localP, Vector3D *globalF)
int WtFldFastPFAtPoint(Point3D *globalP, double *Potential, Vector3D *globalF)
int ComputeSolution(void)
Definition: neBEM.c:36
double ComputeInfluence(int elefld, int elesrc, Point3D *localP, DirnCosn3D *DirCos)
Definition: neBEM.c:1579
double ValueKnCh(int elefld)
Definition: neBEM.c:2035
double EffectChUp(int elefld)
Definition: neBEM.c:2364
double ContinuityKnCh(int elefld)
Definition: neBEM.c:2182
Point3D ReflectPrimitiveOnMirror(char Axis, int primsrc, Point3D srcpt, Point3D fldpt, double distance, DirnCosn3D *MirroredDC)
Definition: neBEM.c:3742
int WeightingFieldSolution(int NbPrimsWtField, int PrimListWtField[], double solnarray[])
Definition: neBEM.c:3688
double ValueChUp(int elefld)
Definition: neBEM.c:2367
double SatisfyContinuity(int elefld, int elesrc, Point3D *localP, DirnCosn3D *DirCos)
Definition: neBEM.c:1724
Point3D ReflectOnMirror(char Axis, int elesrc, Point3D srcpt, Point3D fldpt, double distance, DirnCosn3D *MirroredDC)
Definition: neBEM.c:3831
int ReadSolution(void)
Definition: neBEM.c:3618
double SatisfyValue(int elesrc, Point3D *localP)
Definition: neBEM.c:1686
double EffectKnCh(int elefld)
Definition: neBEM.c:2028
neBEMGLOBAL double ** InvMat
Definition: neBEM.h:237
neBEMGLOBAL Element * EleArr
Definition: neBEM.h:169
neBEMGLOBAL double * ApplPot
Definition: neBEM.h:75
neBEMGLOBAL double **** FastFY
Definition: neBEM.h:444
neBEMGLOBAL int DebugLevel
Definition: neBEM.h:235
neBEMGLOBAL int NbVolumes
Definition: neBEM.h:56
neBEMGLOBAL int NbFloatCon
Definition: neBEM.h:126
neBEMGLOBAL int * PeriodicInY
Definition: neBEM.h:79
neBEMGLOBAL double VFloatCon
Definition: neBEM.h:128
neBEMGLOBAL int * volMaterial
Definition: neBEM.h:63
neBEMGLOBAL int OptWtFldReadFastPF
Definition: neBEM.h:475
neBEMGLOBAL int OptStaggerFastVol
Definition: neBEM.h:404
neBEMGLOBAL double **** FastFZ
Definition: neBEM.h:444
neBEMGLOBAL int BoundaryConditions(void)
Definition: ReTriM.c:2121
neBEMGLOBAL int MeshCntr
Definition: neBEM.h:224
neBEMGLOBAL double **** WtFldFastStgFZ
Definition: neBEM.h:515
neBEMGLOBAL int * NbElmntsOnPrim
Definition: neBEM.h:94
neBEMGLOBAL int PPCntr
Definition: neBEM.h:224
neBEMGLOBAL double **** WtFldFastFZ
Definition: neBEM.h:513
neBEMGLOBAL int OptSVD
Definition: neBEM.h:236
neBEMGLOBAL int OptInvMatProc
Definition: neBEM.h:41
neBEMGLOBAL double **** FastStgFZ
Definition: neBEM.h:446
neBEMGLOBAL int EleCntr
Definition: neBEM.h:112
neBEMGLOBAL double * ZNorm
Definition: neBEM.h:71
neBEMGLOBAL int OptVoxel
Definition: neBEM.h:354
neBEMGLOBAL int OptRepeatLHMatrix
Definition: neBEM.h:51
neBEMGLOBAL char MeshOutDir[256]
Definition: neBEM.h:263
neBEMGLOBAL int * MirrorTypeZ
Definition: neBEM.h:81
neBEMGLOBAL double * RHS
Definition: neBEM.h:237
neBEMGLOBAL double **** FastStgPot
Definition: neBEM.h:445
neBEMGLOBAL double * OmitVolCrnrZ
Definition: neBEM.h:434
neBEMGLOBAL double * MirrorDistYFromOrigin
Definition: neBEM.h:82
neBEMGLOBAL int OptStorePrimitives
Definition: neBEM.h:45
neBEMGLOBAL int MaxNbVertices
Definition: neBEM.h:59
neBEMGLOBAL int * BndPlaneInYMax
Definition: neBEM.h:85
neBEMGLOBAL double **** FastStgFXKnCh
Definition: neBEM.h:450
neBEMGLOBAL double * XBndPlaneInXMax
Definition: neBEM.h:87
neBEMGLOBAL int * WtFldBlkNbYCells
Definition: neBEM.h:494
neBEMGLOBAL double * WtFldOmitVolLX
Definition: neBEM.h:498
neBEMGLOBAL double ** ZVertex
Definition: neBEM.h:71
neBEMGLOBAL double FixedWtFieldZ
Definition: neBEM.h:469
neBEMGLOBAL int * NbWireSeg
Definition: neBEM.h:99
neBEMGLOBAL double * YBndPlaneInYMin
Definition: neBEM.h:86
neBEMGLOBAL int * NbSurfSegX
Definition: neBEM.h:98
neBEMGLOBAL int OptWtFldFastVol
Definition: neBEM.h:472
neBEMGLOBAL int ** OrgnlToEffPrim
Definition: neBEM.h:69
neBEMGLOBAL int OptLU
Definition: neBEM.h:236
neBEMGLOBAL double **** WtFldFastFX
Definition: neBEM.h:513
neBEMGLOBAL MapVol Map
Definition: neBEM.h:396
neBEMGLOBAL double ElementLengthRqstd
Definition: neBEM.h:107
neBEMGLOBAL double * ZPeriod
Definition: neBEM.h:80
neBEMGLOBAL int NewModel
Definition: neBEM.h:220
neBEMGLOBAL PointKnCh * PointKnChArr
Definition: neBEM.h:181
neBEMGLOBAL double * OmitVolLX
Definition: neBEM.h:429
neBEMGLOBAL char PPOutDir[256]
Definition: neBEM.h:263
neBEMGLOBAL VolumeKnCh * VolumeKnChArr
Definition: neBEM.h:216
neBEMGLOBAL int OptStaggerMap
Definition: neBEM.h:379
neBEMGLOBAL char GnuplotTmpDir[256]
Definition: neBEM.h:245
neBEMGLOBAL char neBEMVersion[10]
Definition: neBEM.h:34
neBEMGLOBAL double **** WtFldFastPot
Definition: neBEM.h:512
neBEMGLOBAL double **** FastFYKnCh
Definition: neBEM.h:448
neBEMGLOBAL double * WtFldOmitVolCrnrZ
Definition: neBEM.h:503
neBEMGLOBAL int OptFormattedFile
Definition: neBEM.h:49
neBEMGLOBAL int OptChargingUp
Definition: neBEM.h:53
neBEMGLOBAL double VSystemChargeZero
Definition: neBEM.h:122
neBEMGLOBAL int EndOfTime
Definition: neBEM.h:241
neBEMGLOBAL int NewMesh
Definition: neBEM.h:220
neBEMGLOBAL double * VBndPlaneInZMin
Definition: neBEM.h:88
neBEMGLOBAL int * WtFldBlkNbXCells
Definition: neBEM.h:493
neBEMGLOBAL int * BndPlaneInXMax
Definition: neBEM.h:85
neBEMGLOBAL double * WtFldIgnoreVolCrnrX
Definition: neBEM.h:507
neBEMGLOBAL double * XNorm
Definition: neBEM.h:71
neBEMGLOBAL double * YBndPlaneInYMax
Definition: neBEM.h:87
neBEMGLOBAL double * PrimOriginZ
Definition: neBEM.h:73
neBEMGLOBAL double * BlkCrnrZ
Definition: neBEM.h:428
neBEMGLOBAL int NbPrimitives
Definition: neBEM.h:57
neBEMGLOBAL double **** FastStgFY
Definition: neBEM.h:446
neBEMGLOBAL int * NbVertices
Definition: neBEM.h:70
neBEMGLOBAL int WireElements(int prim, int nvertex, double xvert[], double yvert[], double zvert[], double radius, int volref1, int volref2, int inttype, double potential, double charge, double lambda, int NbWireSeg)
Definition: ReTriM.c:82
neBEMGLOBAL int AnalyzePrimitive(int, int *, int *)
Definition: ReTriM.c:121
neBEMGLOBAL int * PeriodicTypeX
Definition: neBEM.h:78
neBEMGLOBAL int OptCreateFastPF
Definition: neBEM.h:405
neBEMGLOBAL int NbElements
Definition: neBEM.h:113
neBEMGLOBAL int OptEstimateError
Definition: neBEM.h:44
neBEMGLOBAL double * VBndPlaneInYMax
Definition: neBEM.h:89
neBEMGLOBAL double * Lambda
Definition: neBEM.h:75
neBEMGLOBAL double * ZBndPlaneInZMax
Definition: neBEM.h:87
neBEMGLOBAL double * WtFldOmitVolCrnrY
Definition: neBEM.h:502
neBEMGLOBAL int * PeriodicTypeY
Definition: neBEM.h:78
neBEMGLOBAL int NbPointsKnCh
Definition: neBEM.h:172
neBEMGLOBAL int OptWtFldStaggerFastVol
Definition: neBEM.h:473
#define neBEMGLOBAL
Definition: neBEM.h:10
neBEMGLOBAL double * Epsilon1
Definition: neBEM.h:75
neBEMGLOBAL FastAlgoVol FastVol
Definition: neBEM.h:422
neBEMGLOBAL double ** YVertex
Definition: neBEM.h:71
neBEMGLOBAL int DiscretizePolygon(int prim, int nvertex, double xvert[], double yvert[], double zvert[], double xnorm, double ynorm, double znorm, int volref1, int volref2, int inttype, double potential, double charge, double lambda, int NbSegX, int NbSegZ)
Definition: ReTriM.c:2106
neBEMGLOBAL int * NbSurfSegZ
Definition: neBEM.h:98
neBEMGLOBAL int NbWires
Definition: neBEM.h:97
neBEMGLOBAL double * PrimOriginY
Definition: neBEM.h:73
neBEMGLOBAL double * MirrorDistZFromOrigin
Definition: neBEM.h:83
neBEMGLOBAL double * WtFldOmitVolLZ
Definition: neBEM.h:500
neBEMGLOBAL AreaKnCh * AreaKnChArr
Definition: neBEM.h:204
neBEMGLOBAL double **** WtFldFastStgPot
Definition: neBEM.h:514
neBEMGLOBAL DirnCosn3D * PrimDC
Definition: neBEM.h:74
neBEMGLOBAL int WtFldNbPtSkip
Definition: neBEM.h:476
neBEMGLOBAL int * BndPlaneInZMin
Definition: neBEM.h:84
neBEMGLOBAL int PrimAfter
Definition: neBEM.h:351
neBEMGLOBAL double * VBndPlaneInXMin
Definition: neBEM.h:88
neBEMGLOBAL double * BlkLZ
Definition: neBEM.h:427
neBEMGLOBAL double * OmitVolCrnrX
Definition: neBEM.h:432
neBEMGLOBAL int OptSystemChargeZero
Definition: neBEM.h:118
neBEMGLOBAL int AnalyzeSurface(int, int *, int *)
Definition: ReTriM.c:246
neBEMGLOBAL int NbEqns
Definition: neBEM.h:234
neBEMGLOBAL int NbLinesKnCh
Definition: neBEM.h:172
neBEMGLOBAL int NbFloatingConductors
Definition: neBEM.h:124
neBEMGLOBAL int NbConstraints
Definition: neBEM.h:233
neBEMGLOBAL double * OmitVolLZ
Definition: neBEM.h:431
neBEMGLOBAL int NbStgPtSkip
Definition: neBEM.h:408
neBEMGLOBAL int * VolRef1
Definition: neBEM.h:76
neBEMGLOBAL double * XPeriod
Definition: neBEM.h:80
neBEMGLOBAL double * volEpsilon
Definition: neBEM.h:64
neBEMGLOBAL double * YNorm
Definition: neBEM.h:71
neBEMGLOBAL char ModelOutDir[256]
Definition: neBEM.h:262
neBEMGLOBAL int * volRef
Definition: neBEM.h:63
neBEMGLOBAL int NbVolumesKnCh
Definition: neBEM.h:172
neBEMGLOBAL double * volPotential
Definition: neBEM.h:64
neBEMGLOBAL double ** XVertex
Definition: neBEM.h:71
neBEMGLOBAL double * VBndPlaneInZMax
Definition: neBEM.h:89
neBEMGLOBAL double * AvAsgndChDen
Definition: neBEM.h:90
neBEMGLOBAL double * IgnoreVolCrnrY
Definition: neBEM.h:439
neBEMGLOBAL double * XBndPlaneInXMin
Definition: neBEM.h:86
neBEMGLOBAL double FixedWtFieldX
Definition: neBEM.h:467
neBEMGLOBAL int OptWtFldCreateFastPF
Definition: neBEM.h:474
neBEMGLOBAL int * VolRef2
Definition: neBEM.h:76
neBEMGLOBAL char MapVersion[10]
Definition: neBEM.h:380
neBEMGLOBAL int NbPtSkip
Definition: neBEM.h:407
neBEMGLOBAL double * WtFldIgnoreVolLZ
Definition: neBEM.h:506
neBEMGLOBAL int OptMap
Definition: neBEM.h:378
neBEMGLOBAL WtFldFastAlgoVol WtFldFastVol
Definition: neBEM.h:491
neBEMGLOBAL int NewPP
Definition: neBEM.h:220
neBEMGLOBAL double * OmitVolCrnrY
Definition: neBEM.h:433
neBEMGLOBAL int * BndPlaneInXMin
Definition: neBEM.h:84
neBEMGLOBAL char NativeOutDir[256]
Definition: neBEM.h:262
neBEMGLOBAL char TimeStr[256]
Definition: neBEM.h:242
neBEMGLOBAL int * MirrorTypeY
Definition: neBEM.h:81
neBEMGLOBAL int WtFldFastVolPF(void)
neBEMGLOBAL int NbSurfs
Definition: neBEM.h:97
neBEMGLOBAL double **** FastFX
Definition: neBEM.h:444
neBEMGLOBAL int NbAreasKnCh
Definition: neBEM.h:172
neBEMGLOBAL int * ElementEnd
Definition: neBEM.h:94
neBEMGLOBAL double **** WtFldFastFY
Definition: neBEM.h:513
neBEMGLOBAL double * AvChDen
Definition: neBEM.h:90
neBEMGLOBAL double * WtFldBlkLZ
Definition: neBEM.h:496
neBEMGLOBAL int OptFastVol
Definition: neBEM.h:403
neBEMGLOBAL double * WtFldBlkCrnrZ
Definition: neBEM.h:497
neBEMGLOBAL double **** WtFldFastStgFY
Definition: neBEM.h:515
neBEMGLOBAL double **** FastStgFX
Definition: neBEM.h:446
neBEMGLOBAL double * Radius
Definition: neBEM.h:72
neBEMGLOBAL int * MirrorTypeX
Definition: neBEM.h:81
neBEMGLOBAL int * BndPlaneInZMax
Definition: neBEM.h:85
neBEMGLOBAL int * InterfaceType
Definition: neBEM.h:68
neBEMGLOBAL double * OmitVolLY
Definition: neBEM.h:430
neBEMGLOBAL int BCCntr
Definition: neBEM.h:224
neBEMGLOBAL int * BlkNbXCells
Definition: neBEM.h:424
neBEMGLOBAL int * PrimType
Definition: neBEM.h:67
neBEMGLOBAL int OptReadFastPF
Definition: neBEM.h:406
neBEMGLOBAL int TimeStep
Definition: neBEM.h:241
neBEMGLOBAL double ContinuityChUp(int fld)
neBEMGLOBAL int * BndPlaneInYMin
Definition: neBEM.h:84
neBEMGLOBAL double * PrimLX
Definition: neBEM.h:72
neBEMGLOBAL int * BlkNbZCells
Definition: neBEM.h:426
neBEMGLOBAL int DiscretizeWire(int prim, int nvertex, double xvert[], double yvert[], double zvert[], double radius, int volref1, int volref2, int inttype, double potential, double charge, double lambda, int NbSegs)
Definition: ReTriM.c:409
neBEMGLOBAL double * WtFldOmitVolLY
Definition: neBEM.h:499
neBEMGLOBAL int * WtFldBlkNbZCells
Definition: neBEM.h:495
neBEMGLOBAL double FixedWtFieldY
Definition: neBEM.h:468
neBEMGLOBAL double * Solution
Definition: neBEM.h:237
neBEMGLOBAL int * ElementBgn
Definition: neBEM.h:94
neBEMGLOBAL double * PrimOriginX
Definition: neBEM.h:73
neBEMGLOBAL int OptStoreInflMatrix
Definition: neBEM.h:47
neBEMGLOBAL int WtFldNbStgPtSkip
Definition: neBEM.h:477
neBEMGLOBAL double ** AvWtChDen
Definition: neBEM.h:333
neBEMGLOBAL double * IgnoreVolLY
Definition: neBEM.h:436
neBEMGLOBAL double FixedWtPotential
Definition: neBEM.h:466
neBEMGLOBAL int OptGSL
Definition: neBEM.h:236
neBEMGLOBAL double * WtFldIgnoreVolCrnrY
Definition: neBEM.h:508
neBEMGLOBAL double * IgnoreVolLX
Definition: neBEM.h:435
neBEMGLOBAL int * PeriodicInZ
Definition: neBEM.h:79
neBEMGLOBAL int * PeriodicInX
Definition: neBEM.h:79
neBEMGLOBAL double * WtFldIgnoreVolCrnrZ
Definition: neBEM.h:509
neBEMGLOBAL int OptForceValidation
Definition: neBEM.h:43
neBEMGLOBAL double ** Inf
Definition: neBEM.h:237
neBEMGLOBAL double * WtFldIgnoreVolLY
Definition: neBEM.h:505
neBEMGLOBAL double **** FastFXKnCh
Definition: neBEM.h:448
neBEMGLOBAL int OptUnformattedFile
Definition: neBEM.h:50
neBEMGLOBAL double LengthScale
Definition: neBEM.h:238
neBEMGLOBAL int OptFixedWtField
Definition: neBEM.h:465
neBEMGLOBAL int NbUnknowns
Definition: neBEM.h:234
neBEMGLOBAL double * ZBndPlaneInZMin
Definition: neBEM.h:86
neBEMGLOBAL FILE * fMeshLog
Definition: neBEM.h:114
neBEMGLOBAL double * IgnoreVolLZ
Definition: neBEM.h:437
neBEMGLOBAL double * WtFldOmitVolCrnrX
Definition: neBEM.h:501
neBEMGLOBAL double **** FastFZKnCh
Definition: neBEM.h:448
neBEMGLOBAL double * VBndPlaneInYMin
Definition: neBEM.h:88
neBEMGLOBAL int MaxNbElementsOnLength
Definition: neBEM.h:105
neBEMGLOBAL int SurfaceElements(int prim, int nvertex, double xvert[], double yvert[], double zvert[], double xnorm, double ynorm, double znorm, int volref1, int volref2, int inttype, double potential, double charge, double lambda, int NbSegX, int NbSegZ)
Definition: ReTriM.c:33
neBEMGLOBAL char GnuplotScriptFile[256]
Definition: neBEM.h:245
neBEMGLOBAL int DiscretizeRectangle(int prim, int nvertex, double xvert[], double yvert[], double zvert[], double xnorm, double ynorm, double znorm, int volref1, int volref2, int inttype, double potential, double charge, double lambda, int NbSegX, int NbSegZ)
Definition: ReTriM.c:1590
neBEMGLOBAL double * volCharge
Definition: neBEM.h:64
neBEMGLOBAL double **** WtFldFastStgFX
Definition: neBEM.h:515
neBEMGLOBAL VoxelVol Voxel
Definition: neBEM.h:371
neBEMGLOBAL double **** FastStgFYKnCh
Definition: neBEM.h:450
neBEMGLOBAL double ** WtFieldChDen
Definition: neBEM.h:333
neBEMGLOBAL int FastVolKnChPF(void)
neBEMGLOBAL double * WtFldIgnoreVolLX
Definition: neBEM.h:504
neBEMGLOBAL int OrgnlNbPrimitives
Definition: neBEM.h:58
neBEMGLOBAL int * volBoundaryType
Definition: neBEM.h:63
neBEMGLOBAL int ModelCntr
Definition: neBEM.h:224
neBEMGLOBAL int * PeriodicTypeZ
Definition: neBEM.h:78
neBEMGLOBAL char NativePrimDir[256]
Definition: neBEM.h:263
neBEMGLOBAL LineKnCh * LineKnChArr
Definition: neBEM.h:192
neBEMGLOBAL int OptValidateSolution
Definition: neBEM.h:42
neBEMGLOBAL int AnalyzeWire(int, int *)
Definition: ReTriM.c:158
neBEMGLOBAL double **** FastPot
Definition: neBEM.h:443
neBEMGLOBAL int OptKnCh
Definition: neBEM.h:52
neBEMGLOBAL double **** FastPotKnCh
Definition: neBEM.h:447
neBEMGLOBAL char DeviceOutDir[256]
Definition: neBEM.h:262
neBEMGLOBAL int OptStoreElements
Definition: neBEM.h:46
neBEMGLOBAL int VolMax
Definition: neBEM.h:77
neBEMGLOBAL int OptStoreInvMatrix
Definition: neBEM.h:48
neBEMGLOBAL double * IgnoreVolCrnrX
Definition: neBEM.h:438
neBEMGLOBAL char BCOutDir[256]
Definition: neBEM.h:263
neBEMGLOBAL double * YPeriod
Definition: neBEM.h:80
neBEMGLOBAL double * PrimLZ
Definition: neBEM.h:72
neBEMGLOBAL int * volShape
Definition: neBEM.h:63
neBEMGLOBAL double * MirrorDistXFromOrigin
Definition: neBEM.h:82
neBEMGLOBAL int NbSystemChargeZero
Definition: neBEM.h:120
neBEMGLOBAL double * VBndPlaneInXMax
Definition: neBEM.h:89
neBEMGLOBAL double **** FastStgPotKnCh
Definition: neBEM.h:449
neBEMGLOBAL double **** FastStgFZKnCh
Definition: neBEM.h:450
neBEMGLOBAL double * Epsilon2
Definition: neBEM.h:75
neBEMGLOBAL int DiscretizeTriangle(int prim, int nvertex, double xvert[], double yvert[], double zvert[], double xnorm, double ynorm, double znorm, int volref1, int volref2, int inttype, double potential, double charge, double lambda, int NbSegX, int NbSegZ)
Definition: ReTriM.c:788
neBEMGLOBAL int NewBC
Definition: neBEM.h:220
neBEMGLOBAL double * ApplCh
Definition: neBEM.h:75
neBEMGLOBAL double * IgnoreVolCrnrZ
Definition: neBEM.h:440
neBEMGLOBAL int * BlkNbYCells
Definition: neBEM.h:425
neBEMGLOBAL int MinNbElementsOnLength
Definition: neBEM.h:103
neBEMGLOBAL int OptStaggerVoxel
Definition: neBEM.h:355
double Assigned
Definition: neBEM.h:201
int NbVertices
Definition: neBEM.h:199
int Nb
Definition: neBEM.h:198
Definition: neBEM.h:147
double Value
Definition: neBEM.h:150
short int NbOfBCs
Definition: neBEM.h:148
Point3D CollPt
Definition: neBEM.h:149
short int Type
Definition: neBEM.h:143
double Lambda
Definition: neBEM.h:144
Definition: neBEM.h:155
int PrimitiveNb
Definition: neBEM.h:158
double Assigned
Definition: neBEM.h:166
ElecProp E
Definition: neBEM.h:163
BCProp BC
Definition: neBEM.h:164
GeomProp G
Definition: neBEM.h:162
int InterfaceId
Definition: neBEM.h:159
int Id
Definition: neBEM.h:160
short int DeviceNb
Definition: neBEM.h:156
int ComponentNb
Definition: neBEM.h:157
double Solution
Definition: neBEM.h:165
double CrnrX
Definition: neBEM.h:414
int NbBlocks
Definition: neBEM.h:418
double CrnrZ
Definition: neBEM.h:416
double CrnrY
Definition: neBEM.h:415
double LZ
Definition: neBEM.h:413
int NbOmitVols
Definition: neBEM.h:419
int NbIgnoreVols
Definition: neBEM.h:420
double YStagger
Definition: neBEM.h:417
double LY
Definition: neBEM.h:412
double LX
Definition: neBEM.h:411
short int Type
Definition: neBEM.h:131
Point3D Origin
Definition: neBEM.h:132
double dA
Definition: neBEM.h:135
DirnCosn3D DC
Definition: neBEM.h:136
double LX
Definition: neBEM.h:134
Point3D Stop
Definition: neBEM.h:187
int Nb
Definition: neBEM.h:185
double Radius
Definition: neBEM.h:188
Point3D Start
Definition: neBEM.h:186
double Assigned
Definition: neBEM.h:189
Definition: neBEM.h:382
int NbYCells
Definition: neBEM.h:393
double Ymax
Definition: neBEM.h:386
double YStagger
Definition: neBEM.h:390
double Zmax
Definition: neBEM.h:388
double ZStagger
Definition: neBEM.h:391
int NbZCells
Definition: neBEM.h:394
double Xmax
Definition: neBEM.h:384
double Xmin
Definition: neBEM.h:383
double XStagger
Definition: neBEM.h:389
double Zmin
Definition: neBEM.h:387
int NbXCells
Definition: neBEM.h:392
double Ymin
Definition: neBEM.h:385
Definition: Vector.h:21
Point3D P
Definition: neBEM.h:177
double Assigned
Definition: neBEM.h:178
int Nb
Definition: neBEM.h:176
int Nb
Definition: neBEM.h:210
int NbVertices
Definition: neBEM.h:211
double Assigned
Definition: neBEM.h:213
double Zmax
Definition: neBEM.h:363
double YStagger
Definition: neBEM.h:365
double Xmax
Definition: neBEM.h:359
int NbXCells
Definition: neBEM.h:367
double Ymax
Definition: neBEM.h:361
double Zmin
Definition: neBEM.h:362
double ZStagger
Definition: neBEM.h:366
double XStagger
Definition: neBEM.h:364
int NbZCells
Definition: neBEM.h:369
int NbYCells
Definition: neBEM.h:368
double Xmin
Definition: neBEM.h:358
double Ymin
Definition: neBEM.h:360
int NbIgnoreVols
Definition: neBEM.h:489
int NbOmitVols
Definition: neBEM.h:488
double LZ
Definition: neBEM.h:482
double YStagger
Definition: neBEM.h:486
double LY
Definition: neBEM.h:481
double LX
Definition: neBEM.h:480
double CrnrY
Definition: neBEM.h:484
double CrnrX
Definition: neBEM.h:483
double CrnrZ
Definition: neBEM.h:485