SAnsell / CombLayer

MCNP(X) project builder using C++
GNU General Public License v3.0
14 stars 13 forks source link

PipeWork -- Problems and Solutions #47

Closed SAnsell closed 8 years ago

SAnsell commented 8 years ago

I have been adding pipework to the ESS model based (approximately) on the code from K. Batkov.

The following came up -- (a) the state of the Simulation object map (b) validity of the outer void.

First point (a) -- I have removed a number of calls to

System.populateCells(); System.validateObjSurfMap();

These are EXPENSIVE calls and I now think that nobody should need to add them for pipelines to be valid [it is now internal]. However, the exception is if pipelines are in pipelines AND you are not adding them from outside to inside [it is no problem if you add the outer pipeline and then add the inner pipelines, but the other way round will require real care].

If you find that you actually need them except the the one exception please raise it as a bug/issue.

(b) In debugging this issue I created some pipes during the main build -- and erroneously put them DURING the makeESS build. This resulted in them being placed into the simulation when the outer void (74123) was not in a valid state because the final containedComp had not been added to it. This resulted in failure to determine the cells for the pipe. [Note: the ess models worked round that problem by forcing insert cells on the pipe -- this has been removed].

So please be careful about the state of the model at pipework construction. -- Finally if in doubt, use include MainProcess.h, and execute a buildFullSimulaton just before you build your pipes. If that ouput has an invalid outer void then your pipes have a high chance of failure.

Version of the master [ 6f91e26] has these changes.

Any problems / bugs / difficulties / thoughts with this, please post a note etc

kbat commented 8 years ago

I get these errors when I am trying to compile the latest master (and 6f91e26, the commit you refer to):

make ess ./pipe.cxx: In function ‘int main(int, char)’: ./pipe.cxx:108:31: error: ‘IParam’ was not declared in this scope SimPtr=createSimulation(IParam,Names,Oname); ^ ./pipe.cxx:108:49: error: ‘createSimulation’ was not declared in this scope SimPtr=createSimulation(IParam,Names,Oname); ^ ./pipe.cxx:108:49: note: suggested alternative: In file included from ./pipe.cxx:60:0: /home/kbat/misc/soft/comblayer/master/System/processInc/MainProcess.h:84:15: note: ‘mainSystem::createSimulation’ Simulation createSimulation(inputParam&,std::vectorstd::string&, ^ ./pipe.cxx:114:30: error: ‘createPipeInputs’ was not declared in this scope createPipeInputs(IParam); ^ ./pipe.cxx:114:30: note: suggested alternative: In file included from ./pipe.cxx:60:0: /home/kbat/misc/soft/comblayer/master/System/processInc/MainProcess.h:68:8: note: ‘mainSystem::createPipeInputs’ void createPipeInputs(inputParam&); ^ ./pipe.cxx:118:45: error: ‘InputModifications’ was not declared in this scope InputModifications(SimPtr,IParam,Names); ^ ./pipe.cxx:118:45: note: suggested alternative: In file included from ./pipe.cxx:60:0: /home/kbat/misc/soft/comblayer/master/System/processInc/MainProcess.h:88:8: note: ‘mainSystem::InputModifications’ void InputModifications(Simulation,inputParam&, ^

SAnsell commented 8 years ago

I changed CMake.pl so unless you add pipe back into CMake.pl it shouldn't even be compiled.

Do :

./CMake.pl -O
cmake ./
make 

I thinks that will fix the problem [I hope].

Everyone should be careful to allow the git function to mv files around in this version -- particularly if you are using it as a merge. The main movement is to move pipeVariables to EssPipeVariables. (there is another pipeVariables in a different part of the code -- it works due to namespace difference but felt a renaming was better).