Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
Loading...
Searching...
No Matches
Garfield::ComponentNeBem3d Class Reference

Interface to neBEM. More...

#include <ComponentNeBem3d.hh>

Inheritance diagram for Garfield::ComponentNeBem3d:

Classes

struct  Element
struct  Primitive

Public Member Functions

 ComponentNeBem3d ()
 Constructor.
 ~ComponentNeBem3d ()
 Destructor.
Medium * GetMedium (const double x, const double y, const double z) override
void AddPlaneX (const double x, const double voltage)
 Add a plane at constant x.
void AddPlaneY (const double y, const double voltage)
 Add a plane at constant y.
void AddPlaneZ (const double z, const double voltage)
 Add a plane at constant z.
unsigned int GetNumberOfPlanesX () const
 Get the number of equipotential planes at constant x.
unsigned int GetNumberOfPlanesY () const
 Get the number of equipotential planes at constant y.
unsigned int GetNumberOfPlanesZ () const
 Get the number of equipotential planes at constant z.
bool GetPlaneX (const unsigned int i, double &x, double &v) const
 Retrieve the parameters of a plane at constant x.
bool GetPlaneY (const unsigned int i, double &y, double &v) const
 Retrieve the parameters of a plane at constant y.
bool GetPlaneZ (const unsigned int i, double &z, double &v) const
 Retrieve the parameters of a plane at constant z.
unsigned int GetNumberOfPrimitives () const
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
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 &vol1, int &vol2) const
bool GetVolume (const unsigned int vol, int &shape, int &material, double &eps, double &potential, double &charge, int &bc)
int GetVolume (const double x, const double y, const double z)
size_t GetNumberOfElements () const override
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
bool Initialise ()
 Retrieve surface panels, remove contacts and cut polygons to rectangles and right-angle triangles.
void SetTargetElementSize (const double length)
 Set the default value of the target linear size of the elements produced by neBEM's discretisation process.
void SetMinMaxNumberOfElements (const unsigned int nmin, const unsigned int nmax)
 Set the smallest and largest allowed number of elements along the lenght of a primitive.
void SetNewModel (const unsigned int NewModel)
void SetNewMesh (const unsigned int NewMesh)
void SetNewBC (const unsigned int NewBC)
void SetNewPP (const unsigned int NewPP)
void SetModelOptions (const unsigned int NewModel, const unsigned int NewMesh, const unsigned int NewBC, const unsigned int NewPP)
void SetStoreInflMatrix (const unsigned int OptStoreInflMatrix)
 Set storing options (OptStoreInflMatrix, OptStoreInvMatrix, OptStoreInvMatrix, OptStoreInvMatrix) OptStorePrimitives, OptStorePrimitives) OptStoreElements, OptStoreElements) OptFormattedFile, OptUnformattedFile)
void SetReadInflMatrix (const unsigned int OptReadInflMatrix)
void SetStoreInvMatrix (const unsigned int OptStoreInvMatrix)
void SetReadInvMatrix (const unsigned int OptReadInvMatrix)
void SetStorePrimitives (const unsigned int OptStorePrimitives)
void SetReadPrimitives (const unsigned int OptReadPrimitives)
void SetStoreElements (const unsigned int OptStoreElements)
void SetReadElements (const unsigned int OptReadElements)
void SetFormattedFile (const unsigned int OptFormattedFile)
void SetUnformattedFile (const unsigned int OptUnformattedFile)
void SetStoreReadOptions (const unsigned int OptStoreInflMatrix, const unsigned int OptReadInflMatrix, const unsigned int OptStoreInvMatrix, const unsigned int OptReadInvMatrix, const unsigned int OptStorePrimitives, const unsigned int OptReadPrimitives, const unsigned int OptStoreElements, const unsigned int OptReadElements, const unsigned int OptFormattedFile, const unsigned int OptUnformattedFile)
void SetReuseModel (void)
void SetSystemChargeZero (const unsigned int OptSystemChargeZero)
 Other functions to be, are void SetPlotOptions(OptGnuplot=0, OptGnuplotPrimitives=0, OptGnuplotElements=0, OptPrimitiveFiles=0, OptElementFiles=0)
void SetValidateSolution (const unsigned int OptValidateSolution)
void SetForceValidation (const unsigned int OptForceValidation)
void SetRepeatLHMatrix (const unsigned int OptRepeatLHMatrix)
void SetComputeOptions (const unsigned int OptSystemChargeZero, const unsigned int OptValidateSolution, const unsigned int OptForceValidation, const unsigned int OptRepeatLHMatrix)
void SetFastVolOptions (const unsigned int OptFastVol, const unsigned int OptCreateFastPF, const unsigned int OptReadFastPF)
void SetFastVolVersion (const unsigned int VersionFV)
void SetFastVolBlocks (const unsigned int NbBlocksFV)
void SetWtFldFastVolOptions (const unsigned int IdWtField, const unsigned int OptWtFldFastVol, const unsigned int OptCreateWtFldFastPF, const unsigned int OptReadWtFldFastPF)
void SetWtFldFastVolVersion (const unsigned int IdWtField, const unsigned int VersionWtFldFV)
void SetWtFldFastVolBlocks (const unsigned int IdWtField, const unsigned int NbBlocksWtFldFV)
void SetKnownChargeOptions (const unsigned int OptKnownCharge)
void SetChargingUpOptions (const unsigned int OptChargingUp)
void UseLUInversion ()
 Invert the influence matrix using lower-upper (LU) decomposition.
