MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Cylinder Class Reference

Infinite cylinder Shape. More...

#include <Cylinder.hxx>

Inheritance diagram for Cylinder:
Shape TReference

Public Member Functions

 Cylinder (double R=0.01, double X=0, double Y=0, double Z=0, double dX=0, double dY=0, double dZ=1, double Signe=-1)
 
Get shape parameters
double GetR ()
 return Radius of the Sphere More...
 
double GetX ()
 return x-position of its center More...
 
double GetY ()
 return y-position of its center More...
 
double GetZ ()
 return z-position of its center More...
 
double GetdX ()
 return 1st component of the axis vector More...
 
double GetdY ()
 return 2nd component of the axis vector More...
 
double GetdZ ()
 return 3th component of the axis vector More...
 
Shape transformations
virtual void Translate (double dx, double dy, double dz, int count=0)
 
virtual void Rotate (double phi, double theta=0, double psi=0, double *center=0, int count=0)
 
Relations with other shapes
unsigned IsCylinder ()
 1 if Shape is a Cylinder More...
 
unsigned Inclus (Shape_ptr OtherShape)
 return 1 if the Cylinder is included in OtherShape otherwise 0 More...
 
unsigned Disjoint (Shape_ptr OtherShape)
 return 1 if the Cylinder is Disjointed of OtherShape otherwise 0 More...
 
Miscellaneous methods
void DefineSurface ()
 Define surface in MCNP format. More...
 
bool PointInShape (double *P, int border)
 
Shape_ptr Clone (int count=0)
 Clone a Shape. More...
 
void Copy (Shape_ptr C)
 Copy all attributs of a Shape (but not attributs of the father classes). More...
 
double * GetVirtualSphereCenter ()
 returns the center of a Sphere containing the Shape More...
 
void CalculNot ()
 Allocates and calculs the complement of a Cylinder. More...
 
- Public Member Functions inherited from Shape
 Shape ()
 Default constructor. The interior of a Shape is built. More...
 
 Shape (const Shape &s)
 Copy constructor. More...
 
virtual ~Shape ()
 Normal destructor. More...
 
double GetSigne ()
 Return -1 if the Shape exterior is considered, +1 otherwise. More...
 
void SetSigne (double s)
 
void SetOutermostShape (bool flag=true)
 Say that this Shape is the most outer one. More...
 
bool IsInfinite ()
 Return 1 if the Shape is an axially infinite one (??? why not resolve thru inheritance as same as shape type?) More...
 
virtual unsigned IsBrick ()
 1 if Shape is a Brick More...
 
virtual unsigned IsFullVoid ()
 1 if Shape is Full (whole space) or Void (empty set) More...
 
virtual unsigned IsHexagon ()
 1 if Shape is a Hexagon More...
 
virtual unsigned IsNode ()
 1 if Shape is a Node More...
 
virtual unsigned IsPlane ()
 1 if Shape is a Plane More...
 
virtual unsigned IsSphere ()
 1 if Shape is a Sphere More...
 
virtual unsigned IsTube ()
 1 if Shape is a Tube More...
 
virtual unsigned IsFull ()
 1 if Shape is Full (whole space) More...
 
virtual unsigned IsVoid ()
 1 if Shape is Void (empty set) More...
 
virtual double GetVolume ()
 Get the Volume of a Shape. More...
 
virtual double GetSurface ()
 Get the Surface of a Shape. More...
 
void SetVolume (double V)
 Set the volume of a Shape to V. More...
 
void SetSurface (double S)
 Set the surface of a Shape to S. More...
 
virtual void SetMirrorBoundary (bool state=true)
 mirror a particle on the surface More...
 
virtual void SetTopBottomPlanesOpen ()
 The top/bottom planes are NOT mirrors. More...
 
virtual bool GetTopBottomPlanesOpen ()
 GetThe top/bottom planes are NOT mirrors. More...
 
virtual void SetSidePlanesOpen ()
 The side planes are NOT mirrors. More...
 
virtual bool GetSidePlanesOpen ()
 GetThe side planes are NOT mirrors. More...
 
virtual void SetWhiteBoundary (bool state=true)
 mirror a particle on the surface with a cosine distribution More...
 
virtual void SetPeriodicBoundary (bool state=true, string TopBottPlaneBC="mirror")
 Periodic boundary (WARNING: only for Brick and Hexagon). More...
 
virtual bool IsMirrorBoundary ()
 mirror a particle on the surface More...
 
virtual bool IsWhiteBoundary ()
 mirror a particle on the surface with a cosine distribution More...
 
virtual bool IsPeriodicBoundary ()
 Periodic boundary (only for Brick or Hexagon) More...
 
Shape_ptr Not ()
 Return the complementary Shape (i.e. the other side) More...
 
void RotateVector (double *V, double phi, double theta=0, double psi=0)
 Rotate a Vector clockwise. ??? why a shape member? More...
 
void RotatePoint (double *P, double phi, double theta=0, double psi=0, double *center=0)
 Rotate a Point clockwise.??? why a shape member? More...
 
virtual unsigned Add (Shape_ptr OtherShape)
 Add a new Shape (in fact a Shape_ptr) to a Node. More...
 
virtual void SetMouvement (bool state=true)
 Set the fMouvement flag to state;. More...
 
virtual void UnSetMouvement ()
 Set the fMouvement flag to false;. More...
 
bool GetMouvement ()
 returns fMouvement flag; More...
 
virtual void Simplify (bool violent=false)
 Simplify a tree of Node. More...
 
virtual void DevElague (int count=0, bool violent=false)
 Developps and Trims a tree of Node. More...
 
unsigned AddInsideShape (Shape_ptr OtherShape)
 Add a Shape in fInsideShape each time a "put in" is done. More...
 
unsigned AddOriginalInsideShape (Shape_ptr OtherShape)
 This method is called by Shape::AddInsideShape. More...
 
void ClearOriginalInsideShape ()
 Clear all Inside Shapes. More...
 
void ClearInsideShape ()
 Clear all Inside Shapes. More...
 
unsigned GetInsideShapeSize ()
 return the number of Shape put in this More...
 
unsigned GetOriginalInsideShapeSize ()
 return the number of Original Shape put in this More...
 
void SetInsideShape (int i, Shape_ptr S)
 set the ith InsideShape put in to S More...
 
void SetOriginalInsideShape (int i, Shape_ptr S)
 set the ith Original InsideShape put in to S More...
 
Shape_ptr GetInsideShape (int i)
 return the ith InsideShape put in this More...
 
Shape_ptr GetOriginalInsideShape (int i)
 return the ith Original InsideShape put in this More...
 
virtual string Print ()
 Print the Shape surface in MCNP cell. More...
 
virtual string PrintSurface ()
 Print the Shape surfaces in MCNP surface block. More...
 
void SetClone (Shape_ptr clone)
 Set the CloneShape to clone. More...
 
void SetClone2Not ()
 Set the CloneShape to a Not. More...
 
virtual Shape_ptr GetLeaf (int i)
 returns the i-th leaf (Shape) of a Node More...
 
virtual int GetNumberOfLeaves ()
 returns the number of leaves (Shape) of a Node More...
 
void AddSurfaceNumber (int i)
 Give the vector of Surface of the Shape. More...
 
vector< int > GetSurfaceNumber ()
 Give the vector of Surface of the Shape. More...
 
virtual void AlreadyDefine (bool state=true)
 Set a flag to know wheter a surface is already defined. More...
 
virtual void SetUniverse (int u=0)
 Set the Universe number for a shape used in a lattice. More...
 
virtual void SetFill (int f)
 Set the Universe number filling a Shape. More...
 
int GetUniverse ()
 return the Univers number if exists. More...
 
int GetFill ()
 return the Univers number that fills the Shape. More...
 
void IncrementSurface (double S)
 Increment the surface of a Shape of S. More...
 
virtual double GetVirtualSphereRadius ()
 returns the radius of a Sphere containing the Shape More...
 
virtual void RemoveSurface ()
 
virtual void PrintX (int count=0)
 Debug method: Print the shape surface when fMouvement=true. More...
 
virtual void PrintY (int count=0)
 Debug method: Print the shape surfaces, InsideShape,... More...
 
void NewNot ()
 Update the Not. More...
 
