MURE
|
Abstract class to define geometrical shapes. More...
#include <Shape.hxx>
Public Member Functions | |
Constructors | |
Shape () | |
Default constructor. The interior of a Shape is built. | |
Shape (const Shape &s) | |
Copy constructor. | |
~Shape () override | |
Normal destructor. | |
virtual Shape_ptr | Clone (int count=0)=0 |
Clone a Shape. | |
Complementary of Shape (the "Not") | |
Shape_ptr | Not () |
Return the complementary Shape (i.e. the other side) | |
virtual void | CalculNot () |
Allocates and calculs the complement of a Shape. | |
void | NewNot () |
void | SetClone (Shape_ptr clone) |
void | SetClone2Not () |
Set the CloneShape to a Not. | |
Interior/exterior, infinity, problem boundary | |
int | GetSign () |
void | SetSign (int s) |
void | SetOutermostShape (bool flag=true) |
Say that this Shape is the most outer one. | |
Shape type recognition | |
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 () |
virtual unsigned | IsZTorus () |
bool | IsInfinite () |
Shape parameters | |
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 () |
Shape transformations | |
virtual void | Rotate (double phi, double theta=0, double psi=0, double *center=nullptr, int count=0)=0 |
Rotate the Shape clockwise. | |
virtual void | Translate (double dx, double dy, double dz, int count=0)=0 |
Translate the Shape of (dx, dy, dz). | |
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) |
Relations with other shapes | |
virtual unsigned | IsIncluded (Shape_ptr OtherShape)=0 |
return 1 if a shape is included in OtherShape. | |
virtual unsigned | IsDisjoint (Shape_ptr OtherShape)=0 |
return 1 if a shape is disjoint of OtherShape. | |
"Put in" operator (>>) related methods | |
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) |
Miscellaneous methods | |
virtual void | Copy (Shape_ptr S) |
Copy all attributs of a Shape S (but not attributs of the father classes). | |
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 double | GetVirtualSphereRadius () |
virtual double * | GetVirtualSphereCenter () |
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 bool | PointInShape (double *P, int border) |
true if the point P is in the Shape. | |
virtual void | SetLinkedPlane (Shape_ptr P) |
virtual void | ReplaceNode (Shape_ptr C) |
Replace a Node by an other (C must be a Node) | |
virtual SurfaceCard * | GetSurfaceCard () |
virtual SurfaceCard * | GetSurfaceCard (int i) |
virtual void | ResetIsDefinedSurfaceCalled () |
virtual void | Simplify (bool violent=false) |
Simplify a tree of Node. | |
Public Member Functions inherited from TReference | |
TReference () | |
virtual | ~TReference ()=default |
Destructor. | |
void | AddReference (unsigned n=1) |
unsigned | DelReference (unsigned n=1) |
unsigned | Reference () |
Shape simplification methods | |
vector< Shape_ptr > | fInsideShape |
a vector to remember which Shapes are inside the current one.Clear at each ">>" | |
vector< Shape_ptr > | fOriginalInsideShape |
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. | |
Shape * | fNot |
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) | |
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 () |
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 () |
virtual Shape * | CreateNewInstance (int sign=1)=0 |
Create a new Shape instance. | |
Shape_ptr | operator& (Shape_ptr A, Shape_ptr B) |
Intersection of A and B. | |
Shape_ptr | operator| (Shape_ptr A, Shape_ptr B) |
Shape_ptr & | operator>> (Shape_ptr &B, Shape_ptr &A) |
Abstract class to define geometrical shapes.
Simple Shapes are: Plane, Sphere, Cylinder and Brick. More complex Shapes may be built using Node as for examples Tube and Hexagon. In fact mathematical Shapes are defined (e.g. MathSphere class) through "concrete" shape (such as Sphere class). The latter ones are only used for printing purpose in a given format (either MCNP or Serpent). Thus, user only declares these concrete shapes together with a given namespace (either MCNP or Serpent) via Shape_ptr.
Shape_ptr MyShape(new Sphere());
Shape::Shape | ( | ) |
Default constructor. The interior of a Shape is built.
Shape::Shape | ( | const Shape & | s | ) |
Copy constructor.
|
override |
Normal destructor.
|
inlinevirtual |
unsigned Shape::AddInsideShape | ( | Shape_ptr | OtherShape | ) |
|
inline |
This method is called by Shape::AddInsideShape.
Allows user to keep a trace of the InsideShape to feel the Cell.
@ see the "put in" operator >>
|
inlinevirtual |
Allocates and calculs the complement of a Shape.
Reimplemented in MathBrick, MathCylinder, MathHexagon, MathNode, MathPlane, MathSphere, MathTube, and MathZTorus.
|
inline |
< Clear all Inside Shapes
|
inline |
< Clear all Inside Shapes
|
pure virtual |
Clone a Shape.
Implemented in MathBrick, MathCylinder, MathHexagon, MathNode, MathPlane, MathSphere, MathTube, and MathZTorus.
|
inlinevirtual |
Copy all attributs of a Shape S (but not attributs of the father classes).
Reimplemented in MathBrick, MathCylinder, MathPlane, MathHexagon, MathSphere, MathTube, and MathZTorus.
|
protectedpure virtual |
Create a new Shape instance.
Implemented in MathBrick, MathCylinder, MathHexagon, MathNode, MathPlane, MathSphere, MathTube, MathZTorus, MCNP::Brick, MCNP::Cylinder, MCNP::Hexagon, MCNP::Node, MCNP::Plane, MCNP::Sphere, MCNP::Tube, MCNP::ZTorus, Serpent::Brick, Serpent::Cylinder, Serpent::Hexagon, Serpent::Node, Serpent::Plane, Serpent::Sphere, Serpent::Tube, and Serpent::ZTorus.
|
inlinevirtual |
|
inlinevirtual |
Get the Area of a Shape.
Returns -1 when not able to calculate Area
|
inline |
< return debug name
|
inline |
< return the Univers number that fills the Shape.
|
inline |
< return the ith InsideShape put in this
|
inline |
< return the number of Shape put in this
|
inlinevirtual |
< returns the i-th leaf (Shape) of a Node
Reimplemented in MathNode, MCNP::Brick, and Serpent::Brick.
|
inlinevirtual |
< return 0 for general Shape, or an number corresponding to a given Serpent single surface card shape
Reimplemented in Serpent::Brick, Serpent::Hexagon, Serpent::Sphere, and Serpent::Tube.
|
inline |
< returns fMouvement flag;
|
inlinevirtual |
|
inline |
< return the ith Original InsideShape put in this
|
inline |
< return the number of Original Shape put in this
string Shape::GetShapeName | ( | ) |
returns the Shape name
|
inline |
< Return -1 if the Shape exterior is considered, +1 otherwise
|
inlinevirtual |
Reimplemented in MCNP::Cylinder, MCNP::Plane, MCNP::Sphere, MCNP::ZTorus, Serpent::Brick, Serpent::Cylinder, Serpent::Hexagon, Serpent::Plane, Serpent::Sphere, Serpent::Tube, and Serpent::ZTorus.
|
inlinevirtual |
Reimplemented in MCNP::Brick, and Serpent::Brick.
|
inline |
< return the Univers number if exists.
|
inlinevirtual |
< returns the center of a Sphere containing the Shape
Reimplemented in MathBrick, MathCylinder, MathHexagon, MathNode, MathSphere, MathTube, and MathZTorus.
|
inlinevirtual |
< returns the radius of a Sphere containing the Shape
Reimplemented in MathBrick, MathHexagon, MathNode, MathSphere, MathTube, and MathZTorus.
|
inlinevirtual |
|
inline |
< Increment the surface of a Shape of S
|
inlinevirtual |
|
inlinevirtual |
< 1 if Shape is a Cylinder
Reimplemented in MathCylinder.
|
pure virtual |
return 1 if a shape is disjoint of OtherShape.
+1 this is disjoint of OtherShape, 0 not included or don't know.
Implemented in MathBrick, MathCylinder, MathHexagon, MathNode, MathPlane, MathSphere, MathTube, and MathZTorus.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
< 1 if Shape is a Hexagon
Reimplemented in MathHexagon.
|
pure virtual |
return 1 if a shape is included in OtherShape.
+1 this is included in OtherShape, 0 not included or don't know.
Implemented in MathBrick, MathCylinder, MathHexagon, MathNode, MathPlane, MathSphere, MathTube, and MathZTorus.
|
inline |
< Return 1 if the Shape is an axially infinite one
|
inlinevirtual |
< mirror a particle on the surface
|
inlinevirtual |
< Periodic boundary (only for Brick or Hexagon)
|
inlinevirtual |
|
inlinevirtual |
< GetThe side planes are NOT mirrors
|
inlinevirtual |
< 1 if Shape is a Sphere
Reimplemented in MathSphere.
|
inlinevirtual |
< GetThe top/bottom planes are NOT mirrors
|
inline |
< whether or not violent simplification is allowed for 1 shape
|
inlinevirtual |
|
inlinevirtual |
< mirror a particle on the surface with a cosine distribution
|
inlinevirtual |
< 1 if Shape is a ZTorus
Reimplemented in MathZTorus.
|
protectedvirtual |
Copy all attributs of a Shape S (but not attributs of the father classes).
|
inline |
< Update the Not
|
inlinevirtual |
|
inlinevirtual |
true if the point P is in the Shape.
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 in MathBrick, MathCylinder, MathNode, MathPlane, MathSphere, and MathZTorus.
|
inlinevirtual |
< Print the Shape surface in a Cell
Reimplemented in MathHexagon, MCNP::Brick, MCNP::Cylinder, MCNP::Hexagon, MCNP::Node, MCNP::Plane, MCNP::Sphere, MCNP::ZTorus, Serpent::Brick, Serpent::Cylinder, Serpent::Hexagon, Serpent::Node, Serpent::Plane, Serpent::Sphere, Serpent::Tube, and Serpent::ZTorus.
|
virtual |
Debug method: Print the shape surface when fMouvement=true.
Reimplemented in MathNode.
|
virtual |
Debug method: Print the shape surfaces, InsideShape, ...
Reimplemented in MathNode.
|
virtual |
Reimplemented in MathNode.
|
inlinevirtual |
Reimplemented in MathNode.
|
inlinevirtual |
Replace a Node by an other (C must be a Node)
Reimplemented in MathNode.
|
inlinevirtual |
Reimplemented in MathNode, and MCNP::Brick.
|
pure virtual |
Rotate the Shape clockwise.
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 |
Implemented in MathBrick, MathCylinder, MathHexagon, MathNode, MathPlane, MathSphere, and MathZTorus.
|
inline |
< Set the area of a Shape to S
|
inline |
< Set the CloneShape to clone
void Shape::SetClone2Not | ( | ) |
Set the CloneShape to a Not.
|
inline |
< give a name to shape for debug
|
inlinevirtual |
< Set the Universe number filling a Shape
|
inline |
Enable/disable simplification a certain nodes to avoid "union" (for Serpent outside)
|
inline |
< say that a Brick or an Hexagon is infinite
|
inline |
< set the ith InsideShape put in to S
|
inlinevirtual |
< linked plane for periodic boundary
|
virtual |
mirror a particle on the surface
Reimplemented in MathNode.
|
inlinevirtual |
< Set the fMouvement flag to state;
|
inlineprotected |
Allocates and calculs the complement of Shape.
Must be overriden
|
inlineprotected |
< Give a Not to the Not
|
inline |
< set the ith Original InsideShape put in to S
|
inline |
Say that this Shape is the most outer one.
The most outer shape has to be defined when using for example poison control ; indeed, a keff evaluation is done using formula keff=(creation)/(absorption+leakage). The leakage are evaluated using F2 tally on the most outer shape of the geometry (i.e. the whole exterior).
|
inlinevirtual |
Periodic boundary (WARNING: only for Brick and Hexagon).
Please read carefully the MCNP user guide before using these conditions.
state | : = true or false to allow periodic condition |
TopBottPlaneBC | : The Top/Bottom planes of the Brick or Hexagon boundary conditions ; Possible values are : ="mirror" : The Top/Bottom planes are reflecting surfaces (Default) : ="white" : The Top/Bottom planes are white boundaries : ="infinite" : The Top/Bottom planes are infinite (not yet implemented) |
Reimplemented in MathBrick, and MathHexagon.
|
inlinevirtual |
< The side planes are NOT mirrors
Reimplemented in MathHexagon, MathNode, and MathTube.
|
inline |
< Set the fSigne to s (-1 if the Shape exterior is considered, +1 otherwise)
|
inlinevirtual |
< The top/bottom planes are NOT mirrors
Reimplemented in MathHexagon, MathNode, and MathTube.
|
virtual |
void Shape::SetViolentSimplify | ( | bool | Allowed = true | ) |
Enable/disable violent simplification a certain shapes to avoid "union" (for Serpent outside)
|
inline |
< Set the volume of a Shape to V
|
inlinevirtual |
< mirror a particle on the surface with a cosine distribution
Reimplemented in MathNode.
|
inlinevirtual |
Simplify a tree of Node.
Must be overriden. The violent mode mean that Node such as Tube or Hexagon or Brick can be "separated" in individual surfaces to eventually be simplified.
Reimplemented in MathNode.
|
pure virtual |
Translate the Shape of (dx, dy, dz).
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 |
Implemented in MathBrick, MathCylinder, MathHexagon, MathNode, MathPlane, MathSphere, and MathZTorus.
|
virtual |
Set the fMouvement flag to false;.
Reimplemented in MathNode.
Intersection of A and B.
Intersection of A and B. Syntax: A &B
Put the Shape(_ptr) B in A.
//@ Syntax: B>>A. //@ Returns A to allow C>>B>>A; //@ Note: //@ The Translate/Rotate function will be applied on Inside Shape: //@ A->Translate(1, 1, 1); will translate A, B and C. //@ //@ When doing C>>B>>A, IsnsideShape of A is C and B; idem for Original InsideShape //@ (fInsideShape[0]=C, fInsideShape[1]=B). //@ if then A>>D; Original IsnsideShape of A are C and B, IsnsideShape of A have been cleared //@ and IsnsideShape of D are C, B and A. //
|
protected |
the area of a Shape;
|
protected |
Debug Name of a Shape.
|
protected |
Universe number that fill the Shape.
|
protected |
disable any Node simplification (for serpent in ReactorAssembly)
|
protected |
Determines whether the shape is infinite or not.
|
protected |
a vector to remember which Shapes are inside the current one.Clear at each ">>"
|
protected |
whether or not a "violent simplification is allowed (ie a Node or a Brick are allowed to be separated)
|
protected |
the Plane linked to an this for periodic boundary
|
protected |
whether or not mirror a particle on the surface
|
protected |
Flag that indicate a Shape is in mouvement (translation, ..) in a tree.
|
protected |
whether the side planes are not mirrors (default=false)
|
protected |
whether the top/bottom planes are not mirrors (default=false)
|
protected |
a vector to remember which Shapes are inside the current one.
|
protected |
whether or not this Shape is the limit to the exterior world (for calculating particle losses).
|
protected |
whether or not Periodic boundary are applied (only for plane)
|
protected |
Name of a Shape.
|
protected |
Define whether the interior (-1) or the exterior (+1) of the Shape is considered.
|
protected |
whether the top(bottom) plane of a periodic boundary Shape is white or mirror
|
protected |
Universe number (for lattice filling)
|
protected |
the center of a Sphere containing the Shape
|
protected |
the radius of a Sphere containing the Shape
|
protected |
the Volume of a Shape;
|
protected |
whether or not mirror a particle on the surface with a cosine distribution