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
ef0e7ebb
Commit
ef0e7ebb
authored
Apr 01, 2019
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust params in CGIonicStepper, remove rescaling of alpha_start
parent
4a664cbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
CGIonicStepper.C
src/CGIonicStepper.C
+2
-5
No files found.
src/CGIonicStepper.C
View file @
ef0e7ebb
...
...
@@ -25,7 +25,7 @@ CGIonicStepper::CGIonicStepper(Sample& s) : IonicStepper(s),
cgopt_
(
CGOptimizer
(
3
*
natoms_
))
{
cgopt_
.
set_alpha_start
(
1
.
0
);
cgopt_
.
set_alpha_max
(
5
.
0
);
cgopt_
.
set_alpha_max
(
5
0
.
0
);
cgopt_
.
set_beta_max
(
10
.
0
);
#ifdef DEBUG
if
(
s
.
ctxt_
.
onpe0
()
)
...
...
@@ -63,7 +63,7 @@ void CGIonicStepper::compute_r(double e0, const vector<vector<double> >& f0)
// check largest displacement
// max_disp: largest acceptable displacement
const
double
max_disp
=
0
.
05
;
const
double
max_disp
=
0
.
2
;
double
largest_disp
=
0
.
0
;
for
(
int
i
=
0
;
i
<
xp
.
size
();
i
++
)
largest_disp
=
max
(
largest_disp
,
fabs
(
xp
[
i
]
-
x
[
i
]));
...
...
@@ -74,9 +74,6 @@ void CGIonicStepper::compute_r(double e0, const vector<vector<double> >& f0)
// rescale displacement and reset the CG optimizer
double
fac
=
max_disp
/
largest_disp
;
xp
=
x
+
fac
*
(
xp
-
x
);
// reduce alpha starting value in CG optmizer
cgopt_
.
set_alpha_start
(
fac
*
cgopt_
.
alpha_start
());
cgopt_
.
reset
();
}
...
...
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