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

A Tube is a finite Cylinder with a hole inside (like a pipe). More...

#include <Tube.hxx>

Inheritance diagram for Tube:
Node Shape TReference

Public Member Functions

 Tube (double HalfHeight=0.005, double Rout=0.01, double Rin=0., double Signe=-1)
 Normal Constructor. More...
 
 Tube (double X, double Y, double Z, double dX, double dY, double dZ, double HalfHeight, double Rout, double Rin=0., double Signe=-1)
 Directed Constructor. More...
 
 Tube (const Tube &t)
 Copy Constructor. More...
 
Shape_ptr Clone (int count=0)
 Clone a Shape. More...
 
virtual void Copy (Shape_ptr S)
 Copy all attributs of a Shape S (but not attributs of the father classes). More...
 
unsigned IsTube ()
 1 if Shape is a Tube More...
 
Shape parameters
Shape_ptr GetOutCylinder ()
 return the outer Cylinder More...
 
Shape_ptr GetBottomPlane ()
 return bottom Plane that cut the cylinder More...
 
Shape_ptr GetTopPlane ()
 return top Plane that cut the cylinder More...
 
Shape_ptr GetInCylinder ()
 return the inner Cylinder when exists, otherwise 0 More...
 
double GetHalfHeight ()
 return the Half Height of the Tube. More...
 
double GetInnerRadius ()
 return the inner radius of the Tube. More...
 
double GetOuterRadius ()
 return the outer radius of the Tube. More...
 
Relations with other shapes
unsigned Inclus (Shape_ptr OtherShape)
 +1 this is included in OtherShape, 0 not included or don't know. More...
 
unsigned Disjoint (Shape_ptr OtherShape)
 +1 this is disjointed in OtherShape, 0 not included or don't know. More...
 
Miscellaneous methods
double GetVirtualSphereRadius ()
 returns the radius of a Sphere containing the Shape More...
 
double * GetVirtualSphereCenter ()
 returns the center of a Sphere containing the Shape More...
 
void CalculNot ()
 Allocates and calculs the complement of Shape. More...
 
void SetTopBottomPlanesOpen ()
 The top/bottom planes are NOT mirrors. More...
 
void SetSidePlanesOpen ()
 The side planes are NOT mirrors. More...
 
- Public Member Functions inherited from Node
 Node (double Signe=+1)
 
 Node (const Node &n)
 Copy constructor. More...
 
 ~Node ()
 Normal destrutor. More...
 
unsigned IsNode ()
 +1 for a Node More...
 
unsigned IsFullVoid ()
 1 if the Node is void or full. More...
 
unsigned IsVoid ()
 1 if the node is void. More...
 
unsigned IsFull ()
 1 if the node is Full. More...
 
double GetVolume ()
 return the Volume of a Node More...
 
Shape_ptr GetLeaf (int i)
 returns the i-th leaf (Shape) of a Node More...
 
int GetNumberOfLeaves ()
 returns the number of leaves (Shape) of a Node More...
 
unsigned Add (Shape_ptr OtherShape)
 Add a new Shape (in fact a Shape_ptr) to a Node. More...
 
void SetBoundingShape (Shape_ptr theShape)
 Declare a bounding shape. More...
 
Shape_ptr GetBoundingShape ()
 return the BoundingShape if exist More...
 
void SetIncludedShape (Shape_ptr theShape)
 Declare an included shape. More...
 
Shape_ptr GetIncludedShape ()
 return the IncludedShape if exist More...
 
virtual void SetMirrorBoundary (bool state=true)
 mirror a particle on the surface More...
 
virtual bool GetTopBottomPlanesOpen ()
 Get Top and bottom planes open. More...
 
virtual bool GetSidePlanesOpen ()
 Get The side planes open. More...
 
virtual void SetWhiteBoundary (bool state=true)
 mirror a particle on the surface with a cosine distribution More...
 
virtual void Translate (double dx, double dy, double dz, int count=0)
 Translate the Node of (dx,dy,dz). More...
 
virtual void Rotate (double phi, double theta=0, double psi=0, double *center=0, int count=0)
 Rotate the Node clockwise. More...
 
virtual unsigned Contain (Shape_ptr OtherShape)
 +1 this is contains in OtherShape, 0 not included or don't know. More...
 
void Simplify (bool violent=false)
 Simplify a tree of Node. More...
 
void ElagueRoot ()
 Trims a tree with a Chain Saw. More...
 
virtual void UnSetMouvement ()
 Set the fMouvement flag to false;. More...
 
void ClearVectorShape (int UMVT=0)
 Clear VectorShape. More...
 
virtual string Print ()
 Print the Node surface in MCNP cell. More...
 
void SetUniverse (int u=0)
 Set the Universe number for a shape used in a lattice. More...
 
void AlreadyDefine (bool state=true)
 Set a flag to know wheter a surface is already defined. More...
 
bool PointInShape (double *P, int border)
 true if the point P is in the Shape. More...
 
void PrintX (int count=0)
 Debug method: Print the shape surface when fMouvement=true. More...
 
void PrintY (int count=0)
 Debug method: Print the shape surfaces, InsideShape,... More...
 
virtual void ReplaceNode (Shape_ptr C)
 Replace a Node by an other (C must be a Node) More...
 
int NumberOfShapes ()
 return the number of Shapes contains in a Node 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 IsCylinder ()
 1 if Shape is a Cylinder More...
 
virtual unsigned IsHexagon ()
 1 if Shape is a Hexagon More...
 
virtual unsigned IsPlane ()
 1 if Shape is a Plane More...
 
virtual unsigned IsSphere ()
 1 if Shape is a Sphere 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 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 void SetMouvement (bool state=true)
 Set the fMouvement flag to state;. More...
 
