MURE
Loading...
Searching...
No Matches
List of all members
MathTube Class Reference

A MathTube is a finite cylinder with an optional hole inside (like a pipe). More...

#include <MathTube.hxx>

Inheritance diagram for MathTube:
MathNode Shape TReference MCNP::Tube Serpent::Tube

Public Member Functions

Constructors
 MathTube (double HalfHeight=0.005, double Rout=0.01, double Rin=0., int Sign=- 1)
 Normal Constructor.
 
 MathTube (double X, double Y, double Z, double dX, double dY, double dZ, double HalfHeight, double Rout, double Rin=0., int Sign=- 1)
 Directed Constructor.
 
 MathTube (const MathTube &t)
 Copy Constructor.
 
Shape_ptr Clone (int count=0) override
 Clone a Shape.
 
void Copy (Shape_ptr S) override
 Copy all attributs of a Shape S (but not attributs of the father classes).
 
Shape parameters
unsigned IsTube () override
 
Shape_ptr GetOutCylinder ()
 
Shape_ptr GetBottomPlane ()
 
Shape_ptr GetTopPlane ()
 
Shape_ptr GetInCylinder ()
 
double GetHalfHeight ()
 
double GetInnerRadius ()
 
double GetOuterRadius ()
 
double SetHalfHeight (double halfH)
 
Relations with other shapes
unsigned IsIncluded (Shape_ptr OtherShape) override
 +1 this is included in OtherShape, 0 not included or don't know.
 
unsigned IsDisjoint (Shape_ptr OtherShape) override
 +1 this is disjoint in OtherShape, 0 not included or don't know.
 
- Public Member Functions inherited from MathNode
 MathNode (int Sign=+1)
 
 MathNode (const MathNode &n)
 Copy constructor.
 
 ~MathNode () override
 Normal destrutor.
 
Shape_ptr Clone (int count=0) override
 Clone a Shape.
 
unsigned IsNode () override
 
unsigned IsFullVoid () override
 
unsigned IsVoid () override
 
unsigned IsFull () override
 
double GetVolume () override
 return the Volume of a Node
 
Shape_ptr GetLeaf (int i) override
 
int GetNumberOfLeaves () override
 
unsigned Add (Shape_ptr OtherShape) override
 Add a new Shape (in fact a Shape_ptr) to a Node.
 
void ReplaceLeaf (int i, Shape_ptr OtherShape) override
 replace the ith leaf of a Node.
 
void SetBoundingShape (Shape_ptr theShape)
 Declare a bounding shape.
 
Shape_ptr GetBoundingShape ()
 
void SetIncludedShape (Shape_ptr theShape)
 Declare an included shape.
 
Shape_ptr GetIncludedShape ()
 
void SetMirrorBoundary (bool state=true) override
 mirror a particle on the surface
 
void SetWhiteBoundary (bool state=true) override
 mirror a particle on the surface with a cosine distribution
 
void Translate (double dx, double dy, double dz, int count=0) override
 Translate the Node of (dx, dy, dz).
 
void Rotate (double phi, double theta=0, double psi=0, double *center=nullptr, int count=0) override
 Rotate the Node clockwise.
 
virtual unsigned Contain (Shape_ptr OtherShape)
 +1 this contains the OtherShape, 0 not included or don't know.
 
void SetUniverse (int u=0) override
 Set the Universe number for a shape used in a lattice.
 
bool PointInShape (double *P, int border) override
 true if the point P is in the Shape.
 
void PrintX (int count=0) override
 Debug method: Print the shape surface when fMouvement=true.
 
void PrintY (int count=0) override
 Debug method: Print the shape surfaces, InsideShape, ...
 
void ReplaceNode (Shape_ptr C) override
 Replace a Node by an other (C must be a Node)
 
int NumberOfShapes () override
 return the number of Shapes contains in a Node
 
void Simplify (bool violent=false) override
 Simplify a tree of Node.
 
void ResetIsDefinedSurfaceCalled () override
 
- Public Member Functions inherited from Shape
 Shape ()
 Default constructor. The interior of a Shape is built.
 
 Shape (const Shape &s)
 Copy constructor.
 
 ~Shape () override
 Normal destructor.
 