void UseSVDInversion ()
 Invert the influence matrix using singular value decomposition.
void SetPeriodicCopies (const unsigned int nx, const unsigned int ny, const unsigned int nz)
 Set the parameters $n_x, n_y, n_z$ defining the number of periodic copies that neBEM will use when dealing with periodic configurations.
void GetPeriodicCopies (unsigned int &nx, unsigned int &ny, unsigned int &nz) const
 Retrieve the number of periodic copies used by neBEM.
void SetPeriodicityX (const double s)
 Set the periodic length [cm] in the x-direction.
void SetPeriodicityY (const double s)
 Set the periodic length [cm] in the y-direction.
void SetPeriodicityZ (const double s)
 Set the periodic length [cm] in the z-direction.
void SetMirrorPeriodicityX (const double s)
 Set the periodic length [cm] in the x-direction.
void SetMirrorPeriodicityY (const double s)
 Set the periodic length [cm] in the y-direction.
void SetMirrorPeriodicityZ (const double s)
 Set the periodic length [cm] in the z-direction.
bool GetPeriodicityX (double &s) const
 Get the periodic length in the x-direction.
bool GetPeriodicityY (double &s) const
 Get the periodic length in the y-direction.
bool GetPeriodicityZ (double &s) const
 Get the periodic length in the z-direction.
void SetNumberOfThreads (const unsigned int n)
 Set the number of threads to be used by neBEM.
void SetPrimAfter (const int n)
 Set the number of repetitions after which primitive properties are used for the physical field.
void SetWtFldPrimAfter (const int n)
 Set the number of repetitions after which primitive properties are used for the weighting field.
void SetOptRmPrim (const unsigned int n)
 Set option related to removal of primitives.
void ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status) override
void ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status) override
bool GetVoltageRange (double &vmin, double &vmax) override
void WeightingField (const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label) override
double WeightingPotential (const double x, const double y, const double z, const std::string &label) override

Protected Member Functions

void Reset () override
void UpdatePeriodicity () override

Private Types

enum class  Inversion { LU = 0 , SVD }

Private Member Functions

void InitValues ()
void ShiftPanels (std::vector< Panel > &panels) const
 Reduce panels to the basic period.
bool EliminateOverlaps (const Panel &panel1, const Panel &panel2, std::vector< Panel > &panelsOut, std::vector< int > &itypo)
 Isolate the parts of polygon 1 that are not hidden by 2 and vice versa.
bool TraceEnclosed (const std::vector< double > &xl1, const std::vector< double > &yl1, const std::vector< double > &xl2, const std::vector< double > &yl2, const Panel &originalPanel, std::vector< Panel > &newPanels) const
void TraceNonOverlap (const std::vector< double > &xp1, const std::vector< double > &yp1, const std::vector< double > &xl1, const std::vector< double > &yl1, const std::vector< double > &xl2, const std::vector< double > &yl2, const std::vector< int > &flags1, const std::vector< int > &flags2, const std::vector< int > &links1, const std::vector< int > &links2, std::vector< bool > &mark1, int ip1, const Panel &originalPanel, std::vector< Panel > &newPanels) const
void TraceOverlap (const std::vector< double > &xp1, const std::vector< double > &yp1, const std::vector< double > &xp2, const std::vector< double > &yp2, const std::vector< double > &xl1, const std::vector< double > &yl1, const std::vector< double > &xl2, const std::vector< double > &yl2, const std::vector< int > &flags1, const std::vector< int > &links1, const std::vector< int > &links2, std::vector< bool > &mark1, int ip1, int ip2, const Panel &originalPanel, std::vector< Panel > &newPanels) const
bool MakePrimitives (const Panel &panelIn, std::vector< Panel > &panelsOut) const
 Split a polygon into rectangles and right-angled triangles.
bool SplitTrapezium (const Panel panelIn, std::vector< Panel > &stack, std::vector< Panel > &panelsOut, const double epsang) const
 Check whether a polygon contains parallel lines.
unsigned int NbOfSegments (const double length, const double target) const
bool DiscretizeWire (const Primitive &primitive, const double targetSize, std::vector< Element > &elements) const
bool DiscretizeTriangle (const Primitive &primitive, const double targetSize, std::vector< Element > &elements) const
bool DiscretizeRectangle (const Primitive &prim, const double targetSize, std::vector< Element > &elements) const
int InterfaceType (const Solid::BoundaryCondition bc) const

Private Attributes

std::vector< Primitivem_primitives
 List of primitives.
std::vector< Elementm_elements
 List of elements.
std::array< bool, 6 > m_ynplan {{false, false, false, false, false, false}}
 Plane existence.
std::array< double, 6 > m_coplan {{0., 0., 0., 0., 0., 0.}}
 Plane coordinates.
std::array< double, 6 > m_vtplan {{0., 0., 0., 0., 0., 0.}}
 Plane potentials.
