Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
qbox-public
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
qbox
qbox-public
Commits
7e0b69a5
Commit
7e0b69a5
authored
Jan 31, 2018
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for invalid bisection parameters
parent
5f7c1c77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
BisectionCmd.h
src/BisectionCmd.h
+20
-0
BlHF.h
src/BlHF.h
+2
-2
No files found.
src/BisectionCmd.h
View file @
7e0b69a5
...
...
@@ -65,6 +65,26 @@ class BisectionCmd : public Cmd
nLevels
[
1
]
=
atoi
(
argv
[
2
]);
nLevels
[
2
]
=
atoi
(
argv
[
3
]);
if
(
epsilon
<
0
.
0
)
{
if
(
ui
->
onpe0
()
)
{
cout
<<
" BisectionCmd: threshold must be non-negative"
<<
endl
;
}
return
1
;
}
if
(
nLevels
[
0
]
<
0
||
nLevels
[
0
]
>
5
||
nLevels
[
1
]
<
0
||
nLevels
[
1
]
>
5
||
nLevels
[
2
]
<
0
||
nLevels
[
2
]
>
5
)
{
if
(
ui
->
onpe0
()
)
{
cout
<<
" BisectionCmd: levels must be in [0,5]"
<<
endl
;
}
return
1
;
}
tm
.
reset
();
for
(
int
ispin
=
0
;
ispin
<
wf
.
nspin
();
ispin
++
)
{
...
...
src/BlHF.h
View file @
7e0b69a5
...
...
@@ -46,10 +46,10 @@ class BlHF : public Var
int
v0
=
atoi
(
argv
[
1
]);
int
v1
=
atoi
(
argv
[
2
]);
int
v2
=
atoi
(
argv
[
3
]);
if
(
v0
<
0
||
v1
<
0
||
v2
<
0
)
if
(
v0
<
0
||
v1
<
0
||
v2
<
0
||
v0
>
5
||
v1
>
5
||
v2
>
5
)
{
if
(
ui
->
onpe0
()
)
cout
<<
" blHF values must be
> 0
"
<<
endl
;
cout
<<
" blHF values must be
in [0,5]
"
<<
endl
;
return
1
;
}
...
...
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