Shape_ptr Not ()
 Return the complementary Shape (i.e. the other side)
 
void NewNot ()
 
void SetClone (Shape_ptr clone)
 
void SetClone2Not ()
 Set the CloneShape to a Not.
 
int GetSign ()
 
void SetSign (int s)
 
void SetOutermostShape (bool flag=true)
 Say that this Shape is the most outer one.
 
virtual unsigned IsBrick ()
 
virtual unsigned IsCylinder ()
 
virtual unsigned IsHexagon ()
 
virtual unsigned IsPlane ()
 
virtual unsigned IsSphere ()
 
virtual unsigned IsZTorus ()
 
bool IsInfinite ()
 
void SetVolume (double V)
 
virtual double GetArea ()
 Get the Area of a Shape.
 
void SetArea (double S)
 
virtual bool IsTopBottomPlanesOpen ()
 
virtual bool IsSidePlanesOpen ()
 
virtual void SetPeriodicBoundary (bool state=true, string TopBottPlaneBC="mirror")
 Periodic boundary (WARNING: only for Brick and Hexagon).
 
virtual bool IsMirrorBoundary ()
 
virtual bool IsWhiteBoundary ()
 
virtual bool IsPeriodicBoundary ()
 
unsigned AddInsideShape (Shape_ptr OtherShape)
 Add a Shape in fInsideShape each time a "put in" is done.
 
unsigned AddOriginalInsideShape (Shape_ptr OtherShape)
 This method is called by Shape::AddInsideShape.
 
void ClearOriginalInsideShape ()
 
void ClearInsideShape ()
 
unsigned GetInsideShapeSize ()
 
unsigned GetOriginalInsideShapeSize ()
 
void SetInsideShape (int i, Shape_ptr S)
 
void SetOriginalInsideShape (int i, Shape_ptr S)
 
Shape_ptr GetInsideShape (int i)
 
Shape_ptr GetOriginalInsideShape (int i)
 
string GetShapeName ()
 returns the Shape name
 
void SetDebugName (string str)
 
string GetDebugName ()
 
virtual void SetFill (int f)
 
int GetFill ()
 
int GetUniverse ()
 
void IncrementSurface (double S)
 
virtual string Print ()
 
virtual void SetLinkedPlane (Shape_ptr P)
 
virtual SurfaceCardGetSurfaceCard ()
 
virtual SurfaceCardGetSurfaceCard (int i)
 
virtual void SetMouvement (bool state=true)
 
bool GetMouvement ()
 
void SetViolentSimplify (bool Allowed=true)
 Enable/disable violent simplification a certain shapes to avoid "union" (for Serpent outside)
 
void SetFreezeSimplify (bool flag=true)
 Enable/disable simplification a certain nodes to avoid "union" (for Serpent outside)
 
bool IsViolentSimplifyAllowed ()
 
virtual int GetMonoSurfaceType ()
 
void SetInfinite ()
 
- Public Member Functions inherited from TReference
 TReference ()
 
virtual ~TReference ()=default
 Destructor.
 
void AddReference (unsigned n=1)
 
unsigned DelReference (unsigned n=1)
 
unsigned Reference ()
 

Miscellaneous methods

double fRout
 outer radius of the Tube
 
double fRin
 inner radius of the Tube
 
double fHalfHeight
 Half height of the Tube.
 
double GetVirtualSphereRadius () override
 returns the radius of a Sphere containing the Shape
 
double * GetVirtualSphereCenter () override
 returns the center of a Sphere containing the Shape
 
void SetTopBottomPlanesOpen () override
 The top/bottom planes are NOT mirrors.
 
void SetSidePlanesOpen () override
 The side planes are NOT mirrors.
 
void CalculNot () override
 Allocates and calculs the complement of Shape.
 
MathTubeCreateNewInstance (int sign=1) override
 a new MathTube instance.
 
bool IsSameAxis (MathTube *tube)
 whether or not 2 tubes have same z-axis
 
bool IsSameAxis (MathCylinder *cyl)
 whether or not a tube and a cylinder have same z-axis
 

Additional Inherited Members

- Protected Member Functions inherited from MathNode
virtual void ElagueRoot ()
 Trims a tree with a Chain Saw.
 