unsigned int m_newModel = 1
unsigned int m_newMesh = 1
unsigned int m_newBC = 1
unsigned int m_newPP = 1
unsigned int m_optStoreInflMatrix = 0
unsigned int m_optReadInflMatrix = 0
unsigned int m_optStoreInvMatrix = 1
unsigned int m_optReadInvMatrix = 0
unsigned int m_optStorePrimitives = 0
unsigned int m_optReadPrimitives = 0
unsigned int m_optStoreElements = 0
unsigned int m_optReadElements = 0
unsigned int m_optStoreFormatted = 1
unsigned int m_optStoreUnformatted = 0
unsigned int m_optSystemChargeZero = 1
unsigned int m_optValidateSolution = 1
unsigned int m_optForceValidation = 0
unsigned int m_optRepeatLHMatrix = 0
unsigned int m_optFastVol = 0
unsigned int m_optCreateFastPF = 0
unsigned int m_optReadFastPF = 0
unsigned int m_versionFV = 0
unsigned int m_nbBlocksFV = 0
unsigned int m_idWtField = 0
unsigned int m_optWtFldFastVol [11]
unsigned int m_optCreateWtFldFastPF [11]
unsigned int m_optReadWtFldFastPF [11]
unsigned int m_versionWtFldFV [11]
unsigned int m_nbBlocksWtFldFV [11]
unsigned int m_optKnownCharge = 0
unsigned int m_optChargingUp = 0
unsigned int m_nThreads = 1
int m_primAfter = -1
int m_wtFldPrimAfter = -1
unsigned int m_optRmPrim = 0
double m_targetElementSize = 50.0e-4
 Target size of elements [cm].
unsigned int m_minNbElementsOnLength = 1
 Smallest number of elements produced along the axis of a primitive.
unsigned int m_maxNbElementsOnLength = 100
 Largest number of elements produced along the axis of a primitive.
std::array< double, 3 > m_periodicLength {{0., 0., 0.}}
 Periodic lengths.
unsigned int m_nCopiesX = 5
 Number of periodic copies along x.
unsigned int m_nCopiesY = 5
 Number of periodic copies along y.
unsigned int m_nCopiesZ = 5
 Number of periodic copies along z.
Inversion m_inversion = Inversion::LU
std::map< std::string, int > m_wfields
 Electrode labels and corresponding neBEM weighting field indices.

Static Private Attributes

static constexpr double MinDist = 1.e-6

Detailed Description

Interface to neBEM.

Definition at line 14 of file ComponentNeBem3d.hh.

Member Enumeration Documentation

◆ Inversion

enum class Garfield::ComponentNeBem3d::Inversion
strongprivate
Enumerator
LU 
SVD 

Definition at line 365 of file ComponentNeBem3d.hh.

365{ LU = 0, SVD };

Constructor & Destructor Documentation

◆ ComponentNeBem3d()

Garfield::ComponentNeBem3d::ComponentNeBem3d ( )

Constructor.

◆ ~ComponentNeBem3d()

Garfield::ComponentNeBem3d::~ComponentNeBem3d ( )
inline

Destructor.

Definition at line 19 of file ComponentNeBem3d.hh.

19{}

Member Function Documentation

◆ AddPlaneX()

void Garfield::ComponentNeBem3d::AddPlaneX ( const double x,
const double voltage )

Add a plane at constant x.

◆ AddPlaneY()

void Garfield::ComponentNeBem3d::AddPlaneY ( const double y,
const double voltage )

Add a plane at constant y.

◆ AddPlaneZ()

void Garfield::ComponentNeBem3d::AddPlaneZ ( const double z,
const double voltage )

Add a plane at constant z.

◆ DiscretizeRectangle()

bool Garfield::ComponentNeBem3d::DiscretizeRectangle ( const Primitive & prim,
const double targetSize,
std::vector< Element > & elements ) const
private

◆ DiscretizeTriangle()

bool Garfield::ComponentNeBem3d::DiscretizeTriangle ( const Primitive & primitive,
const double targetSize,
std::vector< Element > & elements ) const
private

◆ DiscretizeWire()

bool Garfield::ComponentNeBem3d::DiscretizeWire ( const Primitive & primitive,
const double targetSize,
std::vector< Element > & elements ) const
private

◆ ElectricField() [1/2]

void Garfield::ComponentNeBem3d::ElectricField ( const double x,
const double y,
const double z,
double & ex,
double & ey,
double & ez,
double & v,
Medium *& m,
int & status )
override

◆ ElectricField() [2/2]

void Garfield::ComponentNeBem3d::ElectricField ( const double x,
const double y,
const double z,
double & ex,
double & ey,
double & ez,
Medium *& m,
int & status )
override

◆ EliminateOverlaps()

bool Garfield::ComponentNeBem3d::EliminateOverlaps ( const Panel & panel1,
const Panel & panel2,
std::vector< Panel > & panelsOut,
std::vector< int > & itypo )
private

Isolate the parts of polygon 1 that are not hidden by 2 and vice versa.

◆ GetElement()

bool Garfield::ComponentNeBem3d::GetElement ( const unsigned int i,
std::vector< double > & xv,
std::vector< double > & yv,
std::vector< double > & zv,
int & interface,
double & bc,
double & lambda ) const

◆ GetMedium()

Medium * Garfield::ComponentNeBem3d::GetMedium ( const double x,
const double y,
const double z )
override

◆ GetNumberOfElements()

