Bemsolver 2.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

D3element Class Reference

#include <bem.h>

Inheritance diagram for D3element:
Inheritance graph
[legend]
Collaboration diagram for D3element:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void correctNorm (double x0, double y0, double z0)
 Uses ray-shooting to determine the norm and should only be used for externally imported geometrical figures.
virtual bool IntersectWithRay (double x0, double y0, double z0, double xdir, double ydir, double zdir, double &mul)
virtual void InsertTGeoVolume (TGeoVolume *top, TGeoMedium *mat, TGeoMedium *matVak, TGeoManager *geom)
virtual double GetSelfPotential ()
virtual double GetPotentialAt (double x, double y, double z)
virtual double GetSelfDoubleLayerPotential ()
virtual double GetDoubleLayerPotentialAt (double x, double y, double z)
virtual void GetPotentialAndFieldAt (double x, double y, double z, double &pot, double &ex, double &ey, double &ez)
virtual double GetArea ()
virtual void GetCenter (double &x, double &y, double &z)
 D3element (double x_, double y_, double z_, double phi_, double theta_, double psi_, bool inversenorm_=false, bool refineable_=true, D3element *parent_=NULL, double epsilon=0, string name="")
 ~D3element ()
virtual void GetReferencePoint (double &x, double &y, double &z)
virtual void init (bool ignorefirst=false)
virtual void refine (double length)
 Refines a geometrical figure.
virtual void refine (double length, int num)
int GetAmountOfSubelements ()
int PrintAmountOfSubelements ()
void GetListOfBaseElements (PD3element *el, int &cnt)
virtual void rotate (double phi_, double theta_, double psi_)
virtual void shift (double xs, double ys, double zs)
virtual void rotate2 (double phi_, double theta_, double psi_, double x, double y, double z, double &x2, double &y2, double &z2)
virtual void rotateinv (double phi_, double theta_, double psi_, double x, double y, double z, double &x2, double &y2, double &z2)
void Add (PD3element el)
virtual void GetTriangle (double *A, double *B, double *C, double *COL)
virtual void GetRectangle (double *A, double *B, double *C, double *D, double *COL)
virtual void SetNormTowards (double x, double y, double z, bool towards)
virtual void createNewSubelements (double length)
virtual string getName ()
virtual void setName (string name2)
virtual bool GetInversenorm ()

Public Attributes

D3elementparent
int Color
string name
list< D3element * > subelement

Protected Member Functions

virtual void deleteSubelements ()

Protected Attributes

double epsilon
TGeoHMatrix h
double x
double y
double z
double phi
double theta
double psi
bool isBaseElement
bool refineable
bool inversenorm

Constructor & Destructor Documentation

D3element::D3element ( double  x_,
double  y_,
double  z_,
double  phi_,
double  theta_,
double  psi_,
bool  inversenorm_ = false,
bool  refineable_ = true,
D3element parent_ = NULL,
double  epsilon = 0,
string  name = "" 
)
D3element::~D3element ( )

Member Function Documentation

void D3element::Add ( PD3element  el)
virtual void D3element::correctNorm ( double  x0,
double  y0,
double  z0 
) [virtual]

Uses ray-shooting to determine the norm and should only be used for externally imported geometrical figures.

From Point (x0, y0, z0) Rays are being shot towards the object in order to determine in which direction the normal vector of each surface is pointing. Generally, all normal vectors can point either to the inside of the object or to the outside of the object. We should make sure that all normal vectors are pointing in the same direction!

A blue color on each outside-surface indicates a correct norm, which means that all normal Vectors are pointing in the same direction. The ions that fly by the electrodes see only the outside-surfaces of the electrodes. If an outside-surface has an incorrect norm, the ion will not be influenced correctly by the surface. This means that all outside-surfaces should be blue!

A red color on at least one outside-surface indicates that at least one normal vector is pointing in a different direction than the others. In this case we need to modify the parameters x0/y0/z0.

Important for the "shooting point" (x0,y0,z0): It must not be in the same plane as one of the surfaces!! Furthermore it must not be inside a geometrical figure!! Otherwise the Ray-Shooting method will not work properly.