void DevElague (int count=0, bool violent=false) override
 Developps and Trims a tree of Node.
 
void UnSetMouvement () override
 Set the fMouvement flag to false;.
 
virtual void ClearVectorShape (int UMVT=0)
 Clear VectorShape.
 
void RemoveSurface () override
 Removed unused surface from gMURE.
 
void Remove (vector< Shape_ptr > ::iterator Iterator)
 remove a vector element
 
- Protected Member Functions inherited from Shape
virtual void MinimumCopy (Shape *S)
 Copy all attributs of a Shape S (but not attributs of the father classes).
 
void SetNot (Shape *aNot)
 Allocates and calculs the complement of Shape.
 
void SetNotofNot ()
 
- Protected Attributes inherited from MathNode
vector< Shape_ptrfShapeVector
 a vector of Shape_ptr of a Node
 
vector< Shape_ptrfDestroyShape
 a vector of destroyed Shape_ptr of a Node (for UnSetMouvement())
 
Shape_ptr fBoundingShape
 Shape containing the Node, 0 for none.
 
Shape_ptr fIncludedShape
 Shape included in the Node, 0 for none.
 
bool fTube
 true if the Node is a Tube
 
bool fHexagon
 true if the Node is an Hexagon
 
int fCount
 count flag to unset mvt
 
- Protected Attributes inherited from Shape
vector< Shape_ptrfInsideShape
 a vector to remember which Shapes are inside the current one.Clear at each ">>"
 
vector< Shape_ptrfOriginalInsideShape
 a vector to remember which Shapes are inside the current one.
 
int fSign
 Define whether the interior (-1) or the exterior (+1) of the Shape is considered.
 
bool fInfinite
 Determines whether the shape is infinite or not.
 
ShapefNot
 pointer on complementary Shape if exists, else 0.
 
bool fMouvement
 Flag that indicate a Shape is in mouvement (translation, ..) in a tree.
 
int fUniverse
 Universe number (for lattice filling)
 
int fFill
 Universe number that fill the Shape.
 
double fVolume
 the Volume of a Shape;
 
double fArea
 the area of a Shape;
 
string fShapeName
 Name of a Shape.
 
string fDebugName
 Debug Name of a Shape.
 
double fVirtualSphereR
 the radius of a Sphere containing the Shape
 
double * fVirtualSphereO
 the center of a Sphere containing the Shape
 
Shape_ptr fCloneShape
 the clone of a Shape
 
bool fMirrorBoundary
 whether or not mirror a particle on the surface
 
bool fOpenZPlanes
 whether the top/bottom planes are not mirrors (default=false)
 
bool fOpenXYPlanes
 whether the side planes are not mirrors (default=false)
 
bool fWhiteBoundary
 whether or not mirror a particle on the surface with a cosine distribution
 
bool fPeriodicBoundary
 whether or not Periodic boundary are applied (only for plane)
 
string fTopBottPlaneBoundaryCondition
 whether the top(bottom) plane of a periodic boundary Shape is white or mirror
 
Shape_ptr fLinkedPlane
 the Plane linked to an this for periodic boundary
 
bool fIsViolentSimplifyAllowed
 whether or not a "violent simplification is allowed (ie a Node or a Brick are allowed to be separated)
 
bool fOutermostShape
 whether or not this Shape is the limit to the exterior world (for calculating particle losses).
 
bool fFreezeSimplify
 disable any Node simplification (for serpent in ReactorAssembly)
 

Detailed Description

A MathTube is a finite cylinder with an optional hole inside (like a pipe).

A MathTube is defined by the intersection of the inner part of a big cylinder with the outer part of a smaller cylinder and 2 cutting planes Default MathTube is the interior of a vertical Cylinder (radius 1cm) center at origin and full (a full Cylinder of height 2cm). It is only a mathematical shape (no link to any code output).User should use Tube (from MCNP or Serpent namespace).

Author
PTO
J. Hajnrych
Version
2.0

Constructor & Destructor Documentation

◆ MathTube() [1/3]

MathTube::MathTube ( double  HalfHeight = 0.005,
double  Rout = 0.01,
double  Rin = 0.,
int  Sign = - 1 
)

Normal Constructor.

