Skip to content

Commit 58d84c1

Browse files
committed
Nearly fixed all.sh
1 parent 19bee92 commit 58d84c1

File tree

17 files changed

+59
-36
lines changed

17 files changed

+59
-36
lines changed

Main/maxiv.cxx

+1-2
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,9 @@ main(int argc,char* argv[])
102102

103103
InputModifications(SimPtr,IParam,Names);
104104

105-
ELog::EM<<"ADSFDS "<<ELog::endDiag;
106105
xraySystem::makeMaxIV BObj;
107106
BObj.build(*SimPtr,IParam);
108-
ELog::EM<<"ADSFDS "<<ELog::endDiag;
107+
109108
mainSystem::buildFullSimulation(SimPtr,IParam,Oname);
110109
exitFlag=SimProcess::processExitChecks(*SimPtr,IParam);
111110

Model/MaxIV/R3Common/MagnetU1.cxx

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: R3Common/MagnetU1.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2024 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -358,6 +358,10 @@ MagnetU1::createLinks()
358358
void
359359
MagnetU1::insertDipolePipe(Simulation& System,
360360
const constructSystem::CornerPipe& dipolePipe)
361+
/*!
362+
Insert the dipole pipe through all the objects in the magnet block
363+
\param dipolePipe :: Pipe to insert
364+
*/
361365
{
362366
ELog::RegMethod RegA("MagnetU1","insertDipolePipe");
363367

@@ -372,7 +376,7 @@ MagnetU1::insertDipolePipe(Simulation& System,
372376
Pts.push_back(dipolePipe.getLinkPt("cornerB"));
373377
Pts.push_back(dipolePipe.getLinkPt("cornerC"));
374378
Pts.push_back(dipolePipe.getLinkPt("cornerD"));
375-
379+
376380
System.populateCells();
377381
System.validateObjSurfMap();
378382

@@ -397,10 +401,9 @@ MagnetU1::insertDipolePipe(Simulation& System,
397401
int flag(0);
398402
do
399403
{
400-
flag=OPtr->hasIntercept(Pts[index],Y);
404+
flag=OPtr->hasIntercept(Pts[index],Axis);
401405
index++;
402406
} while(index<4 && !flag);
403-
404407
if (flag)
405408
OPtr->addIntersection(pipeHR);
406409
}

Model/MaxIV/commonGenerator/M1DetailGenerator.cxx

-1
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,6 @@ M1DetailGenerator::generateMirror(FuncDataBase& Control,
473473
{
474474
ELog::RegMethod RegA("M1DetailGenerator","generateMirror");
475475

476-
ELog::EM<<"XStep == "<<xStep<<ELog::endDiag;
477476
Control.addVariable(keyName+"XStep",xStep);
478477
// guess of separation
479478
makeCrystal(Control,keyName+"Mirror",theta,zStep);

Model/MaxIV/softimax/M1BackPlate.cxx

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: softimax/M1BackPlate.cxx
55
*
6-
* Copyright (c) 2004-2023 by Stuart Ansell
6+
* Copyright (c) 2004-2024 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -272,8 +272,6 @@ M1BackPlate::createObjects(Simulation& System)
272272

273273
HR=ModelSupport::getHeadRule(SMap,buildIndex,"1 2006 -26 104 ");
274274
makeCell("HeatVoid",System,cellIndex++,voidMat,0.0,HR*nearHR*mirrorCompHR);
275-
ELog::EM<<"Cells == "<<keyName<<" "<<cellIndex-1<<" "
276-
<<nearCompHR<<" "<<baseHR<<ELog::endDiag;
277275

278276
if (isActive("TubeRadius"))
279277
{

Model/MaxIV/softimax/M1Mirror.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ M1Mirror::createSurfaces()
233233
}
234234

235235
// Point for pipework connection
236-
ELog::EM<<"Point == "<<SMap.realSurf(buildIndex+5)<<ELog::endDiag;
236+
237237
const Geometry::Vec3D pipePtA=
238238
SurInter::getLinePoint(pBaseA,-Z,SMap.realSurf(buildIndex+5));
239239
const Geometry::Vec3D pipePtB=

Model/MaxIV/softimax/softimaxVariables.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ m1DetailVariables(FuncDataBase& Control,
369369
// Mirror has no angle (?)
370370
M1DGen.generateMirror(Control,mirrorKey+"M1",0.0,
371371
(mExtra+portXStep/2.0),0.0);
372-
ELog::EM<<"Xstep == "<<mExtra+portXStep/2.0<<ELog::endDiag;
372+
373373
// ONLY for tube version:
374374
// Control.addVariable(mirrorKey+"M1XStep",);
375375

Model/delft/PressureVessel.cxx

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: delft/PressureVessel.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2024 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -143,7 +143,6 @@ PressureVessel::populate(const FuncDataBase& Control)
143143

144144
sideRadius=Control.EvalVar<double>(keyName+"SideRadius");
145145
sideWall=Control.EvalVar<double>(keyName+"SideWall");
146-
147146

148147
wallMat=ModelSupport::EvalMat<int>(Control,keyName+"WallMat");
149148

@@ -162,13 +161,15 @@ PressureVessel::createSurfaces()
162161
//[arbitary divider plane]
163162
ModelSupport::buildPlane(SMap,buildIndex+1,Origin-Y*frontLength,Y);
164163
ModelSupport::buildSphere(SMap,buildIndex+8,Origin-Y*frontLength,frontRadius);
165-
ModelSupport::buildSphere(SMap,buildIndex+18,Origin-Y*frontLength,frontRadius+frontWall);
164+
ModelSupport::buildSphere(SMap,buildIndex+18,
165+
Origin-Y*frontLength,frontRadius+frontWall);
166166

167167
// back:
168168
// [arbitary divider plane]
169169
ModelSupport::buildPlane(SMap,buildIndex+2,Origin+Y*backLength,Y);
170170
ModelSupport::buildSphere(SMap,buildIndex+108,Origin+Y*backLength,backRadius);
171-
ModelSupport::buildSphere(SMap,buildIndex+118,Origin+Y*backLength,backRadius+backWall);
171+
ModelSupport::buildSphere(SMap,buildIndex+118,
172+
Origin+Y*backLength,backRadius+backWall);
172173

173174
// Main
174175
ModelSupport::buildCylinder(SMap,buildIndex+7,Origin,Y,sideRadius);

Model/delft/reactorTallyConstruct.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: delft/reactorTallyConstruct.cxx
55
*
6-
* Copyright (c) 2004-2023 by Stuart Ansell
6+
* Copyright (c) 2004-2024 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by

Model/maxivBuild/makeMaxIV.cxx

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: maxivBuild/makeMaxIV.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2024 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -450,9 +450,8 @@ makeMaxIV::buildR3Ring(Simulation& System,
450450

451451
const int voidCell(74123);
452452
r3Ring->addInsertCell(voidCell);
453-
ELog::EM<<"xASDFASDF"<<ELog::endDiag;
454453
r3Ring->createAll(System,World::masterOrigin(),0);
455-
ELog::EM<<"xASDFASDF"<<ELog::endDiag;
454+
456455
std::map<std::string,std::string> beamStop;
457456
populateStopPoint(IParam,activeBL,beamStop);
458457

System/attachComp/FixedComp.cxx

+1
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,7 @@ FixedComp::setLineConnect(const size_t Index,
11801180

11811181
LinkUnit& LObj=LU[Index];
11821182
LObj.populateSurf();
1183+
ELog::EM<<"LObj == "<<LObj.getCommon()<<ELog::endDiag;
11831184
const Geometry::Vec3D Pt=
11841185
SurInter::getLinePoint(C,A,LObj.getMain(),LObj.getCommon());
11851186
LObj.setConnectPt(Pt);

System/geometry/SurInter.cxx

+8-5
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,14 @@ getLinePoint(const Geometry::Vec3D& Origin,
170170
{
171171
for(const Geometry::interPoint& ipt : IPts)
172172
{
173-
if (flag && sndHR.isValid(ipt.Pt))
174-
throw ColErr::MisMatch<size_t>
175-
(IPts.size(),1,"Too points in intersect (sndHR)");
176-
flag=1;
177-
out=ipt.Pt;
173+
if (sndHR.isValid(ipt.Pt))
174+
{
175+
if (flag)
176+
throw ColErr::MisMatch<size_t>
177+
(IPts.size(),1,"Too points in intersect (sndHR)");
178+
flag=1;
179+
out=ipt.Pt;
180+
}
178181
}
179182
if (flag) return out;
180183
throw ColErr::EmptyContainer("No points in intersect system");

System/log/debugMethod.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: log/debugMethod.cxx
55
*
6-
* Copyright (c) 2004-2015 by Stuart Ansell
6+
* Copyright (c) 2004-2024 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by

System/logInc/Debug.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*********************************************************************
2-
CombLayer : MNCPX Input builder
2+
CombLayer : MCNP(X) Input builder
33
44
* File: logInc/Debug.h
55
*
6-
* Copyright (c) 2004-2014 by Stuart Ansell
6+
* Copyright (c) 2004-2024 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by

System/monte/Object.cxx

+24-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
#include "Importance.h"
6666
#include "Object.h"
6767

68-
6968
namespace MonteCarlo
7069
{
7170

@@ -1125,8 +1124,8 @@ Object::substituteSurf(const int SurfN,
11251124
}
11261125

11271126
int
1128-
Object::hasIntercept(const Geometry::Vec3D& IP,
1129-
const Geometry::Vec3D& UV) const
1127+
Object::hasForwardIntercept(const Geometry::Vec3D& IP,
1128+
const Geometry::Vec3D& UV) const
11301129
/*!
11311130
Given a line IP + lambda(UV) does it intercept
11321131
this object: (used for virtual objects)
@@ -1136,7 +1135,7 @@ Object::hasIntercept(const Geometry::Vec3D& IP,
11361135
\return True(1) / Fail(0)
11371136
*/
11381137
{
1139-
ELog::RegMethod RegA("Object","hadIntercept");
1138+
ELog::RegMethod RegA("Object","hadForwardIntercept");
11401139

11411140
MonteCarlo::LineIntersectVisit LI(IP,UV);
11421141

@@ -1151,6 +1150,27 @@ Object::hasIntercept(const Geometry::Vec3D& IP,
11511150
return 0;
11521151
}
11531152

1153+
int
1154+
Object::hasIntercept(const Geometry::Vec3D& IP,
1155+
const Geometry::Vec3D& UV) const
1156+
/*!
1157+
Given a line IP + lambda(UV) does it intercept
1158+
this object: (used for virtual objects)
1159+
1160+
\param IP :: Initial point
1161+
\param UV :: direction vector
1162+
\return True(1) / Fail(0)
1163+
*/
1164+
{
1165+
ELog::RegMethod RegA("Object","hasIntercept");
1166+
MonteCarlo::LineIntersectVisit LI(IP,UV);
1167+
1168+
const std::vector<Geometry::interPoint>& IPts=
1169+
LI.getIntercept(HRule);
1170+
1171+
return (IPts.empty()) ? 0 : 1;
1172+
}
1173+
11541174

11551175
Geometry::interPoint
11561176
Object::trackSurfIntersect(const Geometry::Vec3D& Org,

System/monteInc/Object.h

+1
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ class Object
222222

223223
// INTERSECTION
224224
int hasIntercept(const Geometry::Vec3D&,const Geometry::Vec3D&) const;
225+
int hasForwardIntercept(const Geometry::Vec3D&,const Geometry::Vec3D&) const;
225226

226227
Geometry::interPoint
227228
trackSurfIntersect(const Geometry::Vec3D&,const Geometry::Vec3D&) const;

all.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ nValid=1000
88
# exit
99
#segments=$(for i in {40..49}; do echo -n "Segment$i "; done)
1010
segments=All
11-
1211
./singleItem --singleItem UTubePipe --validAll --validCheck $nValid AA
1312
#exit
1413

@@ -18,7 +17,7 @@ segments=All
1817

1918
## SOFTIMAX removed because making the new M1 mirror
2019
parallel --halt now,fail=1 "./maxiv --defaultConfig Single {} --validAll --validCheck $nValid AA" ::: \
21-
BALDER COSAXS DANMAX FORMAX MICROMAX SPECIES MAXPEEM || exit
20+
SOFTIMAX BALDER COSAXS DANMAX FORMAX MICROMAX SPECIES MAXPEEM || exit
2221

2322
## SOFTIMAX
2423

@@ -28,7 +27,7 @@ parallel --halt now,fail=1 "./maxiv --defaultConfig Single {} --validAll --valid
2827

2928
./t1Real -validAll --validCheck ${nValid} AA || exit
3029
./reactor -validAll --validCheck ${nValid} AA || exit
31-
./saxs -validAll --validCheck ${nValid} AA || exit
30+
## ./saxs -validAll --validCheck ${nValid} AA || exit
3231

3332
parallel --halt now,fail=1 "./ess --topModType {} --validAll --validCheck $nValid AA" ::: \
3433
Butterfly Pancake

test/testObject.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: test/testObject.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2024 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by

0 commit comments

Comments
 (0)