90 virtual unsigned IsNode() {
return 0;}
93 virtual unsigned IsTube() {
return 0;}
94 virtual unsigned IsFull() {
return 0;}
95 virtual unsigned IsVoid() {
return 0;}
114 virtual void SetMirrorBoundary(
bool state=
true);
119 virtual void SetWhiteBoundary(
bool state=
true);
130 virtual void SetPeriodicBoundary(
bool state=
true,
string TopBottPlaneBC=
"mirror");
150 virtual void Rotate(
double phi,
double theta=0,
double psi=0,
double *center=0,
int count=0){}
158 virtual void Translate(
double dx,
double dy,
double dz,
int count=0){}
166 void RotateVector(
double *V,
double phi,
double theta=0,
double psi=0);
175 void RotatePoint(
double *P,
double phi,
double theta=0,
double psi=0,
double *center=0);
205 virtual void UnSetMouvement();
217 virtual void DevElague(
int count=0,
bool violent=
false){}
229 unsigned AddInsideShape(
Shape_ptr OtherShape);
252 virtual string Print();
264 vector<int> GetSurfaceNumber();
272 virtual void AlreadyDefine(
bool state=
true);
279 virtual void SetUniverse(
int u=0);
289 virtual void RemoveSurface();
291 virtual void PrintX(
int count=0);
292 virtual void PrintY(
int count=0);
295 virtual void PrintLatex(
int count=0);
296 static void AddLatexLine(
char *txt){BeginLatex();DEBUGFILE<<txt<<
"\\\\ "<<endl;}
297 static void BeginLatex();
298 static void EndLatex();
313 double PS(
double *U,
double *V);
329 if(fNot) fNot->fNot=0;
340 void UpdateSurface(
Surface* &S);
Shape_ptr operator!(Shape_ptr A)
!A is an other way to obtain A->Not().
Definition: Shape.cxx:542
string fName
Name of a Shape.
Definition: Shape.hxx:356
int GetUniverse()
return the Univers number if exists.
Definition: Shape.hxx:281
int fZone
flag for identifying complex geometries (test fms)
Definition: Shape.hxx:369
bool fMouvement
Flag that indicate a Shape is in mouvement (translation,..) in a tree.
Definition: Shape.hxx:351
virtual unsigned IsHexagon()
1 if Shape is a Hexagon
Definition: Shape.hxx:89
virtual double GetSurface()
Get the Surface of a Shape.
Definition: Shape.hxx:111
Shape * fNot
pointer on complementary Shape if exists, else 0.
Definition: Shape.hxx:349
void SetOutermostShape(bool flag=true)
Say that this Shape is the most outer one.
Definition: Shape.hxx:77
int fFill
Universe number that fill the Shape.
Definition: Shape.hxx:353
virtual bool IsPeriodicBoundary()
Periodic boundary (only for Brick or Hexagon)
Definition: Shape.hxx:133
virtual void SetSidePlanesOpen()
The side planes are NOT mirrors.
Definition: Shape.hxx:117
virtual unsigned IsNode()
1 if Shape is a Node
Definition: Shape.hxx:90
Surface class is design to define MCNP surface format.
Definition: Surface.hxx:26
void NewNot()
Update the Not.
Definition: Shape.hxx:302
virtual void CalculNot()
Allocates and calculs the complement of a Shape.
Definition: Shape.hxx:301
double * fVirtualSphereO
the center of a Sphere containing the Shape
Definition: Shape.hxx:358
void SetVolume(double V)
Set the volume of a Shape to V.
Definition: Shape.hxx:112
virtual unsigned IsCylinder()
1 if Shape is a Cylinder
Definition: Shape.hxx:87
int GetZone()
get test flag for complex geometries
Definition: Shape.hxx:318
void AddSurfaceNumber(int i)
Give the vector of Surface of the Shape.
Definition: Shape.hxx:263
virtual unsigned IsPlane()
1 if Shape is a Plane
Definition: Shape.hxx:91
virtual bool IsWhiteBoundary()
mirror a particle on the surface with a cosine distribution
Definition: Shape.hxx:132
virtual double GetVirtualSphereRadius()
returns the radius of a Sphere containing the Shape
Definition: Shape.hxx:286
void SetClone(Shape_ptr clone)
Set the CloneShape to clone.
Definition: Shape.hxx:256
double GetSigne()
Return -1 if the Shape exterior is considered, +1 otherwise.
Definition: Shape.hxx:69
virtual Shape_ptr GetLeaf(int i)
returns the i-th leaf (Shape) of a Node
Definition: Shape.hxx:260
virtual double * GetVirtualSphereCenter()
returns the center of a Sphere containing the Shape
Definition: Shape.hxx:287
virtual double GetVolume()
Get the Volume of a Shape.
Definition: Shape.hxx:106
virtual void SetMouvement(bool state=true)
Set the fMouvement flag to state;.
Definition: Shape.hxx:204
vector< int > fSurfaceNumber
number(s) of Surface(s) defining the Shape
Definition: Shape.hxx:343
void SetInsideShape(int i, Shape_ptr S)
set the ith InsideShape put in to S
Definition: Shape.hxx:242
virtual unsigned IsFull()
1 if Shape is Full (whole space)
Definition: Shape.hxx:94
virtual unsigned IsSphere()
1 if Shape is a Sphere
Definition: Shape.hxx:92
double fVirtualSphereR
the radius of a Sphere containing the Shape
Definition: Shape.hxx:357
Shape_ptr & operator>>(Shape_ptr &B, Shape_ptr &A)
Definition: Shape.cxx:444
Shape_ptr fLinkedPlane
the Plane linked to an this for periodic boundary
Definition: Shape.hxx:366
void SetSurface(double S)
Set the surface of a Shape to S.
Definition: Shape.hxx:113
bool GetMouvement()
returns fMouvement flag;
Definition: Shape.hxx:206
void SetSigne(double s)
Definition: Shape.hxx:70
virtual unsigned Add(Shape_ptr OtherShape)
Add a new Shape (in fact a Shape_ptr) to a Node.
Definition: Shape.hxx:178
virtual void Simplify(bool violent=false)
Simplify a tree of Node.
Definition: Shape.hxx:212
unsigned GetOriginalInsideShapeSize()
return the number of Original Shape put in this
Definition: Shape.hxx:241
virtual void ReplaceNode(Shape_ptr C)
Replace a Node by an other (C must be a Node)
Definition: Shape.hxx:312
virtual bool PointInShape(double *P, int border)
true if the point P is in the Shape.
Definition: Shape.hxx:310
virtual unsigned IsTube()
1 if Shape is a Tube
Definition: Shape.hxx:93
unsigned GetInsideShapeSize()
return the number of Shape put in this
Definition: Shape.hxx:240
virtual void SetTopBottomPlanesOpen()
The top/bottom planes are NOT mirrors.
Definition: Shape.hxx:115
bool fAlreadyDefine
Flag to know whether a surface is already defined.
Definition: Shape.hxx:350
virtual void SetLinkedPlane(Shape_ptr P)
linked plane for periodic boundary
Definition: Shape.hxx:311
vector< Shape_ptr > fInsideShape
a vector to remember which Shapes are inside the current one.Clear at each ">>"
Definition: Shape.hxx:344
double fSurface
the Surface of a Shape;
Definition: Shape.hxx:355
void ClearOriginalInsideShape()
Clear all Inside Shapes.
Definition: Shape.hxx:238
Shape_ptr operator|(Shape_ptr A, Shape_ptr B)
Definition: Shape.cxx:429
virtual string PrintSurface()
Print the Shape surfaces in MCNP surface block.
Definition: Shape.hxx:253
virtual void DefineSurface()
Define MCNP surfaces for this Shape.
Definition: Shape.hxx:271
virtual void Copy(Shape_ptr S)
Copy all attributs of a Shape S (but not attributs of the father classes).
Definition: Shape.hxx:259
int fUniverse
Universe number (for lattice filling)
Definition: Shape.hxx:352
bool fInfinite
Determines whether the shape is infinite or not.
Definition: Shape.hxx:348
virtual unsigned IsFullVoid()
1 if Shape is Full (whole space) or Void (empty set)
Definition: Shape.hxx:88
virtual void DevElague(int count=0, bool violent=false)
Developps and Trims a tree of Node.
Definition: Shape.hxx:217
void IncrementSurface(double S)
Increment the surface of a Shape of S.
Definition: Shape.hxx:284
virtual unsigned Inclus(Shape_ptr OtherShape)
return 1 if a shape is included in OtherShape.
Definition: Shape.hxx:190
void SetOriginalInsideShape(int i, Shape_ptr S)
set the ith Original InsideShape put in to S
Definition: Shape.hxx:243
bool fPeriodicBoundary
wether or not Periodic boundary are applied (only for plane)
Definition: Shape.hxx:364
virtual unsigned Disjoint(Shape_ptr OtherShape)
return 1 if a shape is disjointed in OtherShape.
Definition: Shape.hxx:197
double fSigne
Define whether the interior (-1) or the exterior (+1) of the Shape is considered. ...
Definition: Shape.hxx:347
Reference_ptr< Shape > Shape_ptr
Definition: MCNPSource.hxx:17
virtual bool GetSidePlanesOpen()
GetThe side planes are NOT mirrors.
Definition: Shape.hxx:118
void SetZone(int z)
set test flag for complex geometries
Definition: Shape.hxx:317
bool fWhiteBoundary
wether or not mirror a particle on the surface with a cosine distribution
Definition: Shape.hxx:363
bool IsInfinite()
Return 1 if the Shape is an axially infinite one (??? why not resolve thru inheritance as same as sha...
Definition: Shape.hxx:78
virtual void Rotate(double phi, double theta=0, double psi=0, double *center=0, int count=0)
Rotate the Shape clockwise.
Definition: Shape.hxx:150
Shape_ptr fCloneShape
the clone of a Shape
Definition: Shape.hxx:359
unsigned AddOriginalInsideShape(Shape_ptr OtherShape)
This method is called by Shape::AddInsideShape.
Definition: Shape.hxx:237
virtual void Translate(double dx, double dy, double dz, int count=0)
Translate the Shape of (dx,dy,dz).
Definition: Shape.hxx:158
double fVolume
the Volume of a Shape;
Definition: Shape.hxx:354
virtual bool GetTopBottomPlanesOpen()
GetThe top/bottom planes are NOT mirrors.
Definition: Shape.hxx:116
bool fOutermostShape
wether or not this Shape is the limit to the exterior world (for calculating particle losses)...
Definition: Shape.hxx:368
void SetNotofNot()
Give a Not to the Not.
Definition: Shape.hxx:333
int GetFill()
return the Univers number that fills the Shape.
Definition: Shape.hxx:282
virtual unsigned IsVoid()
1 if Shape is Void (empty set)
Definition: Shape.hxx:95
virtual unsigned IsBrick()
1 if Shape is a Brick
Definition: Shape.hxx:86
bool fOpenXYPlanes
whether the side planes are not mirrors (default=false)
Definition: Shape.hxx:362
void SetNot(Shape *Not)
Allocates and calculs the complement of Shape.
Definition: Shape.hxx:327
vector< Shape_ptr > fOriginalInsideShape
a vector to remember which Shapes are inside the current one.
Definition: Shape.hxx:345
Shape_ptr GetOriginalInsideShape(int i)
return the ith Original InsideShape put in this
Definition: Shape.hxx:245
virtual void SetFill(int f)
Set the Universe number filling a Shape.
Definition: Shape.hxx:280
Shape_ptr & operator&=(Shape_ptr &A, Shape_ptr B)
Definition: Shape.cxx:415
virtual int NumberOfShapes()
returns the number of Shape
Definition: Shape.hxx:315
Shape_ptr & operator|=(Shape_ptr &A, Shape_ptr B)
Definition: Shape.cxx:422
bool fOpenZPlanes
whether the top/bottom planes are not mirrors (default=false)
Definition: Shape.hxx:361
Shape_ptr operator&(Shape_ptr A, Shape_ptr B)
Intersection of A and B.
Definition: Shape.cxx:401
virtual bool IsMirrorBoundary()
mirror a particle on the surface
Definition: Shape.hxx:131
virtual int GetNumberOfLeaves()
returns the number of leaves (Shape) of a Node
Definition: Shape.hxx:261
void ClearInsideShape()
Clear all Inside Shapes.
Definition: Shape.hxx:239
string fTopBottPlaneBoundaryCondition
wether the top(bottom) plane of a periodic boundary Shape is white or mirror
Definition: Shape.hxx:365
bool fMirrorBoundary
wether or not mirror a particle on the surface
Definition: Shape.hxx:360
Base class to reference all Shape objects.
Definition: TReference.hxx:17
Shape_ptr GetInsideShape(int i)
return the ith InsideShape put in this
Definition: Shape.hxx:244
Base class to define shapes.
Definition: Shape.hxx:54