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