size_t Garfield::ComponentNeBem3d::GetNumberOfElements ( ) const
inlineoverride

Definition at line 54 of file ComponentNeBem3d.hh.

54{ return m_elements.size(); }
std::vector< Element > m_elements
List of elements.

◆ GetNumberOfPlanesX()

unsigned int Garfield::ComponentNeBem3d::GetNumberOfPlanesX ( ) const

Get the number of equipotential planes at constant x.

◆ GetNumberOfPlanesY()

unsigned int Garfield::ComponentNeBem3d::GetNumberOfPlanesY ( ) const

Get the number of equipotential planes at constant y.

◆ GetNumberOfPlanesZ()

unsigned int Garfield::ComponentNeBem3d::GetNumberOfPlanesZ ( ) const

Get the number of equipotential planes at constant z.

◆ GetNumberOfPrimitives()

unsigned int Garfield::ComponentNeBem3d::GetNumberOfPrimitives ( ) const
inline

Definition at line 42 of file ComponentNeBem3d.hh.

42{ return m_primitives.size(); }
std::vector< Primitive > m_primitives
List of primitives.

◆ GetPeriodicCopies()

void Garfield::ComponentNeBem3d::GetPeriodicCopies ( unsigned int & nx,
unsigned int & ny,
unsigned int & nz ) const
inline

Retrieve the number of periodic copies used by neBEM.

Definition at line 159 of file ComponentNeBem3d.hh.

160 {
161 nx = m_nCopiesX;
162 ny = m_nCopiesY;
163 nz = m_nCopiesZ;
164 }
unsigned int m_nCopiesZ
Number of periodic copies along z.
unsigned int m_nCopiesY
Number of periodic copies along y.
unsigned int m_nCopiesX
Number of periodic copies along x.

◆ GetPeriodicityX()

bool Garfield::ComponentNeBem3d::GetPeriodicityX ( double & s) const

Get the periodic length in the x-direction.

◆ GetPeriodicityY()

bool Garfield::ComponentNeBem3d::GetPeriodicityY ( double & s) const

Get the periodic length in the y-direction.

◆ GetPeriodicityZ()

bool Garfield::ComponentNeBem3d::GetPeriodicityZ ( double & s) const

Get the periodic length in the z-direction.

◆ GetPlaneX()

bool Garfield::ComponentNeBem3d::GetPlaneX ( const unsigned int i,
double & x,
double & v ) const

Retrieve the parameters of a plane at constant x.

◆ GetPlaneY()

bool Garfield::ComponentNeBem3d::GetPlaneY ( const unsigned int i,
double & y,
double & v ) const

Retrieve the parameters of a plane at constant y.

◆ GetPlaneZ()

bool Garfield::ComponentNeBem3d::GetPlaneZ ( const unsigned int i,
double & z,
double & v ) const

Retrieve the parameters of a plane at constant z.

◆ GetPrimitive() [1/2]

bool Garfield::ComponentNeBem3d::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

◆ GetPrimitive() [2/2]

bool Garfield::ComponentNeBem3d::GetPrimitive ( const unsigned int i,
double & a,
double & b,
double & c,
std::vector< double > & xv,
std::vector< double > & yv,
std::vector< double > & zv,
int & vol1,
int & vol2 ) const

◆ GetVoltageRange()

bool Garfield::ComponentNeBem3d::GetVoltageRange ( double & vmin,
double & vmax )
override

◆ GetVolume() [1/2]

int Garfield::ComponentNeBem3d::GetVolume ( const double x,
const double y,
const double z )

◆ GetVolume() [2/2]

bool Garfield::ComponentNeBem3d::GetVolume ( const unsigned int vol,
int & shape,
int & material,
double & eps,
double & potential,
double & charge,
int & bc )

◆ Initialise()

bool Garfield::ComponentNeBem3d::Initialise ( )

Retrieve surface panels, remove contacts and cut polygons to rectangles and right-angle triangles.

◆ InitValues()

void Garfield::ComponentNeBem3d::InitValues ( )
private

◆ InterfaceType()

int Garfield::ComponentNeBem3d::InterfaceType ( const Solid::BoundaryCondition bc) const
private

◆ MakePrimitives()

bool Garfield::ComponentNeBem3d::MakePrimitives ( const Panel & panelIn,
std::vector< Panel > & panelsOut ) const
private

Split a polygon into rectangles and right-angled triangles.

◆ NbOfSegments()

unsigned int Garfield::ComponentNeBem3d::NbOfSegments ( const double length,
const double target ) const
private

◆ Reset()

void Garfield::ComponentNeBem3d::Reset ( )
overrideprotected

◆ SetChargingUpOptions()

void Garfield::ComponentNeBem3d::SetChargingUpOptions ( const unsigned int OptChargingUp)

◆ SetComputeOptions()

void Garfield::ComponentNeBem3d::SetComputeOptions ( const unsigned int OptSystemChargeZero,
const unsigned int OptValidateSolution,
const unsigned int OptForceValidation,
const unsigned int OptRepeatLHMatrix )

◆ SetFastVolBlocks()

void Garfield::ComponentNeBem3d::SetFastVolBlocks ( const unsigned int NbBlocksFV)

◆ SetFastVolOptions()

void Garfield::ComponentNeBem3d::SetFastVolOptions ( const unsigned int OptFastVol,
const unsigned int OptCreateFastPF,
const unsigned int OptReadFastPF )

