From aff55a017b4445886668d93e2b83a5531db1208d Mon Sep 17 00:00:00 2001 From: Stuart Ansell Date: Sat, 15 Feb 2014 10:14:11 +0000 Subject: [PATCH] Issue #4 Test Failures: -- This fixes some (but not all) of the tests. Main fixes are from the tests not correctly using newer interfaces or other such things. -- Additional fix because I wanted to display the bilbau model and added that to the main list along with fixing the materials naming issue by changing "Aluminium6061" to "Aluminium". -- Started adjusting the position of the pipes in the ESS moderator sample. --- Main/bilbau.cxx | 1 - bibBuild/bilbauVariables.cxx | 14 +++--- construct/CylMod.cxx | 10 +++-- essBuild/SupplyPipe.cxx | 24 ++++++----- essBuild/essVariables.cxx | 20 +++++++-- essBuildInc/SupplyPipe.h | 1 + getMk.pl | 7 ++- monte/RuleBinary.cxx | 8 ++-- poly/PolyVar.cxx | 4 +- polyInc/PolyVar.h | 2 +- process/objectRegister.cxx | 4 +- t1Build/refPlate.cxx | 25 ++--------- test/simpleObj.cxx | 17 +------- test/testAlgebra.cxx | 5 +-- test/testContained.cxx | 19 ++++++--- test/testInputParam.cxx | 10 ++--- test/testInsertComp.cxx | 8 ++-- test/testLineTrack.cxx | 4 +- test/testObjectRegister.cxx | 14 ++---- test/testPipeUnit.cxx | 47 +++++++++++++++----- test/testPoly.cxx | 4 +- test/testRules.cxx | 6 +-- test/testSimpleObj.cxx | 29 +------------ test/testSingleObject.cxx | 14 +++--- test/testSolveValues.cxx | 83 ++++++++++++++++++++++-------------- test/testSurfRegister.cxx | 22 +++++----- testInclude/testPipeUnit.h | 6 ++- 27 files changed, 209 insertions(+), 199 deletions(-) diff --git a/Main/bilbau.cxx b/Main/bilbau.cxx index a88b81661..8380630ab 100644 --- a/Main/bilbau.cxx +++ b/Main/bilbau.cxx @@ -177,7 +177,6 @@ main(int argc,char* argv[]) SimPtr->removeComplements(); SimPtr->removeDeadSurfaces(0); - SimPtr->removeOppositeSurfaces(); ModelSupport::setDefaultPhysics(*SimPtr,IParam); const int renumCellWork=tallySelection(*SimPtr,IParam); diff --git a/bibBuild/bilbauVariables.cxx b/bibBuild/bilbauVariables.cxx index 3224075f6..305f4df95 100644 --- a/bibBuild/bilbauVariables.cxx +++ b/bibBuild/bilbauVariables.cxx @@ -96,7 +96,7 @@ BilbauVariables(FuncDataBase& Control) Control.addVariable("RotorWheelBeMat","Berilio"); //Be S-200F - Control.addVariable("RotorWheelWallMat","Aluminium6061"); // Al-6061 + Control.addVariable("RotorWheelWallMat","Aluminium"); // Al-6061 Control.addVariable("RotorWheelWaterMat","H2O"); Control.addVariable("RotorWheelVesselMat","Stainless304"); Control.addVariable("RotorWheelPolyMat","B-Poly"); //shielding for main drive @@ -281,9 +281,9 @@ BilbauVariables(FuncDataBase& Control) Control.addVariable("ColdModFrontGap",4.0); // Control.addVariable("ColdModBackGap",2.0); // Control.addVariable("ColdModWaterMat",11); // water H2O - Control.addVariable("ColdModModMat",79); // Metano a 20 k + Control.addVariable("ColdModModMat","CH4inFoam"); // Metano a 20 k Control.addVariable("ColdModModTemp",20.0); // Metano a 20 k - Control.addVariable("ColdModWallMat",78); // aluminium 6061 + Control.addVariable("ColdModWallMat","Aluminium"); // aluminium 6061 Control.addVariable("ColdModPremThick",1.5); // Premoderator Control.addVariable("ColdModWallPremThick",0.2); // Control.addVariable("ColdModWaterTemp",300.0); // water H2O @@ -335,7 +335,7 @@ BilbauVariables(FuncDataBase& Control) Control.addVariable("BeFilterForwardLength",20.0); Control.addVariable("BeFilterForwardBeMat","Be300K"); // Beryllium at RT Control.addVariable("BeFilterForwardBeTemp",75.0); // be temp - Control.addVariable("BeFilterForwardWallMat","Aluminium6061"); // aluminium + Control.addVariable("BeFilterForwardWallMat","Aluminium"); // aluminium // Dont like this -- could be used off link points more generically? Control.Parse("ColdModWidth+2.0"); @@ -360,8 +360,8 @@ BilbauVariables(FuncDataBase& Control) Control.addVariable("ColdMod2FrontGap",4.0); // Control.addVariable("ColdMod2BackGap",2.0); // Control.addVariable("ColdMod2WaterMat",11); // water H2O - Control.addVariable("ColdMod2ModMat",79); // Methane at 20I - Control.addVariable("ColdMod2WallMat",78); // aluminium 6061 + Control.addVariable("ColdMod2ModMat","CH4inFoam"); // Methane at 20I + Control.addVariable("ColdMod2WallMat","Aluminium"); // aluminium 6061 Control.addVariable("ColdMod2WaterTemp",20.0); // water H2O Control.addVariable("ColdMod2PremThick",1.5); // Premoderator Control.addVariable("ColdMod2WallPremThick",0.2); // @@ -381,7 +381,7 @@ BilbauVariables(FuncDataBase& Control) Control.addVariable("BeFilterBackwardLength",20.0); Control.addVariable("BeFilterBackwardBeMat","Be77K"); // Beryllium Control.addVariable("BeFilterBackwardBeTemp",75.0); // be temp - Control.addVariable("BeFilterBackwardWallMat","Aluminium6061"); // aluminium 6063 + Control.addVariable("BeFilterBackwardWallMat","Aluminium"); // aluminium 6063 // Dont like this -- could be used off link points more generically? Control.Parse("ColdMod2Width+2*ColdMod2PremThick"); Control.addVariable("BeFilterBackwardWidth"); diff --git a/construct/CylMod.cxx b/construct/CylMod.cxx index e3ee6f4dd..bac3b4e8b 100644 --- a/construct/CylMod.cxx +++ b/construct/CylMod.cxx @@ -144,7 +144,9 @@ CylMod::populate(const FuncDataBase& Control) double R,H,T; int M; - nLayers=Control.EvalVar(keyName+"NLayers"); + nLayers=Control.EvalVar(keyName+"NLayers"); + if (nLayers==0) nLayers=1; // Layers include midle + for(size_t i=0;i(keyName+"CylFlag",0); - ELog::EM<<"cylFlag = "<Geometry::zeroTol) { Out=ModelSupport::getComposite(SMap,modIndex,CI, diff --git a/essBuild/SupplyPipe.cxx b/essBuild/SupplyPipe.cxx index eaf1854dd..4d71000b8 100644 --- a/essBuild/SupplyPipe.cxx +++ b/essBuild/SupplyPipe.cxx @@ -95,7 +95,8 @@ SupplyPipe::SupplyPipe(const SupplyPipe& A) : attachSystem::FixedComp(A), pipeIndex(A.pipeIndex),cellIndex(A.cellIndex), NSegIn(A.NSegIn),Radii(A.Radii),Mat(A.Mat),Temp(A.Temp), - ActiveFlag(A.ActiveFlag),Coaxial(A.Coaxial),PPts(A.PPts), + ActiveFlag(A.ActiveFlag),Coaxial(A.Coaxial), + layerOffset(A.layerOffset),PPts(A.PPts), nAngle(A.nAngle) /*! Copy constructor @@ -121,6 +122,7 @@ SupplyPipe::operator=(const SupplyPipe& A) Temp=A.Temp; ActiveFlag=A.ActiveFlag; Coaxial=A.Coaxial; + layerOffset=A.layerOffset; PPts=A.PPts; nAngle=A.nAngle; } @@ -218,18 +220,18 @@ SupplyPipe::insertInlet(const attachSystem::FixedComp& FC, if (!LC) throw ColErr::CastError(0,"FixedComp to LayerComp"); - - Geometry::Vec3D Pt= Origin+X*PPts[0].X()+ - Y*PPts[0].Y()+Z*PPts[0].Z(); + layerOffset=X*PPts[0].X()+Z*PPts[0].Z(); + Geometry::Vec3D Pt= Origin+layerOffset+Y*PPts[0].Y(); // GET Z Point from layer Geometry::Vec3D PtZ=LC->getSurfacePoint(0,lSideIndex); + PtZ+=layerOffset; const int commonSurf=LC->getCommonSurf(lSideIndex); const std::string commonStr=(commonSurf) ? StrFunc::makeString(commonSurf) : ""; if (PtZ!=Pt) Coaxial.addPoint(Pt); - + const size_t NL(LC->getNLayers()); Coaxial.addSurfPoint (PtZ,LC->getLayerString(0,lSideIndex),commonStr); @@ -237,15 +239,15 @@ SupplyPipe::insertInlet(const attachSystem::FixedComp& FC, for(size_t index=2;indexgetSurfacePoint(index,lSideIndex); - if (PtZ!=Pt) - Coaxial.addSurfPoint - (PtZ,LC->getLayerString(index,lSideIndex),commonStr); + PtZ+=layerOffset; + Coaxial.addSurfPoint + (PtZ,LC->getLayerString(index,lSideIndex),commonStr); + } for(size_t i=0;i ActiveFlag; ///< Active flag ModelSupport::PipeLine Coaxial; ///< Global outer + Geometry::Vec3D layerOffset; ///< Offset of layer std::vector PPts; ///< Pipe points size_t nAngle; ///< Number of angle segments diff --git a/getMk.pl b/getMk.pl index a7526b421..9b57de0e4 100755 --- a/getMk.pl +++ b/getMk.pl @@ -6,7 +6,7 @@ use strict; ## EXECUTABLES -my @masterprog=("fullBuild","ess","muBeam","bnct", +my @masterprog=("fullBuild","ess","muBeam","bnct","bilbau", "sns","t1Real","t1MarkII","testMain"); my @noncompile=("bilbau","clayer","cuBuild","d4c","detectSim", @@ -84,7 +84,10 @@ # "process","support","test","lensModel"); -$gM->addDepUnit("bilbau", [2,10,38,0,27,18,32,25,14,21,34,6,7,37,30,22,11,29,40,41,25,15,24,0,42,28,33,39,16,1,38,4]); +# $gM->addDepUnit("bilbau", [2,10,38,0,27,18,32,25,14,21,34,6,7,37,30,22,11,29,40,41,25,15,24,0,42,28,33,39,16,1,38,4]); + + +$gM->addDepUnit("bilbau", [2,4,38,5,36,17,23,4,43,6,7,37,30,11,35,0,27,18,29,32,25,14,21,15,34,24,0,41,42,28,33,40,39,22,16,1,38,28]); $gM->addDepUnit("pressure", [38,43,0,25,16,14,21,5,25,24,27,15,34,41,42,28,18,29,38,39,22,1,38]); $gM->addDepUnit("divide", [44,38,5,4,43,0,27,25,14,21,25,24,0,15,18,29,41,42,28,33,39,22,16,1,38]); diff --git a/monte/RuleBinary.cxx b/monte/RuleBinary.cxx index 4a697bdae..f2227abd9 100644 --- a/monte/RuleBinary.cxx +++ b/monte/RuleBinary.cxx @@ -2,8 +2,8 @@ CombLayer : MNCPX Input builder * File: monte/RuleBinary.cxx -* - * Copyright (c) 2004-2013 by Stuart Ansell + * + * Copyright (c) 2004-2014 by Stuart Ansell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,7 +47,6 @@ #include "BaseModVisit.h" #include "BnId.h" #include "RotCounter.h" -#include "Triple.h" #include "MatrixBase.h" #include "Matrix.h" #include "Vec3D.h" @@ -430,7 +429,8 @@ RuleBinary::makeEPI(std::vector& PIform) // Make zeroed matrix. Geometry::MatrixBase Grid(PIform.size(),DNFobj.size()); // Map (efficient?? - ELog::EM<<"Size == "<(DIndex), Pt-Axis*D,-Axis); - ELog::EM<<"Connect point == "<(DIndex)); FixedComp::setLinkSurf(DIndex,pIndex+static_cast(DIndex)); planeFlag |= (DIndex) ? 2 << (DIndex-1) : 1; @@ -315,7 +299,6 @@ refPlate::createObjects(Simulation& System) std::ostringstream cx; for(size_t i=0;i<6;i++) cx<get<3>()) { ELog::EM<<"Surface == "<get<0>()<get<1>()<<" "<get<2>()<get<1>()<<" :: " + <get<2>()<get<3>()<("d","dbl"); // single double item @@ -657,9 +657,9 @@ testInputParam::testWrite() std::vector Names; Names.push_back("-y"); Names.push_back("10.0"); - - A.processMainInput(Names); + Names.push_back("20.0"); + A.processMainInput(Names); std::ostringstream cx; A.write(cx); std::string Out=StrFunc::stripMultSpc(cx.str()); diff --git a/test/testInsertComp.cxx b/test/testInsertComp.cxx index 20d080e69..83fb7e14e 100644 --- a/test/testInsertComp.cxx +++ b/test/testInsertComp.cxx @@ -2,8 +2,8 @@ CombLayer : MNCPX Input builder * File: test/testInsertComp.cxx -* - * Copyright (c) 2004-2013 by Stuart Ansell + * + * Copyright (c) 2004-2014 by Stuart Ansell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,11 +41,9 @@ #include "BaseVisit.h" #include "BaseModVisit.h" #include "BnId.h" -#include "Triple.h" #include "MatrixBase.h" #include "Matrix.h" #include "Vec3D.h" -#include "Transform.h" #include "Surface.h" #include "Rules.h" #include "InsertComp.h" @@ -122,7 +120,7 @@ testInsertComp::testAddition() A.addInterSurf(-7); A.addInterSurf(23); A.addInterSurf(33); - ELog::EM<<"Surf == "< A(new attachSystem::FixedComp("A",3)); + OR.cell("A"); OR.addObject(A); diff --git a/test/testPipeUnit.cxx b/test/testPipeUnit.cxx index 31e338563..b3ac942b0 100644 --- a/test/testPipeUnit.cxx +++ b/test/testPipeUnit.cxx @@ -2,8 +2,8 @@ CombLayer : MNCPX Input builder * File: test/testPipeUnit.cxx -* - * Copyright (c) 2004-2013 by Stuart Ansell + * + * Copyright (c) 2004-2014 by Stuart Ansell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,7 +45,6 @@ #include "OutputLog.h" #include "BaseVisit.h" #include "BaseModVisit.h" -#include "Triple.h" #include "MatrixBase.h" #include "Matrix.h" #include "Vec3D.h" @@ -63,10 +62,6 @@ #include "Algebra.h" #include "Line.h" #include "Qhull.h" -#include "NRange.h" -#include "NList.h" -#include "KGroup.h" -#include "Source.h" #include "varList.h" #include "Code.h" #include "FuncDataBase.h" @@ -105,13 +100,45 @@ testPipeUnit::initSim() */ { ASim.resetAll(); - // createSurfaces(); - // createObjects(); - // ASim.createObjSurfMap(); + createSurfaces(); + createObjects(); + ASim.createObjSurfMap(); + return; +} + +void +testPipeUnit::createSurfaces() + /*! + Create the surface list + */ +{ + ELog::RegMethod RegA("testPipeUnit","createSurfaces"); + + ModelSupport::surfIndex& SurI=ModelSupport::surfIndex::Instance(); + + // Outer sphere + SurI.createSurface(100,"so 50"); + return; } +void +testPipeUnit::createObjects() + /*! + Create Object for test + */ +{ + ELog::RegMethod RegA("testPipeUnit","createObjects"); + std::string Out; + int cellIndex(1); + const int surIndex(0); + + Out=ModelSupport::getComposite(surIndex,"100"); + ASim.addCell(MonteCarlo::Qhull(cellIndex++,0,0.0,Out)); + + return; +} int testPipeUnit::applyTest(const int extra) diff --git a/test/testPoly.cxx b/test/testPoly.cxx index b98353788..2dd487b82 100644 --- a/test/testPoly.cxx +++ b/test/testPoly.cxx @@ -2,8 +2,8 @@ CombLayer : MNCPX Input builder * File: test/testPoly.cxx -* - * Copyright (c) 2004-2013 by Stuart Ansell + * + * Copyright (c) 2004-2014 by Stuart Ansell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/test/testRules.cxx b/test/testRules.cxx index 417b415bf..5089d701f 100644 --- a/test/testRules.cxx +++ b/test/testRules.cxx @@ -2,8 +2,8 @@ CombLayer : MNCPX Input builder * File: test/testRules.cxx -* - * Copyright (c) 2004-2013 by Stuart Ansell + * + * Copyright (c) 2004-2014 by Stuart Ansell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,11 +44,9 @@ #include "BaseVisit.h" #include "BaseModVisit.h" #include "BnId.h" -#include "Triple.h" #include "MatrixBase.h" #include "Matrix.h" #include "Vec3D.h" -#include "Transform.h" #include "Surface.h" #include "Rules.h" #include "RuleBinary.h" diff --git a/test/testSimpleObj.cxx b/test/testSimpleObj.cxx index 44d9fe27b..3a0ff83cf 100644 --- a/test/testSimpleObj.cxx +++ b/test/testSimpleObj.cxx @@ -54,17 +54,6 @@ #include "Matrix.h" #include "Vec3D.h" #include "Quaternion.h" -#include "localRotate.h" -#include "masterRotate.h" -#include "Triple.h" -#include "NList.h" -#include "NRange.h" -#include "Tally.h" -#include "cellFluxTally.h" -#include "pointTally.h" -#include "heatTally.h" -#include "tallyFactory.h" -#include "Transform.h" #include "Surface.h" #include "surfIndex.h" #include "Quadratic.h" @@ -75,26 +64,11 @@ #include "FItem.h" #include "FuncDataBase.h" #include "SurInter.h" -#include "BnId.h" -#include "Acomp.h" -#include "Algebra.h" #include "HeadRule.h" #include "Object.h" #include "Qhull.h" #include "RemoveCell.h" -#include "WForm.h" -#include "weightManager.h" #include "ObjSurfMap.h" -#include "ModeCard.h" -#include "PhysCard.h" -#include "PhysImp.h" -#include "LSwitchCard.h" -#include "KGroup.h" -#include "SrcData.h" -#include "SrcItem.h" -#include "Source.h" -#include "KCode.h" -#include "PhysicsCards.h" #include "ReadFunctions.h" #include "surfRegister.h" #include "ModelSupport.h" @@ -102,7 +76,6 @@ #include "Simulation.h" #include "LinkUnit.h" #include "FixedComp.h" -#include "LinearComp.h" #include "ContainedComp.h" #include "World.h" @@ -192,6 +165,7 @@ testSimpleObj::testCreateObj() { ELog::RegMethod RegA("testSimpleObj","testCreateObj"); + initSim(); World::createOuterObjects(ASim); testSystem::simpleObj A("simple"); @@ -223,6 +197,7 @@ testSimpleObj::testRotateAngle() { ELog::RegMethod RegA("testSimpleObj","testAngleRotate"); + initSim(); World::createOuterObjects(ASim); testSystem::simpleObj A("simpleBase"); diff --git a/test/testSingleObject.cxx b/test/testSingleObject.cxx index b8ee7cfe9..d44ba7c68 100644 --- a/test/testSingleObject.cxx +++ b/test/testSingleObject.cxx @@ -2,8 +2,8 @@ CombLayer : MNCPX Input builder * File: test/testSingleObject.cxx -* - * Copyright (c) 2004-2013 by Stuart Ansell + * + * Copyright (c) 2004-2014 by Stuart Ansell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -90,8 +90,7 @@ testSingleObject::testSingleObject() /*! Constructor */ -{ -} +{} testSingleObject::~testSingleObject() /*! @@ -268,9 +267,9 @@ testSingleObject::createObj() cylModVariables(ASim.getDataBase()); - World::createOuterObjects(ASim); - + World::createOuterObjects(ASim); constructSystem::CylMod A("H2CylMod"); + A.addInsertCell(74123); A.createAll(ASim,World::masterOrigin()); @@ -318,10 +317,9 @@ testSingleObject::testLineTrack() */ { ELog::RegMethod RegA("testSingleObject","testLineTrack"); - initSim(); createObj(); - + typedef boost::tuple TTYPE; std::vector Tests; // First test: diff --git a/test/testSolveValues.cxx b/test/testSolveValues.cxx index 33d6d4c09..8e0416e03 100644 --- a/test/testSolveValues.cxx +++ b/test/testSolveValues.cxx @@ -2,8 +2,8 @@ CombLayer : MNCPX Input builder * File: test/testSolveValues.cxx -* - * Copyright (c) 2004-2013 by Stuart Ansell + * + * Copyright (c) 2004-2014 by Stuart Ansell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -123,12 +123,11 @@ testSolveValues::testGetSolutions() // Poly A/B/C number of solutions : Sum of solutions typedef boost::tuple TTYPE; + std::string,size_t,double> TTYPE; std::vector Tests; - Tests.push_back(TTYPE( - "-0.69465837z-0.7193398y-379.108596", + Tests.push_back(TTYPE("-0.69465837z-0.7193398y-379.108596", "0.517449748z^2+(-0.999390827y+21.8953305)z+" "0.482550252y^2-21.1440748y+x^2+52.575x+920.402005", @@ -136,59 +135,79 @@ testSolveValues::testGetSolutions() "0.517780408z^2+(-0.998706012y-0.0363556101x+" "4.60265241)z+0.482904825y^2+" "(-0.0376473363x-4.50181022)y+" - "0.999314767x^2+1.5680273x-389.022646", - - 2, - Geometry::Vec3D(0,0,0))); + "0.999314767x^2+1.5680273x-389.022646", + 2,1e-2)); + - Tests.push_back(TTYPE("x-23","y-10","z-30",1,Geometry::Vec3D(23,10,30))); + Tests.push_back(TTYPE("x-23","y-10","z-30",1,1e-2)); - Tests.push_back(TTYPE("x-23","y-10","z^2+y^2-1108.89",2, - Geometry::Vec3D(46,20,0.0))); + Tests.push_back(TTYPE("x-23","y-10","z^2+y^2-1108.89",2,1e-2)); Tests.push_back(TTYPE("z^2+y^2+10y+x^2","z^2+y^2-10y+x^2","z^2+y^2+x^2-10x",1, - Geometry::Vec3D(0,0,0))); + 1e-2)); Tests.push_back(TTYPE("-0.71934z+0.694658y+5.78095", "-0.694658z-0.71934y-177.109", "0.51745z^2+(-0.999391y+4.63118)z+0.48255y^2-4.47227y+x^2-95.7277", - 2, - Geometry::Vec3D(0,-2*131.417,-2*118.872))); + 2,1e-2)); + PolyVar<3> FXYZ,GXYZ,HXYZ; - std::vector::const_iterator vc; + std::vector::const_iterator tc; - for(vc=Tests.begin();vc!=Tests.end();vc++) + for(tc=Tests.begin();tc!=Tests.end();tc++) { - FXYZ.read(vc->get<0>()); - GXYZ.read(vc->get<1>()); - HXYZ.read(vc->get<2>()); + FXYZ.read(tc->get<0>()); + GXYZ.read(tc->get<1>()); + HXYZ.read(tc->get<2>()); solveValues SV; SV.setEquations(FXYZ,GXYZ,HXYZ); SV.getSolution(); // Add up solutions: const std::vector& Res=SV.getAnswers(); - Geometry::Vec3D SumPt= - std::accumulate(Res.begin(),Res.end(),Geometry::Vec3D()); + + + double sumResult(0.0); + for(size_t j=0;jsumResult) + sumResult=sum; + } - Geometry::Vec3D Diff=SumPt - vc->get<4>(); - if (static_cast(Res.size())!=vc->get<3>() || - Diff.abs() > 1e-3 ) + if (Res.size()!=tc->get<3>() || sumResult > tc->get<4>() ) { - ELog::EM<<"Failed on test"<<(vc-Tests.begin())+1<get<4>()<get<4>()<(ELog::EM.Estream()," : ")); ELog::EM< Tests; Tests.push_back(TTYPE(3,"px 1",3)); - Tests.push_back(TTYPE(4,"p -1 0 0 -1",3)); + Tests.push_back(TTYPE(4,"p -1 0 0 -1",-3)); std::vector::const_iterator tc; @@ -215,18 +214,20 @@ testSurfRegister::testPlaneReflection() if (SMap.registerSurf(SN,PX)!=tc->get<2>()) { + ELog::EM<<"Test == "<<(tc-Tests.begin())+1<(tc->get<2>()); if (PY) - ELog::EM<<"Plane[Expected] == "<<*PY<side(Geometry::Vec3D(1,0,0)) - <side(Geometry::Vec3D(1,0,0)) - <mirrorSelf(); ELog::EM<<"Rev Surf == "<side(Geometry::Vec3D(1,0,0)) - < ResTest; ResTest.push_back(RTYPE(3,34)); @@ -287,6 +288,7 @@ testSurfRegister::testUnique() return -2; } } + std::vector::const_iterator rc; for(rc=ResTest.begin();rc!=ResTest.end();rc++) { diff --git a/testInclude/testPipeUnit.h b/testInclude/testPipeUnit.h index 62ef21d3f..16ab560bf 100644 --- a/testInclude/testPipeUnit.h +++ b/testInclude/testPipeUnit.h @@ -2,8 +2,8 @@ CombLayer : MNCPX Input builder * File: testInclude/testPipeUnit.h -* - * Copyright (c) 2004-2013 by Stuart Ansell + * + * Copyright (c) 2004-2014 by Stuart Ansell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,6 +39,8 @@ class testPipeUnit Simulation ASim; ///< Simulation model void initSim(); + void createSurfaces(); + void createObjects(); //Tests int testBasic();