MURE
Loading...
Searching...
No Matches
List of all members
ConnectorPlugin Class Referenceabstract

Define a Connector plugin. More...

#include <ConnectorPlugin.hxx>

Inheritance diagram for ConnectorPlugin:
MCNP::Connector Serpent::Connector

Public Member Functions

Constructor methods
 ConnectorPlugin ()
 
virtual ~ConnectorPlugin ()
 
 ConnectorPlugin (const ConnectorPlugin &plugin)
 copy constructor
 
virtual ConnectorPluginClone ()=0
 Clone method.
 
xsdir/xsdata methods
virtual void BuildXSDIR ()=0
 
Detectors related methods
virtual void BuildDetectors ()=0
 build automatic tallies for standard evolution
 
virtual void UpdateSigmaPhiDetectors ()=0
 update (read from MC output) automatic tallies for standard evolution
 
virtual void BuildMultiGroupDetectors ()=0
 build automatic tallies for in a multigroup evolution
 
virtual void BuildTHMultiGroupDetectors ()=0
 
virtual void UpdateTHMultiGroupSigmaPhiDetectors ()=0
 
bool IsTHMultiGroupTalliesUsed ()
 
virtual void UpdateMultiGroupSigmaPhiDetectors ()=0
 update (read from MC output) automatic tallies for multigroup evolution
 
virtual void UpdateKeff ()=0
 read from MC output the keff and give it to MURE
 
virtual void FindDetectorMCUserFile ()=0
 Find tallies in a MCUser input files.
 
virtual void SumOutputDetectorFile (string DetectorBaseFileName, int N, string SumDetectorFileName)=0
 
MC source &exec methods
void SetMCSource (MCSource *source)
 set the MC particle source to the Connector
 
MCSourceGetMCSource ()
 
virtual string GetMCExecCommandString (string InputFileName, string Arg="", string FileArg="")
 
string GetMCGlobalOutputFileName (string InputFileName)
 
virtual string GetMCDetectorOutputFileName (string InputFileName, bool OnlyKeff=false)
 
Writing file methods
virtual void BuildMCFile (string FileString="")=0
 Build the MC input file from the MURE one.
 
virtual void BuildPinCells (bool Auto=false)=0
 
virtual void FindMissingVolume ()=0
 Find Missing cell volumes for tallies.
 
virtual void UpdateTallyBinVolume ()=0
 Reread all bins and assign necessary volume.
 
virtual string Print (Cell *TheCell)=0
 Print a cell in the MC input file.
 
virtual string Print (Material *mat)=0
 Print a material in the MC input file.
 
virtual string PrintModeratorMaterial (Material *mat)=0
 Print a special S(alpha, Beta) treatment associated to a Material in the MC input file.
 
virtual string Print (Transformation *Transfo)=0
 print transformation (translation &rotation) card
 
virtual void WriteMCFileWithoutDetector (string FileName="inp", bool tmpvol=false)
 build a MC input file without tally just to obtain keff for void, temperature coefficient, ...
 

Internal methods to be used ONLY by developpers

bool fRebuildDetector
 whether or not rebuild detectors (for thermo-hydraulics)
 
MCSourcefSource
 The MC particle source.
 
string fMCGlobalOutputSuffix
 "o" file for MCNP and it should be "_res.m" file for Serpent
 
string fMCDetectorOutputSuffix
 "m" files for MCNP or "_det0.m" for Serpent
 
bool fPinCellBuilt
 whether or not PinCell have already been built
 
bool fTHMultigroupTallies
 True in Thermal hydraulics multigroup calculation.
 
bool fIsSerpentConnector
 
virtual MathNodeGetNewNode (int sign)
 a way to obtain a new Node (here a MathNode) from every where
 
virtual MureSimpleBinGetNewSimpleBin ()=0
 a way to obtain a new SimpleBin (here a MureSimpleBin) from every where
 
virtual MureGroupBinGetNewGroupBin ()=0
 a way to obtain a new roupBin (here a MureGroupBin) from every where
 
virtual string PrintId (Material *material)=0
 print a "generic" id name to material number (e.g. "m"=>m1)
 
virtual string PrintId (Cell *cell)=0
 print a "generic" id name to cell number (e.g. "c"=>c1)
 
virtual string PrintMaterialId (int id)
 
bool IsSerpentConnector ()
 
bool IsVolumeCalculationNeeded ()
 scan tallies to find if a bin need a volume that is, for now, unknown
 

Detailed Description

Define a Connector plugin.

This allows to have direct interaction with Serpent or MCNP (writing files, reading output, setting special cards, ...). IT IS MANDATORY TO AFFECT TO MURE A Serpent::Connector or a MCNP::Connector VIA the gMURE->SetConnectorPlugin() jus after the "int main()" declaration. See MURE::SetConnectorPlugin().

Author
J. Hajnrych
PTO
Version
1.0

Constructor & Destructor Documentation

◆ ConnectorPlugin() [1/2]