◆ SetFastVolVersion()

void Garfield::ComponentNeBem3d::SetFastVolVersion ( const unsigned int VersionFV)

◆ SetForceValidation()

void Garfield::ComponentNeBem3d::SetForceValidation ( const unsigned int OptForceValidation)

◆ SetFormattedFile()

void Garfield::ComponentNeBem3d::SetFormattedFile ( const unsigned int OptFormattedFile)

◆ SetKnownChargeOptions()

void Garfield::ComponentNeBem3d::SetKnownChargeOptions ( const unsigned int OptKnownCharge)

◆ SetMinMaxNumberOfElements()

void Garfield::ComponentNeBem3d::SetMinMaxNumberOfElements ( const unsigned int nmin,
const unsigned int nmax )

Set the smallest and largest allowed number of elements along the lenght of a primitive.

◆ SetMirrorPeriodicityX()

void Garfield::ComponentNeBem3d::SetMirrorPeriodicityX ( const double s)

Set the periodic length [cm] in the x-direction.

◆ SetMirrorPeriodicityY()

void Garfield::ComponentNeBem3d::SetMirrorPeriodicityY ( const double s)

Set the periodic length [cm] in the y-direction.

◆ SetMirrorPeriodicityZ()

void Garfield::ComponentNeBem3d::SetMirrorPeriodicityZ ( const double s)

Set the periodic length [cm] in the z-direction.

◆ SetModelOptions()

void Garfield::ComponentNeBem3d::SetModelOptions ( const unsigned int NewModel,
const unsigned int NewMesh,
const unsigned int NewBC,
const unsigned int NewPP )

◆ SetNewBC()

void Garfield::ComponentNeBem3d::SetNewBC ( const unsigned int NewBC)

◆ SetNewMesh()

void Garfield::ComponentNeBem3d::SetNewMesh ( const unsigned int NewMesh)

◆ SetNewModel()

void Garfield::ComponentNeBem3d::SetNewModel ( const unsigned int NewModel)

◆ SetNewPP()

void Garfield::ComponentNeBem3d::SetNewPP ( const unsigned int NewPP)

◆ SetNumberOfThreads()

void Garfield::ComponentNeBem3d::SetNumberOfThreads ( const unsigned int n)
inline

Set the number of threads to be used by neBEM.

Definition at line 185 of file ComponentNeBem3d.hh.

185{ m_nThreads = n > 0 ? n : 1; }

◆ SetOptRmPrim()

void Garfield::ComponentNeBem3d::SetOptRmPrim ( const unsigned int n)
inline

Set option related to removal of primitives.

Definition at line 198 of file ComponentNeBem3d.hh.

198{ m_optRmPrim = n; }

◆ SetPeriodicCopies()

void Garfield::ComponentNeBem3d::SetPeriodicCopies ( const unsigned int nx,
const unsigned int ny,
const unsigned int nz )

Set the parameters $n_x, n_y, n_z$ defining the number of periodic copies that neBEM will use when dealing with periodic configurations.

neBEM will use $2 \times n + 1$ copies (default: $n = 5$).

◆ SetPeriodicityX()

void Garfield::ComponentNeBem3d::SetPeriodicityX ( const double s)

Set the periodic length [cm] in the x-direction.

◆ SetPeriodicityY()

void Garfield::ComponentNeBem3d::SetPeriodicityY ( const double s)

Set the periodic length [cm] in the y-direction.

◆ SetPeriodicityZ()

void Garfield::ComponentNeBem3d::SetPeriodicityZ ( const double s)

Set the periodic length [cm] in the z-direction.

◆ SetPrimAfter()

void Garfield::ComponentNeBem3d::SetPrimAfter ( const int n)
inline

Set the number of repetitions after which primitive properties are used for the physical field.

A negative value (default) implies all the elements are always evaluated.

Definition at line 190 of file ComponentNeBem3d.hh.

◆ SetReadElements()

void Garfield::ComponentNeBem3d::SetReadElements ( const unsigned int OptReadElements)

◆ SetReadInflMatrix()

void Garfield::ComponentNeBem3d::SetReadInflMatrix ( const unsigned int OptReadInflMatrix)

◆ SetReadInvMatrix()

void Garfield::ComponentNeBem3d::SetReadInvMatrix ( const unsigned int OptReadInvMatrix)

◆ SetReadPrimitives()

void Garfield::ComponentNeBem3d::SetReadPrimitives ( const unsigned int OptReadPrimitives)

◆ SetRepeatLHMatrix()

void Garfield::ComponentNeBem3d::SetRepeatLHMatrix ( const unsigned int OptRepeatLHMatrix)

◆ SetReuseModel()

void Garfield::ComponentNeBem3d::SetReuseModel ( void )

◆ SetStoreElements()

void Garfield::ComponentNeBem3d::SetStoreElements ( const unsigned int OptStoreElements)

◆ SetStoreInflMatrix()

void Garfield::ComponentNeBem3d::SetStoreInflMatrix ( const unsigned int OptStoreInflMatrix)

Set storing options (OptStoreInflMatrix, OptStoreInvMatrix, OptStoreInvMatrix, OptStoreInvMatrix) OptStorePrimitives, OptStorePrimitives) OptStoreElements, OptStoreElements) OptFormattedFile, OptUnformattedFile)

