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

Define a MathZTorus Shape. More...

#include <MathZTorus.hxx>

Inheritance diagram for MathZTorus:
Shape TReference MCNP::ZTorus Serpent::ZTorus

Public Member Functions

Constructors
 MathZTorus (double TubeR, double TorusR, double Xc=0, double Yc=0, double Zc=0, int Sign=- 1)
 Normal Constructor.
 
void Copy (Shape_ptr S) override
 Copy all attributs of a Shape (but not attributs of the father classes).
 
Shape_ptr Clone (int count=0) override
 Clone a Shape.
 
Shape parameters
unsigned IsZTorus () override
 
double GetTubeR ()
 
double GetTorusR ()
 
double GetX ()
 
double GetY ()
 
double GetZ ()
 
vector< double > GetOrigin ()
 
Shape transformations
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 Shape clockwise.
 
Relations with other shapes
unsigned IsIncluded (Shape_ptr OtherShape) override
 return 1 if the ZTorus is included in OtherShape otherwise 0
 
unsigned IsDisjoint (Shape_ptr OtherShape) override
 return 1 if the ZTorus is disjoint of OtherShape otherwise 0
 
- 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 IsFullVoid ()
 
virtual unsigned IsHexagon ()
 
virtual unsigned IsNode ()
 
virtual unsigned IsPlane ()
 
virtual unsigned IsSphere ()
 
virtual unsigned IsTube ()
 
virtual unsigned IsFull ()
 
virtual unsigned IsVoid ()
 
bool IsInfinite ()
 
virtual double GetVolume ()
 Get the Volume of a Shape.
 
void SetVolume (double V)
 
virtual double GetArea ()
 Get the Area of a Shape.
 
void SetArea (double S)
 
virtual void SetMirrorBoundary (bool state=true)
 mirror a particle on the surface
 
virtual void SetTopBottomPlanesOpen ()
 
virtual bool IsTopBottomPlanesOpen ()
 
virtual void SetSidePlanesOpen ()
 
virtual bool IsSidePlanesOpen ()
 
virtual void SetWhiteBoundary (bool state=true)
 
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 ()
 
virtual unsigned Add (Shape_ptr OtherShape)
 Add a new Shape (in fact a Shape_ptr) to a Node.
 
virtual void ReplaceLeaf (int i, Shape_ptr OtherShape)
 
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)
 
virtual Shape_ptr GetLeaf (int i)
 
virtual int GetNumberOfLeaves ()
 
string GetShapeName ()
 returns the Shape name
 
virtual int NumberOfShapes ()
 
void SetDebugName (string str)
 
string GetDebugName ()
 
virtual void SetUniverse (int u=- 1)
 Set the Universe number for a Shape .
 
virtual void SetFill (int f)
 
int GetFill ()
 
int GetUniverse ()
 
void IncrementSurface (double S)
 
virtual void RemoveSurface ()
 
virtual string Print ()
 
virtual void PrintX (int count=0)
 Debug method: Print the shape surface when fMouvement=true.
 
virtual void PrintY (int count=0)
 Debug method: Print the shape surfaces, InsideShape, ...
 
virtual void SetLinkedPlane (Shape_ptr P)
 
virtual void ReplaceNode (Shape_ptr C)
 Replace a Node by an other (C must be a Node)
 
virtual SurfaceCardGetSurfaceCard ()
 
virtual SurfaceCardGetSurfaceCard (int i)
 
virtual void ResetIsDefinedSurfaceCalled ()
 
virtual void Simplify (bool violent=false)
 Simplify a tree of Node.
 
virtual void SetMouvement (bool state=true)
 
virtual void UnSetMouvement ()
 Set the fMouvement flag to false;.
 
bool GetMouvement ()
 
virtual void DevElague (int count=0, bool violent=false)
 Developps and Trims a tree of Node.
 
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 fTubeR
 Radius of the tube of the torus.
 
double fTorusR
 Radius of the torus.
 
vector< double > fOrigin
 
Shape_ptr fBoundingShape
 
Shape_ptr GetBoundingShape ()
 Returns the bounding shape of the hexagon, even if null.
 
double GetVirtualSphereRadius () override
 returns the radius of a Sphere containing the Shape
 
double * GetVirtualSphereCenter () override
 returns the center of a Sphere containing the Shape
 
bool PointInShape (double *P, int border) override
 true if the point P is in the Shape.
 
void CalculNot () override
 Allocates and calculs the complement of a ZTorus.
 
MathZTorusCreateNewInstance (int sign=1) override
 a new MathZTorus instance.
 

Additional Inherited Members

- 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 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

Define a MathZTorus Shape.

Default: Interior of an origin center Torus of axe Z if fSigne=+1 the exterior of the Torus is considered, otherwise its interior. It is only a mathematical shape (no link to any code output).User should use ZTorus (from MCNP or Serpent namespace). A MathZTorus could not be rotated!

Author
PTO
Version
1.0

Constructor & Destructor Documentation

◆ MathZTorus()

MathZTorus::MathZTorus ( double  TubeR,
double  TorusR,
double  Xc = 0,
double  Yc = 0,
double  Zc = 0,
int  Sign = - 1 
)

Normal Constructor.

The equation of the z-circular torus (TubeR=r, TorusR=R)) center in (Xc, Yc, Zc) is

\[ (z-Zc)^{2}+(\sqrt{(x-Xc)^2+(y-Yc)^2}-R)^2-r^2=0 \]

Default: Interior of an origin center Torus of axis Z.

Parameters
TubeR: radius of the tube of the torus
TorusR: radius of the torus
Xc: x-position of its center
Yc: y-position of its center
Zc: z-position of its center
Sign: whether interior of the sphere is considered (-1) or exterior (+1)

Member Function Documentation

◆ CalculNot()

void MathZTorus::CalculNot ( )
overridevirtual

Allocates and calculs the complement of a ZTorus.

Reimplemented from Shape.

◆ Clone()

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

Clone a Shape.

Implements Shape.

◆ Copy()

void MathZTorus::Copy ( Shape_ptr  S)
overridevirtual

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

Reimplemented from Shape.

◆ CreateNewInstance()

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

a new MathZTorus instance.

Implements Shape.

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

◆ GetBoundingShape()

Shape_ptr MathZTorus::GetBoundingShape ( )

Returns the bounding shape of the hexagon, even if null.

◆ GetOrigin()

vector< double > MathZTorus::GetOrigin ( )
inline

< return the 3 coordinate vector of the Sphere Origin

◆ GetTorusR()

double MathZTorus::GetTorusR ( )
inline

< return Radius of the Sphere

◆ GetTubeR()

double MathZTorus::GetTubeR ( )
inline

< return Radius of the Sphere

◆ GetVirtualSphereCenter()

double * MathZTorus::GetVirtualSphereCenter ( )
overridevirtual

returns the center of a Sphere containing the Shape

Reimplemented from Shape.

◆ GetVirtualSphereRadius()

double MathZTorus::GetVirtualSphereRadius ( )
overridevirtual

returns the radius of a Sphere containing the Shape

Reimplemented from Shape.

◆ GetX()

double MathZTorus::GetX ( )
inline

< return x-position of its center

◆ GetY()

double MathZTorus::GetY ( )
inline

< return y-position of its center

◆ GetZ()

double MathZTorus::GetZ ( )
inline

< return z-position of its center

◆ IsDisjoint()

unsigned MathZTorus::IsDisjoint ( Shape_ptr  OtherShape)
overridevirtual

return 1 if the ZTorus is disjoint of OtherShape otherwise 0

Implements Shape.

◆ IsIncluded()

unsigned MathZTorus::IsIncluded ( Shape_ptr  OtherShape)
overridevirtual

return 1 if the ZTorus is included in OtherShape otherwise 0

Implements Shape.

◆ IsZTorus()

unsigned MathZTorus::IsZTorus ( )
inlineoverridevirtual

< 1 if Shape is a ZTorus

Reimplemented from Shape.

◆ PointInShape()

bool MathZTorus::PointInShape ( double *  P,
int  border 
)
overridevirtual

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 or =+1 : if P is at the Shape surface then P is outside

Reimplemented from Shape.

◆ Rotate()

void MathZTorus::Rotate ( double  phi,
double  theta = 0,
double  psi = 0,
double *  center = nullptr,
int  count = 0 
)
overridevirtual

Rotate the Shape clockwise.

Rotation is not possible for ZTorus!

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

Implements Shape.

◆ Translate()

void MathZTorus::Translate ( double  dx,
double  dy,
double  dz,
int  count = 0 
)
overridevirtual

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

Implements Shape.

Member Data Documentation

◆ fBoundingShape

Shape_ptr MathZTorus::fBoundingShape
protected

◆ fOrigin

vector< double > MathZTorus::fOrigin
protected

◆ fTorusR

double MathZTorus::fTorusR
protected

Radius of the torus.

◆ fTubeR

double MathZTorus::fTubeR
protected

Radius of the tube of the torus.


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

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024