ConnectorPlugin::ConnectorPlugin ( )

◆ ~ConnectorPlugin()

ConnectorPlugin::~ConnectorPlugin ( )
virtual

◆ ConnectorPlugin() [2/2]

ConnectorPlugin::ConnectorPlugin ( const ConnectorPlugin plugin)

copy constructor

Member Function Documentation

◆ BuildDetectors()

virtual void ConnectorPlugin::BuildDetectors ( )
pure virtual

build automatic tallies for standard evolution

Implemented in MCNP::Connector, and Serpent::Connector.

◆ BuildMCFile()

virtual void ConnectorPlugin::BuildMCFile ( string  FileString = "")
pure virtual

Build the MC input file from the MURE one.

Implemented in MCNP::Connector, and Serpent::Connector.

◆ BuildMultiGroupDetectors()

virtual void ConnectorPlugin::BuildMultiGroupDetectors ( )
pure virtual

build automatic tallies for in a multigroup evolution

Implemented in MCNP::Connector, and Serpent::Connector.

◆ BuildPinCells()

virtual void ConnectorPlugin::BuildPinCells ( bool  Auto = false)
pure virtual

Build Pincells. MURE has implemented the Serpent "pin" cell in a PinCell class. This is a very useful and elegant way of defining general pins. This methods transforms these PinCells in real MCNP Cells or virtual Serpent Cells. The Auto flag is used only in the "Serpent" version.

Parameters
Auto: when true, it means that it is called from automatic tallies building

Implemented in MCNP::Connector, and Serpent::Connector.

◆ BuildTHMultiGroupDetectors()

virtual void ConnectorPlugin::BuildTHMultiGroupDetectors ( )
pure virtual

Implemented in MCNP::Connector, and Serpent::Connector.

◆ BuildXSDIR()

virtual void ConnectorPlugin::BuildXSDIR ( )
pure virtual

Implemented in MCNP::Connector, and Serpent::Connector.

◆ Clone()

virtual ConnectorPlugin * ConnectorPlugin::Clone ( )
pure virtual

Clone method.

Implemented in MCNP::Connector, and Serpent::Connector.

◆ FindDetectorMCUserFile()

virtual void ConnectorPlugin::FindDetectorMCUserFile ( )
pure virtual

Find tallies in a MCUser input files.

Implemented in MCNP::Connector, and Serpent::Connector.

◆ FindMissingVolume()

virtual void ConnectorPlugin::FindMissingVolume ( )
pure virtual

Find Missing cell volumes for tallies.

Implemented in MCNP::Connector, and Serpent::Connector.

◆ GetMCDetectorOutputFileName()

virtual string ConnectorPlugin::GetMCDetectorOutputFileName ( string  InputFileName,
bool  OnlyKeff = false 
)
inlinevirtual

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

◆ GetMCExecCommandString()

virtual string ConnectorPlugin::GetMCExecCommandString ( string  InputFileName,
string  Arg = "",
string  FileArg = "" 
)
inlinevirtual