◆ SetStoreInvMatrix()

void Garfield::ComponentNeBem3d::SetStoreInvMatrix ( const unsigned int OptStoreInvMatrix)

◆ SetStorePrimitives()

void Garfield::ComponentNeBem3d::SetStorePrimitives ( const unsigned int OptStorePrimitives)

◆ SetStoreReadOptions()

void Garfield::ComponentNeBem3d::SetStoreReadOptions ( const unsigned int OptStoreInflMatrix,
const unsigned int OptReadInflMatrix,
const unsigned int OptStoreInvMatrix,
const unsigned int OptReadInvMatrix,
const unsigned int OptStorePrimitives,
const unsigned int OptReadPrimitives,
const unsigned int OptStoreElements,
const unsigned int OptReadElements,
const unsigned int OptFormattedFile,
const unsigned int OptUnformattedFile )

◆ SetSystemChargeZero()

void Garfield::ComponentNeBem3d::SetSystemChargeZero ( const unsigned int OptSystemChargeZero)

Other functions to be, are void SetPlotOptions(OptGnuplot=0, OptGnuplotPrimitives=0, OptGnuplotElements=0, OptPrimitiveFiles=0, OptElementFiles=0)

◆ SetTargetElementSize()

void Garfield::ComponentNeBem3d::SetTargetElementSize ( const double length)

Set the default value of the target linear size of the elements produced by neBEM's discretisation process.

◆ SetUnformattedFile()

void Garfield::ComponentNeBem3d::SetUnformattedFile ( const unsigned int OptUnformattedFile)

◆ SetValidateSolution()

void Garfield::ComponentNeBem3d::SetValidateSolution ( const unsigned int OptValidateSolution)

◆ SetWtFldFastVolBlocks()

void Garfield::ComponentNeBem3d::SetWtFldFastVolBlocks ( const unsigned int IdWtField,
const unsigned int NbBlocksWtFldFV )

◆ SetWtFldFastVolOptions()

void Garfield::ComponentNeBem3d::SetWtFldFastVolOptions ( const unsigned int IdWtField,
const unsigned int OptWtFldFastVol,
const unsigned int OptCreateWtFldFastPF,
const unsigned int OptReadWtFldFastPF )

◆ SetWtFldFastVolVersion()

void Garfield::ComponentNeBem3d::SetWtFldFastVolVersion ( const unsigned int IdWtField,
const unsigned int VersionWtFldFV )

◆ SetWtFldPrimAfter()

void Garfield::ComponentNeBem3d::SetWtFldPrimAfter ( const int n)
inline

Set the number of repetitions after which primitive properties are used for the weighting field.

A negative value (default) implies all the elements are always evaluated.

Definition at line 195 of file ComponentNeBem3d.hh.

◆ ShiftPanels()

void Garfield::ComponentNeBem3d::ShiftPanels ( std::vector< Panel > & panels) const
private

Reduce panels to the basic period.

◆ SplitTrapezium()

bool Garfield::ComponentNeBem3d::SplitTrapezium ( const Panel panelIn,
std::vector< Panel > & stack,
std::vector< Panel > & panelsOut,
const double epsang ) const
private

Check whether a polygon contains parallel lines.

If it does, split it in rectangular and non-rectangular parts.

◆ TraceEnclosed()

bool Garfield::ComponentNeBem3d::TraceEnclosed ( const std::vector< double > & xl1,
const std::vector< double > & yl1,
const std::vector< double > & xl2,
const std::vector< double > & yl2,
const Panel & originalPanel,
std::vector< Panel > & newPanels ) const
private

◆ TraceNonOverlap()

void Garfield::ComponentNeBem3d::TraceNonOverlap ( const std::vector< double > & xp1,
const std::vector< double > & yp1,
const std::vector< double > & xl1,
const std::vector< double > & yl1,
const std::vector< double > & xl2,
const std::vector< double > & yl2,
const std::vector< int > & flags1,
const std::vector< int > & flags2,
const std::vector< int > & links1,
const std::vector< int > & links2,
std::vector< bool > & mark1,
int ip1,
const Panel & originalPanel,
std::vector< Panel > & newPanels ) const
private

◆ TraceOverlap()

void Garfield::ComponentNeBem3d::TraceOverlap ( const std::vector< double > & xp1,
const std::vector< double > & yp1,
const std::vector< double > & xp2,
const std::vector< double > & yp2,
const std::vector< double > & xl1,
const std::vector< double > & yl1,
const std::vector< double > & xl2,
const std::vector< double > & yl2,
const std::vector< int > & flags1,
const std::vector< int > & links1,
const std::vector< int > & links2,
std::vector< bool > & mark1,
int ip1,
int ip2,
const Panel & originalPanel,
std::vector< Panel > & newPanels ) const
private

◆ UpdatePeriodicity()

void Garfield::ComponentNeBem3d::UpdatePeriodicity ( )
overrideprotected

◆ UseLUInversion()

void Garfield::ComponentNeBem3d::UseLUInversion ( )
inline

Invert the influence matrix using lower-upper (LU) decomposition.

Definition at line 149 of file ComponentNeBem3d.hh.

◆ UseSVDInversion()