bool GetMouvement ()
 returns fMouvement flag; 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 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...
 
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 DefineSurface ()
 Define MCNP surfaces for this Shape. 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...
 
void NewNot ()
 Update the Not. More...
 
virtual void SetLinkedPlane (Shape_ptr P)
 linked plane for periodic boundary More...
 
double PS (double *U, double *V)
 Scalar product of 3D vectors U and V. More...
 
string GetName ()
 returns the Shape name 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

bool IsSameAxis (Tube *tube)
 whether or not 2 tubes have same z-axis More...
 
bool IsSameAxis (Cylinder *cyl)
 whether or not a tube and a cylinder have same z-axis More...
 
- Protected Member Functions inherited from Node
void RemoveSurface ()
 Removed unused surface from gMURE. More...
 
void Remove (vector< Shape_ptr >::iterator Iterator)
 remove a vector element 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 fRout
 outer radius of the Tube More...
 
double fRin
 inner radius of the Tube More...
 
double fHalfHeight
 Half height of the Tube. More...
 
- Protected Attributes inherited from Node
vector< Shape_ptrfShapeVector
 a vector of Shape_ptr of a Node More...
 
vector< Shape_ptrfDestroyShape
 a vector of destroyed Shape_ptr of a Node (for UnSetMouvement()) More...
 
Shape_ptr fBoundingShape
 Shape containing the Node, 0 for none. More...
 
Shape_ptr fIncludedShape
 Shape included in the Node, 0 for none. More...
 
bool fTube
 true if the Node is a Tube More...
 
bool fHexagon
 true if the Node is an Hexagon More...
 
int fCount
 count flag to unset mvt 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

A Tube is a finite Cylinder with a hole inside (like a pipe).

A Tube is defined by the intersection of the inner part of a big Cynlinder with the outer part of a smaller Cylinder and 2 cutting planes Default Tube is the interior of a vertical Cylinder (radius 1cm) center at origin and full (a full Cylinder of height 2cm).

Author
PTO
Version
1.0

Constructor & Destructor Documentation

Tube::Tube ( double  HalfHeight = 0.005,
double  Rout = 0.01,
double  Rin = 0.,
double  Signe = -1 
)

Normal Constructor.

Default: Interior of full Cylinder (radius 0.01m) ceneter at origin and 0.01m high.

Parameters
HalfHeight: Half height of the Tube
Rout: outer radius of the Tube
Rin: inner radius of the Tube
Signe: whether interior of the Tube is considered (-1) or exterior (+1)
Tube::Tube ( double  X,
double  Y,
double  Z,
double  dX,
double  dY,
double  dZ,
double  HalfHeight,
double  Rout,
double  Rin = 0.,
double  Signe = -1 
)

Directed Constructor.

Build a cylinder of Direction dX,dY,dZ and centered on X,Y,Z

Parameters
X: X-coordinate of the center
Y: Y-coordinate of the center
Z: Z-coordinate of the center
dX: Axis component along x
dY: Axis component along y
dZ: Axis component along z
HalfHeight: Half height of the Tube
Rout: outer radius of the Tube
Rin: inner radius of the Tube
Signe: whether interior of the Tube is considered (-1) or exterior (+1)
Tube::Tube ( const Tube t)

Copy Constructor.

< outer radius of the Tube

< inner radius of the Tube

< Half height of the Tube

Member Function Documentation

void Tube::CalculNot ( )
virtual

Allocates and calculs the complement of Shape.

Reimplemented from Node.

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

Clone a Shape.

Reimplemented from Node.

void Tube::Copy ( Shape_ptr  S)
virtual

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

Reimplemented from Shape.

unsigned Tube::Disjoint ( Shape_ptr  OtherShape)
virtual

+1 this is disjointed in OtherShape, 0 not included or don't know.

Reimplemented from Node.

Shape_ptr Tube::GetBottomPlane ( )
inline

return bottom Plane that cut the cylinder

double Tube::GetHalfHeight ( )
inline

return the Half Height of the Tube.

Shape_ptr Tube::GetInCylinder ( )
inline

return the inner Cylinder when exists, otherwise 0

double Tube::GetInnerRadius ( )
inline

return the inner radius of the Tube.

Shape_ptr Tube::GetOutCylinder ( )
inline

return the outer Cylinder

double Tube::GetOuterRadius ( )
inline

return the outer radius of the Tube.

Shape_ptr Tube::GetTopPlane ( )
inline

return top Plane that cut the cylinder

double * Tube::GetVirtualSphereCenter ( )
virtual

returns the center of a Sphere containing the Shape

Reimplemented from Node.

double Tube::GetVirtualSphereRadius ( )
virtual

returns the radius of a Sphere containing the Shape

Reimplemented from Node.

unsigned Tube::Inclus ( Shape_ptr  OtherShape)
virtual

+1 this is included in OtherShape, 0 not included or don't know.

Reimplemented from Node.

bool Tube::IsSameAxis ( Tube tube)
protected

whether or not 2 tubes have same z-axis

bool Tube::IsSameAxis ( Cylinder cyl)
protected

whether or not a tube and a cylinder have same z-axis

unsigned Tube::IsTube ( )
inlinevirtual

1 if Shape is a Tube

Reimplemented from Shape.

void Tube::SetSidePlanesOpen ( )
virtual

The side planes are NOT mirrors.

Reimplemented from Node.

void Tube::SetTopBottomPlanesOpen ( )
virtual

The top/bottom planes are NOT mirrors.

Reimplemented from Node.

Member Data Documentation

double Tube::fHalfHeight
protected

Half height of the Tube.

double Tube::fRin
protected

inner radius of the Tube

double Tube::fRout
protected

outer radius of the Tube


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

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