Skip to content

Commit

Permalink
Issue #4 Test Failures:
Browse files Browse the repository at this point in the history
   -- 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.
  • Loading branch information
SAnsell committed Feb 15, 2014
1 parent 6aa91e8 commit aff55a0
Show file tree
Hide file tree
Showing 27 changed files with 209 additions and 199 deletions.
1 change: 0 additions & 1 deletion Main/bilbau.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
14 changes: 7 additions & 7 deletions bibBuild/bilbauVariables.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand All @@ -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); //
Expand All @@ -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");
Expand Down
10 changes: 7 additions & 3 deletions construct/CylMod.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ CylMod::populate(const FuncDataBase& Control)

double R,H,T;
int M;
nLayers=Control.EvalVar<size_t>(keyName+"NLayers");
nLayers=Control.EvalVar<size_t>(keyName+"NLayers");
if (nLayers==0) nLayers=1; // Layers include midle

for(size_t i=0;i<nLayers;i++)
{
if (i)
Expand Down Expand Up @@ -280,15 +282,17 @@ CylMod::createObjects(Simulation& System)

const FuncDataBase& Control =System.getDataBase();
const int cylFlag=Control.EvalDefVar<int>(keyName+"CylFlag",0);
ELog::EM<<"cylFlag = "<<cylFlag<<ELog::endDebug;

std::string Out;
// First make conics:
int CI(modIndex+500);
HeadRule OutUnit;

for(size_t i=0;i<nConic;i++)
{
Out=ModelSupport::getComposite(SMap,modIndex,CI," -7 5 -6 -7M 1M");
System.addCell(MonteCarlo::Qhull(cellIndex++,Conics[i].getMat(),temp[0],Out));
System.addCell(MonteCarlo::Qhull(cellIndex++,
Conics[i].getMat(),temp[0],Out));
if (Conics[i].getWall()>Geometry::zeroTol)
{
Out=ModelSupport::getComposite(SMap,modIndex,CI,
Expand Down
24 changes: 14 additions & 10 deletions essBuild/SupplyPipe.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down Expand Up @@ -218,34 +220,34 @@ SupplyPipe::insertInlet(const attachSystem::FixedComp& FC,

if (!LC)
throw ColErr::CastError<void>(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);

for(size_t index=2;index<NL;index+=2)
{
PtZ=LC->getSurfacePoint(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<Radii.size();i++)
Coaxial.addRadius(Radii[i],Mat[i],Temp[i]);


return;
}

Expand All @@ -265,7 +267,9 @@ SupplyPipe::addExtraLayer(const attachSystem::LayerComp& LC,

const std::string commonStr=(commonSurf) ?
StrFunc::makeString(commonSurf) : "";
const Geometry::Vec3D PtZ=LC.getSurfacePoint(NL-1,lSideIndex);
const Geometry::Vec3D PtZ=
LC.getSurfacePoint(NL-1,lSideIndex)+
layerOffset;
Coaxial.addSurfPoint
(PtZ,LC.getLayerString(NL-1,lSideIndex),commonStr);

Expand Down
20 changes: 17 additions & 3 deletions essBuild/essVariables.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ EssVariables(FuncDataBase& Control)

Control.addVariable("LSupplyNSegIn",2);
// Central point:
Control.addVariable("LSupplyPPt0",Geometry::Vec3D(0,-4.0,0.0));
Control.addVariable("LSupplyPPt1",Geometry::Vec3D(0,-19.25,0));
Control.addVariable("LSupplyPPt0",Geometry::Vec3D(0,-1.0,5.0));
Control.addVariable("LSupplyPPt1",Geometry::Vec3D(0,-19.25,5.0));
Control.addVariable("LSupplyPPt2",Geometry::Vec3D(3.005,-19.25,64.930));

Control.addVariable("LSupplyNRadii",9);
Expand Down Expand Up @@ -334,7 +334,7 @@ EssVariables(FuncDataBase& Control)
Control.addVariable("LowModHGap6",0.2);
Control.addVariable("LowModRadGap6",0.2);
Control.addVariable("LowModMaterial6","Void");
Control.addVariable("LowModNConic",2);
Control.addVariable("LowModNConic",0);

Control.addVariable("LowModConic1Cent",Geometry::Vec3D(0,0,1));
Control.addVariable("LowModConic1Axis",Geometry::Vec3D(0,0,1));
Expand All @@ -350,6 +350,20 @@ EssVariables(FuncDataBase& Control)
Control.addVariable("LowModConic2WallMat","Aluminium");
Control.addVariable("LowModConic2Wall",0.2);

Control.addVariable("LowModConic4Cent",Geometry::Vec3D(-1,0,0));
Control.addVariable("LowModConic4Axis",Geometry::Vec3D(-1,0,0));
Control.addVariable("LowModConic4Angle",25.0);
Control.addVariable("LowModConic4Mat","Void");
Control.addVariable("LowModConic4WallMat","Aluminium");
Control.addVariable("LowModConic4Wall",0.2);

Control.addVariable("LowModConic3Cent",Geometry::Vec3D(1,0,0));
Control.addVariable("LowModConic3Axis",Geometry::Vec3D(1,0,0));
Control.addVariable("LowModConic3Angle",25.0);
Control.addVariable("LowModConic3Mat","Void");
Control.addVariable("LowModConic3WallMat","Aluminium");
Control.addVariable("LowModConic3Wall",0.2);



// FLIGHT LINE
Expand Down
1 change: 1 addition & 0 deletions essBuildInc/SupplyPipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class SupplyPipe : public attachSystem::FixedComp
std::vector<size_t> ActiveFlag; ///< Active flag

ModelSupport::PipeLine Coaxial; ///< Global outer
Geometry::Vec3D layerOffset; ///< Offset of layer
std::vector<Geometry::Vec3D> PPts; ///< Pipe points
size_t nAngle; ///< Number of angle segments

Expand Down
7 changes: 5 additions & 2 deletions getMk.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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]);
Expand Down
8 changes: 4 additions & 4 deletions monte/RuleBinary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -430,7 +429,8 @@ RuleBinary::makeEPI(std::vector<BnId>& PIform)
// Make zeroed matrix.
Geometry::MatrixBase<int>
Grid(PIform.size(),DNFobj.size()); // Map (efficient??
ELog::EM<<"Size == "<<PIform.size()<<" "<<DNFobj.size()<<ELog::endErr;

ELog::EM<<"Size == "<<PIform.size()<<" "<<DNFobj.size()<<ELog::endDiag;



Expand Down
4 changes: 2 additions & 2 deletions poly/PolyVar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
CombLayer : MNCPX Input builder
* File: poly/PolyVar.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
Expand Down
2 changes: 1 addition & 1 deletion polyInc/PolyVar.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CombLayer : MNCPX Input builder
* File: polyInc/PolyVar.h
*
*
* Copyright (c) 2004-2013 by Stuart Ansell
*
* This program is free software: you can redistribute it and/or modify
Expand Down
4 changes: 2 additions & 2 deletions process/objectRegister.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
CombLayer : MNCPX Input builder
* File: process/objectRegister.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
Expand Down
25 changes: 4 additions & 21 deletions t1Build/refPlate.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
CombLayer : MNCPX Input builder
* File: t1Build/refPlate.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
Expand Down Expand Up @@ -43,16 +43,10 @@
#include "MatrixBase.h"
#include "Matrix.h"
#include "Vec3D.h"
#include "Triple.h"
#include "NRange.h"
#include "NList.h"
#include "Quaternion.h"
#include "localRotate.h"
#include "masterRotate.h"
#include "Surface.h"
#include "surfIndex.h"
#include "surfRegister.h"
#include "surfDIter.h"
#include "Quadratic.h"
#include "Plane.h"
#include "Cylinder.h"
Expand All @@ -63,16 +57,12 @@
#include "HeadRule.h"
#include "Object.h"
#include "Qhull.h"
#include "KGroup.h"
#include "Source.h"
#include "shutterBlock.h"
#include "Simulation.h"
#include "ModelSupport.h"
#include "generateSurf.h"
#include "objectRegister.h"
#include "LinkUnit.h"
#include "FixedComp.h"
#include "LinearComp.h"
#include "ContainedComp.h"

#include "refPlate.h"
Expand Down Expand Up @@ -161,13 +151,10 @@ refPlate::setOrigin(const attachSystem::FixedComp& FC,
*/
{
ELog::RegMethod RegA("refPlate","setOrigin(FC,size_t)");
const masterRotate& MR=masterRotate::Instance();

Origin=FC.getLinkPt(Index);
Y= -FC.getLinkAxis(Index);
SN[2]= -FC.getLinkSurf(Index);
ELog::EM<<"Origin "<<Index<<" "<<SN[2]<<ELog::endDebug;
ELog::EM<<"Org == "<<MR.calcRotate(Origin)<<ELog::endDebug;

FixedComp::setLinkSurf(2,-SN[2]);
FixedComp::setConnect(2,Origin,-Y);
Expand Down Expand Up @@ -223,8 +210,7 @@ refPlate::setPlane(const std::string& dirName,
\param LIndex :: Link surface index
*/
{
ELog::RegMethod RegA("refPlate","setPlane(string,index)");

ELog::RegMethod RegA("refPlate","setPlane(string,FC)");

// Calculate the sense of the surface:
const size_t DIndex=dirType(dirName);
Expand All @@ -236,8 +222,6 @@ refPlate::setPlane(const std::string& dirName,
-FC.getLinkAxis(LIndex)*surfSwap);
FixedComp::setLinkSurf(DIndex,-SN[DIndex]);

ELog::EM<<"Surface number["<<dirName<<" == "<<SN[DIndex]<<ELog::endDebug;

planeFlag |= (DIndex) ? 2 << (DIndex-1) : 1;

return;
Expand Down Expand Up @@ -296,7 +280,7 @@ refPlate::setPlane(const std::string& dirName,
FixedComp::setConnect(DIndex,Pt-Axis*D,-Axis);
ModelSupport::buildPlane(SMap,pIndex+static_cast<int>(DIndex),
Pt-Axis*D,-Axis);
ELog::EM<<"Connect point == "<<Pt-Axis*D<<ELog::endDebug;

SN[DIndex]= -(pIndex+static_cast<int>(DIndex));
FixedComp::setLinkSurf(DIndex,pIndex+static_cast<int>(DIndex));
planeFlag |= (DIndex) ? 2 << (DIndex-1) : 1;
Expand All @@ -315,7 +299,6 @@ refPlate::createObjects(Simulation& System)
std::ostringstream cx;
for(size_t i=0;i<6;i++)
cx<<SN[i]<<" ";
ELog::EM<<"Cx -- = "<<cx.str()<<ELog::endDebug;

std::string Out=cx.str();
addOuterSurf(Out);
Expand Down
Loading

0 comments on commit aff55a0

Please sign in to comment.