void Garfield::ComponentNeBem3d::UseSVDInversion ( )
inline

Invert the influence matrix using singular value decomposition.

Definition at line 151 of file ComponentNeBem3d.hh.

◆ WeightingField()

void Garfield::ComponentNeBem3d::WeightingField ( const double x,
const double y,
const double z,
double & wx,
double & wy,
double & wz,
const std::string & label )
override

◆ WeightingPotential()

double Garfield::ComponentNeBem3d::WeightingPotential ( const double x,
const double y,
const double z,
const std::string & label )
override

Member Data Documentation

◆ m_coplan

std::array<double, 6> Garfield::ComponentNeBem3d::m_coplan {{0., 0., 0., 0., 0., 0.}}
private

Plane coordinates.

Definition at line 278 of file ComponentNeBem3d.hh.

278{{0., 0., 0., 0., 0., 0.}};

◆ m_elements

std::vector<Element> Garfield::ComponentNeBem3d::m_elements
private

List of elements.

Definition at line 273 of file ComponentNeBem3d.hh.

◆ m_idWtField

unsigned int Garfield::ComponentNeBem3d::m_idWtField = 0
private

Definition at line 320 of file ComponentNeBem3d.hh.

◆ m_inversion

Inversion Garfield::ComponentNeBem3d::m_inversion = Inversion::LU
private

Definition at line 366 of file ComponentNeBem3d.hh.

◆ m_maxNbElementsOnLength

unsigned int Garfield::ComponentNeBem3d::m_maxNbElementsOnLength = 100
private

Largest number of elements produced along the axis of a primitive.

Definition at line 355 of file ComponentNeBem3d.hh.

◆ m_minNbElementsOnLength

unsigned int Garfield::ComponentNeBem3d::m_minNbElementsOnLength = 1
private

Smallest number of elements produced along the axis of a primitive.

Definition at line 353 of file ComponentNeBem3d.hh.

◆ m_nbBlocksFV

unsigned int Garfield::ComponentNeBem3d::m_nbBlocksFV = 0
private

Definition at line 317 of file ComponentNeBem3d.hh.

◆ m_nbBlocksWtFldFV

unsigned int Garfield::ComponentNeBem3d::m_nbBlocksWtFldFV[11]
private

Definition at line 325 of file ComponentNeBem3d.hh.

◆ m_nCopiesX

unsigned int Garfield::ComponentNeBem3d::m_nCopiesX = 5
private

Number of periodic copies along x.

Definition at line 359 of file ComponentNeBem3d.hh.

◆ m_nCopiesY

unsigned int Garfield::ComponentNeBem3d::m_nCopiesY = 5
private

Number of periodic copies along y.

Definition at line 361 of file ComponentNeBem3d.hh.

◆ m_nCopiesZ

unsigned int Garfield::ComponentNeBem3d::m_nCopiesZ = 5
private

Number of periodic copies along z.

Definition at line 363 of file ComponentNeBem3d.hh.

◆ m_newBC

unsigned int Garfield::ComponentNeBem3d::m_newBC = 1
private

Definition at line 285 of file ComponentNeBem3d.hh.

◆ m_newMesh

unsigned int Garfield::ComponentNeBem3d::m_newMesh = 1
private

Definition at line 284 of file ComponentNeBem3d.hh.

◆ m_newModel

unsigned int Garfield::ComponentNeBem3d::m_newModel = 1
private

Definition at line 283 of file ComponentNeBem3d.hh.

◆ m_newPP

unsigned int Garfield::ComponentNeBem3d::m_newPP = 1
private

Definition at line 286 of file ComponentNeBem3d.hh.

◆ m_nThreads

unsigned int Garfield::ComponentNeBem3d::m_nThreads = 1
private

Definition at line 334 of file ComponentNeBem3d.hh.

◆ m_optChargingUp

unsigned int Garfield::ComponentNeBem3d::m_optChargingUp = 0
private

Definition at line 331 of file ComponentNeBem3d.hh.

◆ m_optCreateFastPF

unsigned int Garfield::ComponentNeBem3d::m_optCreateFastPF = 0
private

Definition at line 314 of file ComponentNeBem3d.hh.

◆ m_optCreateWtFldFastPF

unsigned int Garfield::ComponentNeBem3d::m_optCreateWtFldFastPF[11]
private

Definition at line 322 of file ComponentNeBem3d.hh.

◆ m_optFastVol

unsigned int Garfield::ComponentNeBem3d::m_optFastVol = 0
private

Definition at line 313 of file ComponentNeBem3d.hh.

◆ m_optForceValidation

unsigned int Garfield::ComponentNeBem3d::m_optForceValidation = 0
private

Definition at line 309 of file ComponentNeBem3d.hh.

◆ m_optKnownCharge

unsigned int Garfield::ComponentNeBem3d::m_optKnownCharge = 0
private

Definition at line 328 of file ComponentNeBem3d.hh.

◆ m_optReadElements

unsigned int Garfield::ComponentNeBem3d::m_optReadElements = 0
private

Definition at line 296 of file ComponentNeBem3d.hh.

◆ m_optReadFastPF

unsigned int Garfield::ComponentNeBem3d::m_optReadFastPF = 0
private

Definition at line 315 of file ComponentNeBem3d.hh.

◆ m_optReadInflMatrix