Parameters:
x0x-coordinate of the shooting-point
y0y-coordinate of the shooting-point
z0z-coordinate of the shooting-point
virtual void D3element::createNewSubelements ( double  length) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual void D3element::deleteSubelements ( ) [protected, virtual]
int D3element::GetAmountOfSubelements ( )
virtual double D3element::GetArea ( ) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual void D3element::GetCenter ( double &  x,
double &  y,
double &  z 
) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual double D3element::GetDoubleLayerPotentialAt ( double  x,
double  y,
double  z 
) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual bool D3element::GetInversenorm ( ) [virtual]
void D3element::GetListOfBaseElements ( PD3element el,
int &  cnt 
)
virtual string D3element::getName ( ) [virtual]
virtual void D3element::GetPotentialAndFieldAt ( double  x,
double  y,
double  z,
double &  pot,
double &  ex,
double &  ey,
double &  ez 
) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual double D3element::GetPotentialAt ( double  x,
double  y,
double  z 
) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual void D3element::GetRectangle ( double *  A,
double *  B,
double *  C,
double *  D,
double *  COL 
) [virtual]

Reimplemented in D3rectangle.

virtual void D3element::GetReferencePoint ( double &  x,
double &  y,
double &  z 
) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual double D3element::GetSelfDoubleLayerPotential ( ) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual double D3element::GetSelfPotential ( ) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual void D3element::GetTriangle ( double *  A,
double *  B,
double *  C,
double *  COL 
) [virtual]

Reimplemented in D3triangle.

virtual void D3element::init ( bool  ignorefirst = false) [virtual]
virtual void D3element::InsertTGeoVolume ( TGeoVolume *  top,
TGeoMedium *  mat,
TGeoMedium *  matVak,
TGeoManager *  geom 
) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual bool D3element::IntersectWithRay ( double  x0,
double  y0,
double  z0,
double  xdir,
double  ydir,
double  zdir,
double &  mul 
) [virtual]

Reimplemented in D3triangle, and D3rectangle.

int D3element::PrintAmountOfSubelements ( )
virtual void D3element::refine ( double  length,
int  num 
) [virtual]
virtual void D3element::refine ( double  length) [virtual]

Refines a geometrical figure.

This means that the original geometrical object will be filled with smaller versions of itself. Works good with cubic objects.

Does not work good with other objects like cylinders etc..?? //x

The parameter length determines the size of the smaller objects.

Example: Cube with sides (1x1x1) and parameter length 0.1 => 10 small cubes will be fit along each side, so the cube will then contain 10*10*10=1000 small cubes.

Press ctrl+w to see the lattice model and get an impression of the refinement. Press ctrl+r to see the original model again

Parameters:
lengthsize of the smaller objects that fill up the incident object
virtual void D3element::rotate ( double  phi_,
double  theta_,
double  psi_ 
) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual void D3element::rotate2 ( double  phi_,
double  theta_,
double  psi_,
double  x,
double  y,
double  z,
double &  x2,
double &  y2,
double &  z2 
) [virtual]
virtual void D3element::rotateinv ( double  phi_,
double  theta_,
double  psi_,
double  x,
double  y,
double  z,
double &  x2,
double &  y2,
double &  z2 
) [virtual]
virtual void D3element::setName ( string  name2) [virtual]
virtual void D3element::SetNormTowards ( double  x,
double  y,
double  z,
bool  towards 
) [virtual]

Reimplemented in D3triangle, and D3rectangle.

virtual void D3element::shift ( double  xs,
double  ys,
double  zs 
) [virtual]

Reimplemented in D3triangle, and D3rectangle.


Member Data Documentation

double D3element::epsilon [protected]
TGeoHMatrix D3element::h [protected]
bool D3element::inversenorm [protected]
bool D3element::isBaseElement [protected]
double D3element::phi [protected]
double D3element::psi [protected]
bool D3element::refineable [protected]
double D3element::theta [protected]
double D3element::x [protected]

Reimplemented in D3world.

double D3element::y [protected]
double D3element::z [protected]

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Friends Defines