Skip to content

Commit fe44679

Browse files
authored
Combine relax_new with relax_old (#6303)
* update bfgs method * update bfgs method and modify the parameter force in relax_step to be passed by reference * update bfgs method and modify the parameter force in relax_step to be passed by reference * Introduce the differences between the two BFGS methods * Add & in relax_step input parameters * add lbfgs method * add lbfgs method * add lbfgs * lbfgs0 * addlbfgs * add lbfgs method * add lbfgs method * Refactor the code and add comments * Modify comments * remove auto * remove auto * remove auto * remove auto * remove auto * combine relax_new with relax_old * combine relax_new with relax_old
1 parent 9ac5750 commit fe44679

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+90
-104
lines changed

source/Makefile.Objects

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ VPATH=./src_global:\
6262
./module_hamilt_lcao/hamilt_lcaodft/operator_lcao:\
6363
./module_hamilt_lcao/module_gint:\
6464
./module_relax:\
65-
./module_relax/relax_old:\
66-
./module_relax/relax_new:\
6765
./module_hamilt_general/module_vdw:\
6866
./module_io:\
6967
./module_io/json_output:\
@@ -449,8 +447,8 @@ OBJS_RELAXATION=bfgs_basic.o\
449447
lattice_change_basic.o\
450448
lattice_change_cg.o\
451449
lattice_change_methods.o\
452-
relax_old.o\
453-
relax.o\
450+
relax_nsync.o\
451+
relax_sync.o\
454452
bfgs.o\
455453
lbfgs.o\
456454
matrix_methods.o\

source/module_io/input_conv.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include "module_hamilt_pw/hamilt_pwdft/global.h"
1010
#include "module_io/berryphase.h"
1111
#include "module_parameter/parameter.h"
12-
#include "module_relax/relax_old/ions_move_basic.h"
13-
#include "module_relax/relax_old/lattice_change_basic.h"
12+
#include "module_relax/ions_move_basic.h"
13+
#include "module_relax/lattice_change_basic.h"
1414

1515
#include <algorithm>
1616

source/module_io/test/for_testing_input_conv.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
#include "module_io/berryphase.h"
2121
#include "module_io/restart.h"
2222
#include "module_md/md_func.h"
23-
#include "module_relax/relax_old/bfgs_basic.h"
24-
#include "module_relax/relax_old/ions_move_basic.h"
25-
#include "module_relax/relax_old/ions_move_cg.h"
26-
#include "module_relax/relax_old/lattice_change_basic.h"
23+
#include "module_relax/bfgs_basic.h"
24+
#include "module_relax/ions_move_basic.h"
25+
#include "module_relax/ions_move_cg.h"
26+
#include "module_relax/lattice_change_basic.h"
2727
#ifdef __PEXSI
2828
#include "source_hsolver/module_pexsi/pexsi_solver.h"
2929
#endif

source/module_relax/CMakeLists.txt

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ add_library(
44

55
relax_driver.cpp
66

7-
relax_new/relax.cpp
8-
relax_new/line_search.cpp
7+
relax_sync.cpp
8+
line_search.cpp
99

10-
relax_old/bfgs.cpp
11-
relax_old/lbfgs.cpp
12-
relax_old/relax_old.cpp
13-
relax_old/bfgs_basic.cpp
14-
relax_old/ions_move_basic.cpp
15-
relax_old/ions_move_bfgs.cpp
16-
relax_old/ions_move_cg.cpp
17-
relax_old/ions_move_sd.cpp
18-
relax_old/ions_move_methods.cpp
19-
relax_old/lattice_change_basic.cpp
20-
relax_old/lattice_change_cg.cpp
21-
relax_old/lattice_change_methods.cpp
22-
relax_old/matrix_methods.cpp
10+
bfgs.cpp
11+
lbfgs.cpp
12+
relax_nsync.cpp
13+
bfgs_basic.cpp
14+
ions_move_basic.cpp
15+
ions_move_bfgs.cpp
16+
ions_move_cg.cpp
17+
ions_move_sd.cpp
18+
ions_move_methods.cpp
19+
lattice_change_basic.cpp
20+
lattice_change_cg.cpp
21+
lattice_change_methods.cpp
22+
matrix_methods.cpp
2323
)
2424

2525
if(ENABLE_COVERAGE)
@@ -28,8 +28,7 @@ endif()
2828

2929
if(BUILD_TESTING)
3030
if(ENABLE_MPI)
31-
add_subdirectory(relax_new/test)
32-
add_subdirectory(relax_old/test)
31+
add_subdirectory(test)
3332
endif()
3433

3534
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)