unsigned int Garfield::ComponentNeBem3d::m_optReadInflMatrix = 0
private

Definition at line 290 of file ComponentNeBem3d.hh.

◆ m_optReadInvMatrix

unsigned int Garfield::ComponentNeBem3d::m_optReadInvMatrix = 0
private

Definition at line 292 of file ComponentNeBem3d.hh.

◆ m_optReadPrimitives

unsigned int Garfield::ComponentNeBem3d::m_optReadPrimitives = 0
private

Definition at line 294 of file ComponentNeBem3d.hh.

◆ m_optReadWtFldFastPF

unsigned int Garfield::ComponentNeBem3d::m_optReadWtFldFastPF[11]
private

Definition at line 323 of file ComponentNeBem3d.hh.

◆ m_optRepeatLHMatrix

unsigned int Garfield::ComponentNeBem3d::m_optRepeatLHMatrix = 0
private

Definition at line 310 of file ComponentNeBem3d.hh.

◆ m_optRmPrim

unsigned int Garfield::ComponentNeBem3d::m_optRmPrim = 0
private

Definition at line 347 of file ComponentNeBem3d.hh.

◆ m_optStoreElements

unsigned int Garfield::ComponentNeBem3d::m_optStoreElements = 0
private

Definition at line 295 of file ComponentNeBem3d.hh.

◆ m_optStoreFormatted

unsigned int Garfield::ComponentNeBem3d::m_optStoreFormatted = 1
private

Definition at line 297 of file ComponentNeBem3d.hh.

◆ m_optStoreInflMatrix

unsigned int Garfield::ComponentNeBem3d::m_optStoreInflMatrix = 0
private

Definition at line 289 of file ComponentNeBem3d.hh.

◆ m_optStoreInvMatrix

unsigned int Garfield::ComponentNeBem3d::m_optStoreInvMatrix = 1
private

Definition at line 291 of file ComponentNeBem3d.hh.

◆ m_optStorePrimitives

unsigned int Garfield::ComponentNeBem3d::m_optStorePrimitives = 0
private

Definition at line 293 of file ComponentNeBem3d.hh.

◆ m_optStoreUnformatted

unsigned int Garfield::ComponentNeBem3d::m_optStoreUnformatted = 0
private

Definition at line 298 of file ComponentNeBem3d.hh.

◆ m_optSystemChargeZero

unsigned int Garfield::ComponentNeBem3d::m_optSystemChargeZero = 1
private

Definition at line 307 of file ComponentNeBem3d.hh.

◆ m_optValidateSolution

unsigned int Garfield::ComponentNeBem3d::m_optValidateSolution = 1
private

Definition at line 308 of file ComponentNeBem3d.hh.

◆ m_optWtFldFastVol

unsigned int Garfield::ComponentNeBem3d::m_optWtFldFastVol[11]
private

Definition at line 321 of file ComponentNeBem3d.hh.

◆ m_periodicLength

std::array<double, 3> Garfield::ComponentNeBem3d::m_periodicLength {{0., 0., 0.}}
private

Periodic lengths.

Definition at line 357 of file ComponentNeBem3d.hh.

357{{0., 0., 0.}};

◆ m_primAfter

int Garfield::ComponentNeBem3d::m_primAfter = -1
private

Definition at line 338 of file ComponentNeBem3d.hh.

◆ m_primitives

std::vector<Primitive> Garfield::ComponentNeBem3d::m_primitives
private

List of primitives.

Definition at line 242 of file ComponentNeBem3d.hh.

◆ m_targetElementSize

double Garfield::ComponentNeBem3d::m_targetElementSize = 50.0e-4
private

Target size of elements [cm].

Definition at line 351 of file ComponentNeBem3d.hh.

◆ m_versionFV

unsigned int Garfield::ComponentNeBem3d::m_versionFV = 0
private

Definition at line 316 of file ComponentNeBem3d.hh.

◆ m_versionWtFldFV

unsigned int Garfield::ComponentNeBem3d::m_versionWtFldFV[11]
private

Definition at line 324 of file ComponentNeBem3d.hh.

◆ m_vtplan

std::array<double, 6> Garfield::ComponentNeBem3d::m_vtplan {{0., 0., 0., 0., 0., 0.}}
private

Plane potentials.

Definition at line 280 of file ComponentNeBem3d.hh.

280{{0., 0., 0., 0., 0., 0.}};

◆ m_wfields

std::map<std::string, int> Garfield::ComponentNeBem3d::m_wfields
private

Electrode labels and corresponding neBEM weighting field indices.

Definition at line 369 of file ComponentNeBem3d.hh.

◆ m_wtFldPrimAfter

int Garfield::ComponentNeBem3d::m_wtFldPrimAfter = -1
private

Definition at line 343 of file ComponentNeBem3d.hh.

◆ m_ynplan

std::array<bool, 6> Garfield::ComponentNeBem3d::m_ynplan {{false, false, false, false, false, false}}
private

Plane existence.

Definition at line 276 of file ComponentNeBem3d.hh.

276{{false, false, false, false, false, false}};

◆ MinDist

double Garfield::ComponentNeBem3d::MinDist = 1.e-6
staticconstexprprivate

Definition at line 349 of file ComponentNeBem3d.hh.


The documentation for this class was generated from the following file: