Public Member Functions | Protected Attributes | List of all members
SerpentSource Class Reference

Define a Serpent Source. More...

#include <SerpentSource.hxx>

Inheritance diagram for SerpentSource:

Public Member Functions

 SerpentSource (double NPS=10000)
 Normal Constructor. More...
 SerpentSource (const SerpentSource &s)
 Copy Constructor. More...
MCSourceClone () override
 Clone method. More...
 ~SerpentSource () override
 destructor More...
void UsePreviousRunSource (string FirstSource="") override
 use a previous kcode source for serpent. More...
void SetSurface (Shape_ptr TheShape) override
 set the Surface number for a surface source. More...
void SetCell (Cell *TheCell)
string Print () override
 Print the Serpent source (into Serpent input file). More...
void SaveSourceInFile (string FileToSaveSource)
- Public Member Functions inherited from MCSource
 MCSource (double NPS=10000)
 Normal Constructor. More...
 MCSource (const MCSource &s)
 Copy Constructor. More...
virtual ~MCSource ()
 destructor More...
void SetNPS (double NPS=10000)
double GetNPS ()
void SetEnergy (double E=2.5e6)
 Set the energy for a point source (in eV) More...
void SetPosition (double *pos=nullptr)
 set the position of a point source (in m) More...
void SetPosition (double x=0, double y=0, double z=0)
 set the position of a point source (in m) More...
double * GetPosition ()
void SetNormal (double nrm)
void SetWeight (double wgt)
void SetExtern (bool state=true)
void SetKcode (int ActiveCycle=100, int InactiveCycle=10, double ExpectedKeff=1.)
bool GetKcode ()
int GetNActiveCycle ()
int GetNInactiveCycle ()
virtual bool IsUsePrevSource ()
void SetUsePrevSource (bool flag=true)
string GetSourceFileName ()
void SetSourceFileName (string name)
void SetOriginalSourceFileName (string name)
string GetOriginalSourceFileName ()
bool IsStochasticVolumeSource ()
 True if this is a Stochastic Volume Source run. More...
void SetStochasticVolumeSourceShape (Shape_ptr TheShape)
 Set the shape of the outer most sphere for Stochastic Volume run. More...
Shape_ptr GetStochasticVolumeSourceShape ()
 get the source sphere for Stochastic Volume Source run More...

Protected Attributes

bool fSaveCurrentSource
 Whether MURE must save the source distribution of the current run in a file. More...
string fFileToSaveSource
 Name of the file in which the source of the current run will be saved. More...
int fCellNumber
- Protected Attributes inherited from MCSource
double fNPS
 number of source particles More...
string fEnergy
 Energy of the Source (either a number or a bias) More...
double * fPosition
 Position of the point Source (if it is the case) More...
Shape_ptr fSurfaceShape
 Surface Shape for surface source (if it is the case) More...
double fNormal
 Normal direction (inward or outward) for particle source. More...
double fWeight
 weight of the source More...
bool fExtern
 whether the source is extern or defined in MCNP file More...
bool fKcode
 whether or not a KCODE is wanted More...
int fActiveCycle
 number of active cycles in KCODE More...
int fInactiveCycle
 number of inactive cycles in KCODE More...
double fKeff
 expected Keff in KCODE More...
string fSourceFile
 Name of the next source if using file source. More...
string fOriginalSourceFile
 Name of the Original source file. More...
bool fUsePrevSource
 Whether MURE must use the preivous run source or not. More...
bool fStochasticVolumeSource
Shape_ptr fStochasticVolumeSourceShape

Detailed Description

Define a Serpent Source.

This source has to be added to the global gMURE pointer.

See also
J. Hajnrych

Constructor & Destructor Documentation

◆ SerpentSource() [1/2]

SerpentSource::SerpentSource ( double  NPS = 10000)

Normal Constructor.

NPS: number of source particles (default=10 000)

◆ SerpentSource() [2/2]

SerpentSource::SerpentSource ( const SerpentSource s)

Copy Constructor.

◆ ~SerpentSource()

SerpentSource::~SerpentSource ( )


Member Function Documentation

◆ Clone()

MCSource* SerpentSource::Clone ( )

Clone method.

< Clone method

Implements MCSource.

◆ Print()

string SerpentSource::Print ( )

Print the Serpent source (into Serpent input file).

Say whether the source is extern or defined in Sepent file. if set to "true", a external file is used (such as inps, source.mcnp, ...) else a "src" card in used in the serpent file. return false because it is not possible in Serpent

Implements MCSource.

◆ SaveSourceInFile()

void SerpentSource::SaveSourceInFile ( string  FileToSaveSource)

Create a Source file that can be used afterwards with UsePreviousRunSource(). The source is made from the positions of all fissions occured during the active cycles. The path given in argmuent is from where SMURE is run, not from where the serpent input files are.

◆ SetCell()

void SerpentSource::SetCell ( Cell TheCell)

< set the cell number for a volume source.

◆ SetSurface()

void SerpentSource::SetSurface ( Shape_ptr  TheShape)

set the Surface number for a surface source.

Reimplemented from MCSource.

◆ UsePreviousRunSource()

void SerpentSource::UsePreviousRunSource ( string  FirstSource = "")

use a previous kcode source for serpent.

Tells MCSource to use for the next MC run the fission source obtained from a previous critical run. In an evolution, each MC step is done using the source from the previous MC step (or the input "s" file provide by the user). This can be used to reduce inactive cycle in critical calculation, starting from an already converge fission source.

FirstSource: name of the first source to use. If not specified, creates a default source.

Implements MCSource.

Member Data Documentation

◆ fCellNumber

int SerpentSource::fCellNumber

◆ fFileToSaveSource

string SerpentSource::fFileToSaveSource

Name of the file in which the source of the current run will be saved.

◆ fSaveCurrentSource

bool SerpentSource::fSaveCurrentSource

Whether MURE must save the source distribution of the current run in a file.

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

MURE Project, documentation generated by Doxygen 1.9.1 - Mon Jan 3 2022