Default: Interior of full cylinder (radius 0.01m) center 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
Sign: whether interior of the Tube is considered (-1) or exterior (+1)

◆ MathTube() [2/3]

MathTube::MathTube ( double  X,
double  Y,
double  Z,
double  dX,
double  dY,
double  dZ,
double  HalfHeight,
double  Rout,
double  Rin = 0.,
int  Sign = - 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
Sign: whether interior of the Tube is considered (-1) or exterior (+1)

◆ MathTube() [3/3]

MathTube::MathTube ( const MathTube t)

Copy Constructor.

< outer radius of the Tube

< inner radius of the Tube

< Half height of the Tube

Member Function Documentation

◆ CalculNot()

void MathTube::CalculNot ( )
overridevirtual

Allocates and calculs the complement of Shape.

Reimplemented from MathNode.

◆ Clone()

Shape_ptr MathTube::Clone ( int  count = 0)
overridevirtual

Clone a Shape.

Reimplemented from MathNode.

◆ Copy()

void MathTube::Copy ( Shape_ptr  S)
overridevirtual

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

Reimplemented from Shape.

◆ CreateNewInstance()

MathTube * MathTube::CreateNewInstance ( int  sign = 1)
overrideprotectedvirtual

a new MathTube instance.

Reimplemented from MathNode.

Reimplemented in MCNP::Tube, and Serpent::Tube.

◆ GetBottomPlane()

Shape_ptr MathTube::GetBottomPlane ( )
inline

< return bottom Plane that cut the cylinder

◆ GetHalfHeight()

double MathTube::GetHalfHeight ( )
inline

< return the Half Height of the Tube.

◆ GetInCylinder()

Shape_ptr MathTube::GetInCylinder ( )
inline

< return the inner Cylinder when exists, otherwise 0

◆ GetInnerRadius()

double MathTube::GetInnerRadius ( )
inline

< return the inner radius of the Tube.

◆ GetOutCylinder()

Shape_ptr MathTube::GetOutCylinder ( )
inline

< return the outer Cylinder

◆ GetOuterRadius()

double MathTube::GetOuterRadius ( )
inline

< return the outer radius of the Tube.

◆ GetTopPlane()

Shape_ptr MathTube::GetTopPlane ( )
inline

< return top Plane that cut the cylinder

◆ GetVirtualSphereCenter()

double * MathTube::GetVirtualSphereCenter ( )
overridevirtual

returns the center of a Sphere containing the Shape

Reimplemented from MathNode.

◆ GetVirtualSphereRadius()

double MathTube::GetVirtualSphereRadius ( )
overridevirtual

returns the radius of a Sphere containing the Shape

Reimplemented from MathNode.

◆ IsDisjoint()

unsigned MathTube::IsDisjoint ( Shape_ptr  OtherShape)
overridevirtual

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

Reimplemented from MathNode.

◆ IsIncluded()

unsigned MathTube::IsIncluded ( Shape_ptr  OtherShape)
overridevirtual

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

Reimplemented from MathNode.

◆ IsSameAxis() [1/2]

bool MathTube::IsSameAxis ( MathCylinder cyl)
protected

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

◆ IsSameAxis() [2/2]

bool MathTube::IsSameAxis ( MathTube tube)
protected

whether or not 2 tubes have same z-axis

◆ IsTube()

unsigned MathTube::IsTube ( )
inlineoverridevirtual

< 1 if Shape is a Tube

Reimplemented from Shape.

◆ SetHalfHeight()

double MathTube::SetHalfHeight ( double  halfH)

◆ SetSidePlanesOpen()

void MathTube::SetSidePlanesOpen ( )
overridevirtual

The side planes are NOT mirrors.

Reimplemented from MathNode.

◆ SetTopBottomPlanesOpen()

void MathTube::SetTopBottomPlanesOpen ( )
overridevirtual

The top/bottom planes are NOT mirrors.

Reimplemented from MathNode.

Member Data Documentation

◆ fHalfHeight

double MathTube::fHalfHeight
protected

Half height of the Tube.

◆ fRin

double MathTube::fRin
protected

inner radius of the Tube

◆ fRout

double MathTube::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.9.7 - Fri Jan 19 2024