virtual void SetLinkedPlane (Shape_ptr P)
 linked plane for periodic boundary More...
 
virtual void ReplaceNode (Shape_ptr C)
 Replace a Node by an other (C must be a Node) More...
 
double PS (double *U, double *V)
 Scalar product of 3D vectors U and V. More...
 
string GetName ()
 returns the Shape name More...
 
virtual int NumberOfShapes ()
 returns the number of Shape More...
 
void SetZone (int z)
 set test flag for complex geometries More...
 
int GetZone ()
 get test flag for complex geometries More...
 
- Public Member Functions inherited from TReference
 TReference ()
 Default constructor. Number of references is set to 0. More...
 
virtual ~TReference ()
 Destructor. More...
 
void AddReference (unsigned n=1)
 Add n references to an object. More...
 
unsigned DelReference (unsigned n=1)
 Remove n references to an object. More...
 
unsigned Reference ()
 returns the Number of references to an object More...
 

Protected Member Functions

void Norme ()
 Normalisation of axis vector. More...
 
- Protected Member Functions inherited from Shape
void SetNot (Shape *Not)
 Allocates and calculs the complement of Shape. More...
 
void SetNotofNot ()
 Give a Not to the Not. More...
 
void UpdateSurface (Surface *&S)
 Add (if not exists) the surface S to MURE::fSurfaceVector. More...
 

Protected Attributes

double fR
 Radius of the Cylinder. More...
 
double fX
 x-position of its center More...
 
double fY
 y-position of its center More...
 
double fZ
 z-position of its center More...
 
double fdX
 1st component of the axis vector More...
 
double fdY
 2nd component of the axis vector More...
 
double fdZ
 3th component of the axis vector More...
 
- Protected Attributes inherited from Shape
vector< int > fSurfaceNumber
 number(s) of Surface(s) defining the Shape More...
 
vector< Shape_ptrfInsideShape
 a vector to remember which Shapes are inside the current one.Clear at each ">>" More...
 
vector< Shape_ptrfOriginalInsideShape
 a vector to remember which Shapes are inside the current one. More...
 
double fSigne
 Define whether the interior (-1) or the exterior (+1) of the Shape is considered. More...
 
bool fInfinite
 Determines whether the shape is infinite or not. More...
 
ShapefNot
 pointer on complementary Shape if exists, else 0. More...
 
bool fAlreadyDefine
 Flag to know whether a surface is already defined. More...
 
bool fMouvement
 Flag that indicate a Shape is in mouvement (translation,..) in a tree. More...
 
int fUniverse
 Universe number (for lattice filling) More...
 
int fFill
 Universe number that fill the Shape. More...
 
double fVolume
 the Volume of a Shape; More...
 
double fSurface
 the Surface of a Shape; More...
 
string fName
 Name of a Shape. More...
 
double fVirtualSphereR
 the radius of a Sphere containing the Shape More...
 
double * fVirtualSphereO
 the center of a Sphere containing the Shape More...
 
Shape_ptr fCloneShape
 the clone of a Shape More...
 
bool fMirrorBoundary
 wether or not mirror a particle on the surface More...
 
bool fOpenZPlanes
 whether the top/bottom planes are not mirrors (default=false) More...
 
bool fOpenXYPlanes
 whether the side planes are not mirrors (default=false) More...
 
bool fWhiteBoundary
 wether or not mirror a particle on the surface with a cosine distribution More...
 
bool fPeriodicBoundary
 wether or not Periodic boundary are applied (only for plane) More...
 
string fTopBottPlaneBoundaryCondition
 wether the top(bottom) plane of a periodic boundary Shape is white or mirror More...
 
Shape_ptr fLinkedPlane
 the Plane linked to an this for periodic boundary More...
 
bool fOutermostShape
 wether or not this Shape is the limit to the exterior world (for calculating particle losses). More...
 
int fZone
 flag for identifying complex geometries (test fms) More...
 

Detailed Description

Infinite cylinder Shape.

Define an (infinite) cylinder Shape. Default: Interior of an origin center Cylinder of radius 0.01m and z-axis (in MCNP CZ 1) It is defined by the axis (fdX,fdY,fdZ), an origin on the axis (fX,fY,fZ), ans a radius (fR).

