Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
OPAL
src
Commits
45af0dbb
Commit
45af0dbb
authored
Jun 10, 2021
by
snuverink_j
Browse files
Resolve "Logical error in Boundarygeometry"
parent
28407252
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
src/Classic/AbsBeamline/ElementBase.cpp
src/Classic/AbsBeamline/ElementBase.cpp
+1
-1
src/Classic/AbsBeamline/FlexibleCollimator.cpp
src/Classic/AbsBeamline/FlexibleCollimator.cpp
+1
-1
src/OpalParser/OpalParser.cpp
src/OpalParser/OpalParser.cpp
+1
-1
src/Optimize/OpalSimulation.cpp
src/Optimize/OpalSimulation.cpp
+1
-1
src/Sample/FromFile.h
src/Sample/FromFile.h
+1
-1
src/Structure/BoundaryGeometry.cpp
src/Structure/BoundaryGeometry.cpp
+3
-3
No files found.
src/Classic/AbsBeamline/ElementBase.cpp
View file @
45af0dbb
...
@@ -420,7 +420,7 @@ void ElementBase::BoundingBox::print(std::ostream & out) const {
...
@@ -420,7 +420,7 @@ void ElementBase::BoundingBox::print(std::ostream & out) const {
std
::
vector
<
std
::
vector
<
unsigned
int
>>
paths
{{
0
,
1
,
2
,
3
},
{
0
,
1
,
7
,
6
},
{
1
,
2
,
4
,
7
},
{
2
,
3
,
5
,
4
},
{
3
,
0
,
6
,
5
},
{
4
,
5
,
6
,
7
}};
std
::
vector
<
std
::
vector
<
unsigned
int
>>
paths
{{
0
,
1
,
2
,
3
},
{
0
,
1
,
7
,
6
},
{
1
,
2
,
4
,
7
},
{
2
,
3
,
5
,
4
},
{
3
,
0
,
6
,
5
},
{
4
,
5
,
6
,
7
}};
out
<<
std
::
setprecision
(
8
);
out
<<
std
::
setprecision
(
8
);
for
(
const
std
::
vector
<
unsigned
int
>
path
:
paths
)
{
for
(
const
std
::
vector
<
unsigned
int
>
&
path
:
paths
)
{
for
(
unsigned
int
i
:
{
0
,
1
,
2
,
3
,
0
})
{
for
(
unsigned
int
i
:
{
0
,
1
,
2
,
3
,
0
})
{
const
Vector_t
&
corner
=
corners
[
path
[
i
]];
const
Vector_t
&
corner
=
corners
[
path
[
i
]];
out
<<
std
::
setw
(
16
)
<<
corner
(
0
)
out
<<
std
::
setw
(
16
)
<<
corner
(
0
)
...
...
src/Classic/AbsBeamline/FlexibleCollimator.cpp
View file @
45af0dbb
...
@@ -46,7 +46,7 @@ FlexibleCollimator::FlexibleCollimator(const FlexibleCollimator &right):
...
@@ -46,7 +46,7 @@ FlexibleCollimator::FlexibleCollimator(const FlexibleCollimator &right):
lossDs_m
(
nullptr
),
lossDs_m
(
nullptr
),
parmatint_m
(
NULL
)
parmatint_m
(
NULL
)
{
{
for
(
const
std
::
shared_ptr
<
mslang
::
Base
>
obj
:
right
.
holes_m
)
{
for
(
const
std
::
shared_ptr
<
mslang
::
Base
>
&
obj
:
right
.
holes_m
)
{
holes_m
.
emplace_back
(
obj
->
clone
());
holes_m
.
emplace_back
(
obj
->
clone
());
}
}
...
...
src/OpalParser/OpalParser.cpp
View file @
45af0dbb
...
@@ -571,7 +571,7 @@ Statement *OpalParser::readStatement(TokenStream *is) const {
...
@@ -571,7 +571,7 @@ Statement *OpalParser::readStatement(TokenStream *is) const {
stat
=
readStatement
(
is
);
stat
=
readStatement
(
is
);
}
else
if
(
token
.
isDel
(
'?'
))
{
}
else
if
(
token
.
isDel
(
'?'
))
{
// Give help.
// Give help.
*
gmsg
<<
"
\n
try typing
\"
HELP
\"
or
\"
SHOW
\"
for help.
\n
"
<<
endl
;
*
gmsg
<<
"
\n
try typing
\"
HELP
\"
for help.
\n
"
<<
endl
;
stat
=
readStatement
(
is
);
stat
=
readStatement
(
is
);
}
else
if
(
!
token
.
isEOF
())
{
}
else
if
(
!
token
.
isEOF
())
{
stat
=
new
SimpleStatement
(
token
.
getFile
(),
token
.
getLine
());
stat
=
new
SimpleStatement
(
token
.
getFile
(),
token
.
getLine
());
...
...
src/Optimize/OpalSimulation.cpp
View file @
45af0dbb
...
@@ -446,7 +446,7 @@ std::map<std::string, std::vector<double> > OpalSimulation::getData(const std::v
...
@@ -446,7 +446,7 @@ std::map<std::string, std::vector<double> > OpalSimulation::getData(const std::v
std
::
vector
<
double
>
values
;
std
::
vector
<
double
>
values
;
values
.
reserve
(
column
.
size
());
values
.
reserve
(
column
.
size
());
auto
type
=
parser
.
getColumnType
(
var
);
auto
type
=
parser
.
getColumnType
(
var
);
for
(
const
auto
val
:
column
)
{
for
(
const
auto
&
val
:
column
)
{
values
.
push_back
(
parser
.
getBoostVariantValue
<
double
>
(
val
,(
int
)
type
));
values
.
push_back
(
parser
.
getBoostVariantValue
<
double
>
(
val
,(
int
)
type
));
}
}
ret
.
insert
(
std
::
make_pair
(
var
,
values
));
ret
.
insert
(
std
::
make_pair
(
var
,
values
));
...
...
src/Sample/FromFile.h
View file @
45af0dbb
...
@@ -96,7 +96,7 @@ public:
...
@@ -96,7 +96,7 @@ public:
std
::
vector
<
std
::
string
>
dvars
({
std
::
istream_iterator
<
std
::
string
>
{
iss
},
std
::
vector
<
std
::
string
>
dvars
({
std
::
istream_iterator
<
std
::
string
>
{
iss
},
std
::
istream_iterator
<
std
::
string
>
{}});
std
::
istream_iterator
<
std
::
string
>
{}});
size_t
j
=
0
;
size_t
j
=
0
;
for
(
const
std
::
string
str
:
dvars
)
{
for
(
const
std
::
string
&
str
:
dvars
)
{
if
(
str
==
dvarName_m
)
break
;
if
(
str
==
dvarName_m
)
break
;
++
j
;
++
j
;
}
}
...
...
src/Structure/BoundaryGeometry.cpp
View file @
45af0dbb
...
@@ -595,9 +595,9 @@ static inline int
...
@@ -595,9 +595,9 @@ static inline int
SIGN3
(
SIGN3
(
Vector_t
A
Vector_t
A
)
{
)
{
return
((
A
[
0
]
<
EPS
)
?
4
:
0
|
(
A
[
0
]
>
-
EPS
)
?
32
:
0
|
return
((
(
A
[
0
]
<
EPS
)
?
4
:
0
)
|
(
(
A
[
0
]
>
-
EPS
)
?
32
:
0
)
|
(
A
[
1
]
<
EPS
)
?
2
:
0
|
(
A
[
1
]
>
-
EPS
)
?
16
:
0
|
(
(
A
[
1
]
<
EPS
)
?
2
:
0
)
|
(
(
A
[
1
]
>
-
EPS
)
?
16
:
0
)
|
(
A
[
2
]
<
EPS
)
?
1
:
0
|
(
A
[
2
]
>
-
EPS
)
?
8
:
0
);
(
(
A
[
2
]
<
EPS
)
?
1
:
0
)
|
(
(
A
[
2
]
>
-
EPS
)
?
8
:
0
)
)
;
}
}
static
int
static
int
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment