MURE
Loading...
Searching...
No Matches
ConnectorPlugin.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19
20#ifndef _CONNECTORPLUGIN_HXX_
21#define _CONNECTORPLUGIN_HXX_
22
23#include <string>
24
25#include "MCSource.hxx"
26#include "MathNode.hxx"
27#include "Cell.hxx"
28#include "MureSimpleBin.hxx"
29#include "MureGroupBin.hxx"
30
31class Cell;
32class MCSource;
33class Material;
34class MathNode;
35class MureGroupBin;
36class MureSimpleBin;
37class Transformation;
38
45
55{
56
57 public :
63 virtual ~ConnectorPlugin();
64 ConnectorPlugin(const ConnectorPlugin &plugin);
65 virtual ConnectorPlugin *Clone() = 0;
67
72 virtual void BuildXSDIR() = 0;
74
75
80 virtual void BuildDetectors() = 0;
81 virtual void UpdateSigmaPhiDetectors() = 0;
82 virtual void BuildMultiGroupDetectors() = 0;
83
84 virtual void BuildTHMultiGroupDetectors() = 0;
87 {
89 }
90
92 virtual void UpdateKeff() = 0;
93 virtual void FindDetectorMCUserFile() = 0;
103 virtual void SumOutputDetectorFile(string DetectorBaseFileName, int N, string SumDetectorFileName) = 0;
105
110 void SetMCSource(MCSource *source);
112 {
113 return fSource;
114 }
115
124 virtual string GetMCExecCommandString(string InputFileName, string Arg = "", string FileArg = "")
125 {
126 return "";
127 }
128 string GetMCGlobalOutputFileName(string InputFileName)
129 {
130 return InputFileName + fMCGlobalOutputSuffix;
131 }
132 virtual string GetMCDetectorOutputFileName(string InputFileName, bool OnlyKeff = false)
133 {
134 return InputFileName + fMCDetectorOutputSuffix;
135 }
137
142 virtual void BuildMCFile(string FileString = "") = 0;
150 virtual void BuildPinCells(bool Auto = false) = 0;
151
152 virtual void FindMissingVolume() = 0;
153 virtual void UpdateTallyBinVolume() = 0;
154
155 virtual string Print(Cell *TheCell) = 0;
156 virtual string Print(Material *mat) = 0;
157 virtual string PrintModeratorMaterial(Material *mat) = 0;
158 virtual string Print(Transformation *Transfo) = 0;
159
160 virtual void WriteMCFileWithoutDetector(string FileName = "inp", bool tmpvol = false) {}
161
163
168 virtual MathNode *GetNewNode(int sign);
171 virtual string PrintId(Material *material) = 0;
172 virtual string PrintId(Cell *cell) = 0;
173 virtual string PrintMaterialId(int id)
174 {
175 return string();
176 }
178 {
179 return fIsSerpentConnector;
180 }
182
183 protected:
185
191
193
195};
196
197#endif
Header file for Cell class.
#define sign(a)
Definition GenericReactorAssembly.cxx:43
Header file for Monte-Carlo Source abstract class.
Header file for MathNode class.
Header file for MureGroupBin class.
Header file for MureSimpleBin class.
A Cell is composed from a Shape and a Material.
Definition Cell.hxx:84
Define a Connector plugin.
Definition ConnectorPlugin.hxx:55
virtual void UpdateSigmaPhiDetectors()=0
update (read from MC output) automatic tallies for standard evolution
virtual string PrintModeratorMaterial(Material *mat)=0
Print a special S(alpha, Beta) treatment associated to a Material in the MC input file.
MCSource * fSource
The MC particle source.
Definition ConnectorPlugin.hxx:187
virtual MureGroupBin * GetNewGroupBin()=0
a way to obtain a new roupBin (here a MureGroupBin) from every where
bool IsTHMultiGroupTalliesUsed()
Definition ConnectorPlugin.hxx:86
MCSource * GetMCSource()
Definition ConnectorPlugin.hxx:111
bool fRebuildDetector
whether or not rebuild detectors (for thermo-hydraulics)
Definition ConnectorPlugin.hxx:186
virtual void BuildTHMultiGroupDetectors()=0
virtual MathNode * GetNewNode(int sign)
a way to obtain a new Node (here a MathNode) from every where
Definition ConnectorPlugin.cxx:71
virtual void UpdateTHMultiGroupSigmaPhiDetectors()=0
virtual void UpdateMultiGroupSigmaPhiDetectors()=0
update (read from MC output) automatic tallies for multigroup evolution
virtual string Print(Transformation *Transfo)=0
print transformation (translation &rotation) card
virtual void UpdateTallyBinVolume()=0
Reread all bins and assign necessary volume.
bool IsSerpentConnector()
Definition ConnectorPlugin.hxx:177
virtual string PrintMaterialId(int id)
Definition ConnectorPlugin.hxx:173
ConnectorPlugin()
Definition ConnectorPlugin.cxx:34
virtual ConnectorPlugin * Clone()=0
Clone method.
virtual string GetMCExecCommandString(string InputFileName, string Arg="", string FileArg="")
Definition ConnectorPlugin.hxx:124
void SetMCSource(MCSource *source)
set the MC particle source to the Connector
Definition ConnectorPlugin.cxx:77
string GetMCGlobalOutputFileName(string InputFileName)
Definition ConnectorPlugin.hxx:128
bool fPinCellBuilt
whether or not PinCell have already been built
Definition ConnectorPlugin.hxx:190
virtual void SumOutputDetectorFile(string DetectorBaseFileName, int N, string SumDetectorFileName)=0
virtual void FindMissingVolume()=0
Find Missing cell volumes for tallies.
string fMCGlobalOutputSuffix
"o" file for MCNP and it should be "_res.m" file for Serpent
Definition ConnectorPlugin.hxx:188
virtual void BuildMultiGroupDetectors()=0
build automatic tallies for in a multigroup evolution
virtual void UpdateKeff()=0
read from MC output the keff and give it to MURE
bool IsVolumeCalculationNeeded()
scan tallies to find if a bin need a volume that is, for now, unknown
Definition ConnectorPlugin.cxx:85
string fMCDetectorOutputSuffix
"m" files for MCNP or "_det0.m" for Serpent
Definition ConnectorPlugin.hxx:189
virtual ~ConnectorPlugin()
Definition ConnectorPlugin.cxx:49
bool fTHMultigroupTallies
True in Thermal hydraulics multigroup calculation.
Definition ConnectorPlugin.hxx:192
virtual void FindDetectorMCUserFile()=0
Find tallies in a MCUser input files.
virtual string GetMCDetectorOutputFileName(string InputFileName, bool OnlyKeff=false)
Definition ConnectorPlugin.hxx:132
virtual void BuildDetectors()=0
build automatic tallies for standard evolution
virtual string PrintId(Cell *cell)=0
print a "generic" id name to cell number (e.g. "c"=>c1)
virtual MureSimpleBin * GetNewSimpleBin()=0
a way to obtain a new SimpleBin (here a MureSimpleBin) from every where
virtual string Print(Material *mat)=0
Print a material in the MC input file.
virtual string PrintId(Material *material)=0
print a "generic" id name to material number (e.g. "m"=>m1)
virtual void WriteMCFileWithoutDetector(string FileName="inp", bool tmpvol=false)
build a MC input file without tally just to obtain keff for void, temperature coefficient,...
Definition ConnectorPlugin.hxx:160
virtual void BuildPinCells(bool Auto=false)=0
virtual void BuildXSDIR()=0
bool fIsSerpentConnector
Definition ConnectorPlugin.hxx:194
virtual void BuildMCFile(string FileString="")=0
Build the MC input file from the MURE one.
virtual string Print(Cell *TheCell)=0
Print a cell in the MC input file.
Define a Monte-Carlo Source.
Definition MCSource.hxx:53
A Material constituing a Cell.
Definition Material.hxx:83
MathNode allows to construct Union or Intersection of Shape.
Definition MathNode.hxx:50
Define group cell or surface bin.
Definition MureGroupBin.hxx:58
Define a general Simple Tally Bin (cell, universe or surface).
Definition MureSimpleBin.hxx:69
Spatial Transformation for cell or universe.
Definition Transformation.hxx:59

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