MC exec command line. This return the string to exec (via system()) to run a MC. It takes input file name (e.g. inp000), arguments (e.g. "task N n=) and file argument (e.g. s=inps).

Parameters
InputFileName: input file name
Arg: argument between exec name and input file name (task ...)
FileArg: argument after input file name (s=...)

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

◆ GetMCGlobalOutputFileName()

string ConnectorPlugin::GetMCGlobalOutputFileName ( string  InputFileName)
inline

◆ GetMCSource()

MCSource * ConnectorPlugin::GetMCSource ( )
inline

< return the MC particle source

◆ GetNewGroupBin()

virtual MureGroupBin * ConnectorPlugin::GetNewGroupBin ( )
pure virtual

a way to obtain a new roupBin (here a MureGroupBin) from every where

Implemented in MCNP::Connector, and Serpent::Connector.

◆ GetNewNode()

MathNode * ConnectorPlugin::GetNewNode ( int  sign)
virtual

a way to obtain a new Node (here a MathNode) from every where

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

◆ GetNewSimpleBin()

virtual MureSimpleBin * ConnectorPlugin::GetNewSimpleBin ( )
pure virtual

a way to obtain a new SimpleBin (here a MureSimpleBin) from every where

Implemented in MCNP::Connector, and Serpent::Connector.

◆ IsSerpentConnector()

bool ConnectorPlugin::IsSerpentConnector ( )
inline

< used for Tally group bin on surface for serpent

◆ IsTHMultiGroupTalliesUsed()

bool ConnectorPlugin::IsTHMultiGroupTalliesUsed ( )
inline

< return true for Thermal hydraulics Multi group flux MC run

◆ IsVolumeCalculationNeeded()

bool ConnectorPlugin::IsVolumeCalculationNeeded ( )
protected

scan tallies to find if a bin need a volume that is, for now, unknown

◆ Print() [1/3]

virtual string ConnectorPlugin::Print ( Cell TheCell)
pure virtual

Print a cell in the MC input file.

Implemented in MCNP::Connector, and Serpent::Connector.

◆ Print() [2/3]

virtual string ConnectorPlugin::Print ( Material mat)
pure virtual

Print a material in the MC input file.

Implemented in MCNP::Connector, and Serpent::Connector.

◆ Print() [3/3]

virtual string ConnectorPlugin::Print ( Transformation Transfo)
pure virtual

print transformation (translation &rotation) card

Implemented in MCNP::Connector, and Serpent::Connector.

◆ PrintId() [1/2]

virtual string ConnectorPlugin::PrintId ( Cell cell)
pure virtual

print a "generic" id name to cell number (e.g. "c"=>c1)

Implemented in MCNP::Connector, and Serpent::Connector.

◆ PrintId() [2/2]

virtual string ConnectorPlugin::PrintId ( Material material)
pure virtual

print a "generic" id name to material number (e.g. "m"=>m1)

Implemented in MCNP::Connector, and Serpent::Connector.

◆ PrintMaterialId()

virtual string ConnectorPlugin::PrintMaterialId ( int  id)
inlinevirtual

< convert material name/number in string

Reimplemented in Serpent::Connector.

◆ PrintModeratorMaterial()

virtual string ConnectorPlugin::PrintModeratorMaterial ( Material mat)
pure virtual

Print a special S(alpha, Beta) treatment associated to a Material in the MC input file.

Implemented in MCNP::Connector, and Serpent::Connector.

◆ SetMCSource()

void ConnectorPlugin::SetMCSource ( MCSource source)

set the MC particle source to the Connector

◆ SumOutputDetectorFile()

virtual void ConnectorPlugin::SumOutputDetectorFile ( string  DetectorBaseFileName,
int  N,
string  SumDetectorFileName 
)
pure virtual

Sum MC detector output in multi run mode. The multi run mode (set via MURE::SetRunMultiMC) allow to run, for each MC step, N MC calculations to smooth fluactuations ; Then, this method is used to buid the sum result of each individual MC run, in a unique Detector output file ("m" file of MCNP or "_det0.m" file for Serpent.

Parameters
DetectorBaseFileName: base name of individual run (real name are DetectorBaseFileNameX where X=0..N)
N: number of multi-run in a MC step
SumDetectorFileName: sum of all individual run in this file (it has the same format than each individual one)

Implemented in MCNP::Connector, and Serpent::Connector.

◆ UpdateKeff()

virtual void ConnectorPlugin::UpdateKeff ( )
pure virtual

read from MC output the keff and give it to MURE

Implemented in MCNP::Connector, and Serpent::Connector.

◆ UpdateMultiGroupSigmaPhiDetectors()

virtual void ConnectorPlugin::UpdateMultiGroupSigmaPhiDetectors ( )
pure virtual

update (read from MC output) automatic tallies for multigroup evolution

Implemented in MCNP::Connector, and Serpent::Connector.

◆ UpdateSigmaPhiDetectors()

virtual void ConnectorPlugin::UpdateSigmaPhiDetectors ( )
pure virtual

update (read from MC output) automatic tallies for standard evolution

Implemented in MCNP::Connector, and Serpent::Connector.

◆ UpdateTallyBinVolume()

virtual void ConnectorPlugin::UpdateTallyBinVolume ( )
pure virtual

Reread all bins and assign necessary volume.

Implemented in MCNP::Connector, and Serpent::Connector.

◆ UpdateTHMultiGroupSigmaPhiDetectors()

virtual void ConnectorPlugin::UpdateTHMultiGroupSigmaPhiDetectors ( )
pure virtual

Implemented in MCNP::Connector, and Serpent::Connector.

◆ WriteMCFileWithoutDetector()

virtual void ConnectorPlugin::WriteMCFileWithoutDetector ( string  FileName = "inp",
bool  tmpvol = false 
)
inlinevirtual

build a MC input file without tally just to obtain keff for void, temperature coefficient, ...

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

Member Data Documentation

◆ fIsSerpentConnector

bool ConnectorPlugin::fIsSerpentConnector
protected

◆ fMCDetectorOutputSuffix

string ConnectorPlugin::fMCDetectorOutputSuffix
protected

"m" files for MCNP or "_det0.m" for Serpent

◆ fMCGlobalOutputSuffix

string ConnectorPlugin::fMCGlobalOutputSuffix
protected

"o" file for MCNP and it should be "_res.m" file for Serpent

◆ fPinCellBuilt

bool ConnectorPlugin::fPinCellBuilt
protected

whether or not PinCell have already been built

◆ fRebuildDetector

bool ConnectorPlugin::fRebuildDetector
protected

whether or not rebuild detectors (for thermo-hydraulics)

◆ fSource

MCSource* ConnectorPlugin::fSource
protected

The MC particle source.

◆ fTHMultigroupTallies

bool ConnectorPlugin::fTHMultigroupTallies
protected

True in Thermal hydraulics multigroup calculation.


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

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