Author
WEC
Version
0.1

Constructor & Destructor Documentation

Cylinder::Cylinder ( double  R = 0.01,
double  X = 0,
double  Y = 0,
double  Z = 0,
double  dX = 0,
double  dY = 0,
double  dZ = 1,
double  Signe = -1 
)

Normal Constructor. Default: Interior of an origin center Cylinder of radius 0.01m and z-axis (in MCNP CZ 1)

Parameters
R: radius of the Cylinder
X: x-position of its center
Y: y-position of its center
Z: z-position of its center
dX: 1st component of the axis vector
dY: 2nd component of the axis vector
dZ: 3th component of the axis vector
Signe: whether interior (-1) or exterior (+1) of the Cylinder is considered

Member Function Documentation

void Cylinder::CalculNot ( )
virtual

Allocates and calculs the complement of a Cylinder.

Reimplemented from Shape.

Shape_ptr Cylinder::Clone ( int  count = 0)
virtual

Clone a Shape.

Reimplemented from Shape.

void Cylinder::Copy ( Shape_ptr  C)
virtual

Copy all attributs of a Shape (but not attributs of the father classes).

Reimplemented from Shape.

void Cylinder::DefineSurface ( )
virtual

Define surface in MCNP format.

Reimplemented from Shape.

unsigned Cylinder::Disjoint ( Shape_ptr  OtherShape)
virtual

return 1 if the Cylinder is Disjointed of OtherShape otherwise 0

Reimplemented from Shape.

double Cylinder::GetdX ( )
inline

return 1st component of the axis vector

double Cylinder::GetdY ( )
inline

return 2nd component of the axis vector

double Cylinder::GetdZ ( )
inline

return 3th component of the axis vector

double Cylinder::GetR ( )
inline

return Radius of the Sphere

double * Cylinder::GetVirtualSphereCenter ( )
virtual

returns the center of a Sphere containing the Shape

Reimplemented from Shape.

double Cylinder::GetX ( )
inline

return x-position of its center

double Cylinder::GetY ( )
inline

return y-position of its center

double Cylinder::GetZ ( )
inline

return z-position of its center

unsigned Cylinder::Inclus ( Shape_ptr  OtherShape)
virtual

return 1 if the Cylinder is included in OtherShape otherwise 0

Reimplemented from Shape.

unsigned Cylinder::IsCylinder ( )
inlinevirtual

1 if Shape is a Cylinder

Reimplemented from Shape.

void Cylinder::Norme ( )
protected

Normalisation of axis vector.

bool Cylinder::PointInShape ( double *  P,
int  border 
)
virtual

true if the point P is in the Shape.

Parameters
P: a (x,y,z) point of space
border: =-1 : if P is at the Shape surface then P is inside
border: =+1 : if P is at the Shape surface then P is outside

Reimplemented from Shape.

void Cylinder::Rotate ( double  phi,
double  theta = 0,
double  psi = 0,
double *  center = 0,
int  count = 0 
)
virtual

Rotate the Shape clockwise.

Parameters
phi: arround z axis
theta: arround y axis
psi: arround x axis
center: the center of rotation (Default=origin)
count: normal used is default (=0) ; usefull to know the recursion depth

Reimplemented from Shape.

void Cylinder::Translate ( double  dx,
double  dy,
double  dz,
int  count = 0 
)
virtual

Translate the Node of (dx,dy,dz).

Parameters
dx: translation along x-axis
dy: translation along y-axis
dz: translation along z-axis
count: normal used is default (=0) ; usefull to know the recursion depth

Reimplemented from Shape.

Member Data Documentation

double Cylinder::fdX
protected

1st component of the axis vector

double Cylinder::fdY
protected

2nd component of the axis vector

double Cylinder::fdZ
protected

3th component of the axis vector

double Cylinder::fR
protected

Radius of the Cylinder.

double Cylinder::fX
protected

x-position of its center

double Cylinder::fY
protected

y-position of its center

double Cylinder::fZ
protected

z-position of its center


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

MURE Project, documentation generated by Doxygen 1.8.5 - Mon Nov 17 2014