diff --git a/source/Makefile.Objects b/source/Makefile.Objects index 41bea656b7..d58f43f895 100644 --- a/source/Makefile.Objects +++ b/source/Makefile.Objects @@ -62,8 +62,6 @@ VPATH=./src_global:\ ./module_hamilt_lcao/hamilt_lcaodft/operator_lcao:\ ./module_hamilt_lcao/module_gint:\ ./module_relax:\ -./module_relax/relax_old:\ -./module_relax/relax_new:\ ./module_hamilt_general/module_vdw:\ ./module_io:\ ./module_io/json_output:\ @@ -449,8 +447,8 @@ OBJS_RELAXATION=bfgs_basic.o\ lattice_change_basic.o\ lattice_change_cg.o\ lattice_change_methods.o\ - relax_old.o\ - relax.o\ + relax_nsync.o\ + relax_sync.o\ bfgs.o\ lbfgs.o\ matrix_methods.o\ diff --git a/source/module_io/input_conv.cpp b/source/module_io/input_conv.cpp index 32c4b30885..1ccaaf8f2b 100644 --- a/source/module_io/input_conv.cpp +++ b/source/module_io/input_conv.cpp @@ -9,8 +9,8 @@ #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/berryphase.h" #include "module_parameter/parameter.h" -#include "module_relax/relax_old/ions_move_basic.h" -#include "module_relax/relax_old/lattice_change_basic.h" +#include "module_relax/ions_move_basic.h" +#include "module_relax/lattice_change_basic.h" #include diff --git a/source/module_io/test/for_testing_input_conv.h b/source/module_io/test/for_testing_input_conv.h index 2b645f9a8e..b5c474f65b 100644 --- a/source/module_io/test/for_testing_input_conv.h +++ b/source/module_io/test/for_testing_input_conv.h @@ -20,10 +20,10 @@ #include "module_io/berryphase.h" #include "module_io/restart.h" #include "module_md/md_func.h" -#include "module_relax/relax_old/bfgs_basic.h" -#include "module_relax/relax_old/ions_move_basic.h" -#include "module_relax/relax_old/ions_move_cg.h" -#include "module_relax/relax_old/lattice_change_basic.h" +#include "module_relax/bfgs_basic.h" +#include "module_relax/ions_move_basic.h" +#include "module_relax/ions_move_cg.h" +#include "module_relax/lattice_change_basic.h" #ifdef __PEXSI #include "source_hsolver/module_pexsi/pexsi_solver.h" #endif diff --git a/source/module_relax/CMakeLists.txt b/source/module_relax/CMakeLists.txt index 39e184c422..30415edd3b 100644 --- a/source/module_relax/CMakeLists.txt +++ b/source/module_relax/CMakeLists.txt @@ -4,22 +4,22 @@ add_library( relax_driver.cpp - relax_new/relax.cpp - relax_new/line_search.cpp + relax_sync.cpp + line_search.cpp - relax_old/bfgs.cpp - relax_old/lbfgs.cpp - relax_old/relax_old.cpp - relax_old/bfgs_basic.cpp - relax_old/ions_move_basic.cpp - relax_old/ions_move_bfgs.cpp - relax_old/ions_move_cg.cpp - relax_old/ions_move_sd.cpp - relax_old/ions_move_methods.cpp - relax_old/lattice_change_basic.cpp - relax_old/lattice_change_cg.cpp - relax_old/lattice_change_methods.cpp - relax_old/matrix_methods.cpp + bfgs.cpp + lbfgs.cpp + relax_nsync.cpp + bfgs_basic.cpp + ions_move_basic.cpp + ions_move_bfgs.cpp + ions_move_cg.cpp + ions_move_sd.cpp + ions_move_methods.cpp + lattice_change_basic.cpp + lattice_change_cg.cpp + lattice_change_methods.cpp + matrix_methods.cpp ) if(ENABLE_COVERAGE) @@ -28,8 +28,7 @@ endif() if(BUILD_TESTING) if(ENABLE_MPI) - add_subdirectory(relax_new/test) - add_subdirectory(relax_old/test) + add_subdirectory(test) endif() endif() diff --git a/source/module_relax/relax_old/bfgs.cpp b/source/module_relax/bfgs.cpp similarity index 100% rename from source/module_relax/relax_old/bfgs.cpp rename to source/module_relax/bfgs.cpp diff --git a/source/module_relax/relax_old/bfgs.h b/source/module_relax/bfgs.h similarity index 100% rename from source/module_relax/relax_old/bfgs.h rename to source/module_relax/bfgs.h diff --git a/source/module_relax/relax_old/bfgs_basic.cpp b/source/module_relax/bfgs_basic.cpp similarity index 100% rename from source/module_relax/relax_old/bfgs_basic.cpp rename to source/module_relax/bfgs_basic.cpp diff --git a/source/module_relax/relax_old/bfgs_basic.h b/source/module_relax/bfgs_basic.h similarity index 100% rename from source/module_relax/relax_old/bfgs_basic.h rename to source/module_relax/bfgs_basic.h diff --git a/source/module_relax/relax_old/ions_move_basic.cpp b/source/module_relax/ions_move_basic.cpp similarity index 100% rename from source/module_relax/relax_old/ions_move_basic.cpp rename to source/module_relax/ions_move_basic.cpp diff --git a/source/module_relax/relax_old/ions_move_basic.h b/source/module_relax/ions_move_basic.h similarity index 100% rename from source/module_relax/relax_old/ions_move_basic.h rename to source/module_relax/ions_move_basic.h diff --git a/source/module_relax/relax_old/ions_move_bfgs.cpp b/source/module_relax/ions_move_bfgs.cpp similarity index 100% rename from source/module_relax/relax_old/ions_move_bfgs.cpp rename to source/module_relax/ions_move_bfgs.cpp diff --git a/source/module_relax/relax_old/ions_move_bfgs.h b/source/module_relax/ions_move_bfgs.h similarity index 100% rename from source/module_relax/relax_old/ions_move_bfgs.h rename to source/module_relax/ions_move_bfgs.h diff --git a/source/module_relax/relax_old/ions_move_cg.cpp b/source/module_relax/ions_move_cg.cpp similarity index 100% rename from source/module_relax/relax_old/ions_move_cg.cpp rename to source/module_relax/ions_move_cg.cpp diff --git a/source/module_relax/relax_old/ions_move_cg.h b/source/module_relax/ions_move_cg.h similarity index 100% rename from source/module_relax/relax_old/ions_move_cg.h rename to source/module_relax/ions_move_cg.h diff --git a/source/module_relax/relax_old/ions_move_methods.cpp b/source/module_relax/ions_move_methods.cpp similarity index 93% rename from source/module_relax/relax_old/ions_move_methods.cpp rename to source/module_relax/ions_move_methods.cpp index 2565a305d4..ddb25a59c0 100644 --- a/source/module_relax/relax_old/ions_move_methods.cpp +++ b/source/module_relax/ions_move_methods.cpp @@ -53,8 +53,7 @@ void Ions_Move_Methods::cal_movement(const int &istep, const int &force_step, const ModuleBase::matrix &f, const double &etot, - UnitCell &ucell, - ModuleESolver::ESolver* p_esolver) + UnitCell &ucell) { ModuleBase::TITLE("Ions_Move_Methods", "init"); @@ -86,7 +85,7 @@ void Ions_Move_Methods::cal_movement(const int &istep, } else if(Ions_Move_Basic::relax_method == "lbfgs") { - lbfgs.relax_step(f,ucell,etot,p_esolver); + lbfgs.relax_step(f,ucell,etot); } else { diff --git a/source/module_relax/relax_old/ions_move_methods.h b/source/module_relax/ions_move_methods.h similarity index 92% rename from source/module_relax/relax_old/ions_move_methods.h rename to source/module_relax/ions_move_methods.h index dfe53b0baf..746b5ed000 100644 --- a/source/module_relax/relax_old/ions_move_methods.h +++ b/source/module_relax/ions_move_methods.h @@ -22,8 +22,7 @@ class Ions_Move_Methods const int &force_step, const ModuleBase::matrix &f, const double &etot, - UnitCell &ucell, - ModuleESolver::ESolver* p_esolver); + UnitCell &ucell); bool get_converged() const { diff --git a/source/module_relax/relax_old/ions_move_sd.cpp b/source/module_relax/ions_move_sd.cpp similarity index 100% rename from source/module_relax/relax_old/ions_move_sd.cpp rename to source/module_relax/ions_move_sd.cpp diff --git a/source/module_relax/relax_old/ions_move_sd.h b/source/module_relax/ions_move_sd.h similarity index 100% rename from source/module_relax/relax_old/ions_move_sd.h rename to source/module_relax/ions_move_sd.h diff --git a/source/module_relax/relax_old/lattice_change_basic.cpp b/source/module_relax/lattice_change_basic.cpp similarity index 100% rename from source/module_relax/relax_old/lattice_change_basic.cpp rename to source/module_relax/lattice_change_basic.cpp diff --git a/source/module_relax/relax_old/lattice_change_basic.h b/source/module_relax/lattice_change_basic.h similarity index 100% rename from source/module_relax/relax_old/lattice_change_basic.h rename to source/module_relax/lattice_change_basic.h diff --git a/source/module_relax/relax_old/lattice_change_cg.cpp b/source/module_relax/lattice_change_cg.cpp similarity index 100% rename from source/module_relax/relax_old/lattice_change_cg.cpp rename to source/module_relax/lattice_change_cg.cpp diff --git a/source/module_relax/relax_old/lattice_change_cg.h b/source/module_relax/lattice_change_cg.h similarity index 100% rename from source/module_relax/relax_old/lattice_change_cg.h rename to source/module_relax/lattice_change_cg.h diff --git a/source/module_relax/relax_old/lattice_change_methods.cpp b/source/module_relax/lattice_change_methods.cpp similarity index 100% rename from source/module_relax/relax_old/lattice_change_methods.cpp rename to source/module_relax/lattice_change_methods.cpp diff --git a/source/module_relax/relax_old/lattice_change_methods.h b/source/module_relax/lattice_change_methods.h similarity index 100% rename from source/module_relax/relax_old/lattice_change_methods.h rename to source/module_relax/lattice_change_methods.h diff --git a/source/module_relax/relax_old/lbfgs.cpp b/source/module_relax/lbfgs.cpp similarity index 99% rename from source/module_relax/relax_old/lbfgs.cpp rename to source/module_relax/lbfgs.cpp index f90870aae3..b88c13e333 100644 --- a/source/module_relax/relax_old/lbfgs.cpp +++ b/source/module_relax/lbfgs.cpp @@ -25,12 +25,12 @@ void LBFGS::allocate(const int _size) // initialize H0、H、pos0、force0、for //l_search.init_line_search(); } -void LBFGS::relax_step(const ModuleBase::matrix _force,UnitCell& ucell,const double &etot,ModuleESolver::ESolver* p_esolver) +void LBFGS::relax_step(const ModuleBase::matrix _force,UnitCell& ucell,const double &etot) { get_pos(ucell,pos); get_pos_taud(ucell,pos_taud); - solver=p_esolver; + //solver=p_esolver; ucell.ionic_position_updated = true; for(int i = 0; i < _force.nr; i++) { diff --git a/source/module_relax/relax_old/lbfgs.h b/source/module_relax/lbfgs.h similarity index 98% rename from source/module_relax/relax_old/lbfgs.h rename to source/module_relax/lbfgs.h index aa67ceed9d..7295eb42e3 100644 --- a/source/module_relax/relax_old/lbfgs.h +++ b/source/module_relax/lbfgs.h @@ -36,8 +36,7 @@ class LBFGS */ void relax_step(const ModuleBase::matrix _force, UnitCell& ucell, - const double &etot, - ModuleESolver::ESolver* p_esolver); + const double &etot); private: //LineSearch l_search; diff --git a/source/module_relax/relax_new/line_search.cpp b/source/module_relax/line_search.cpp similarity index 100% rename from source/module_relax/relax_new/line_search.cpp rename to source/module_relax/line_search.cpp diff --git a/source/module_relax/relax_new/line_search.h b/source/module_relax/line_search.h similarity index 100% rename from source/module_relax/relax_new/line_search.h rename to source/module_relax/line_search.h diff --git a/source/module_relax/relax_old/matrix_methods.cpp b/source/module_relax/matrix_methods.cpp similarity index 100% rename from source/module_relax/relax_old/matrix_methods.cpp rename to source/module_relax/matrix_methods.cpp diff --git a/source/module_relax/relax_old/matrix_methods.h b/source/module_relax/matrix_methods.h similarity index 100% rename from source/module_relax/relax_old/matrix_methods.h rename to source/module_relax/matrix_methods.h diff --git a/source/module_relax/relax_driver.cpp b/source/module_relax/relax_driver.cpp index ec7500d921..2a584cdf64 100644 --- a/source/module_relax/relax_driver.cpp +++ b/source/module_relax/relax_driver.cpp @@ -88,8 +88,7 @@ void Relax_Driver::relax_driver(ModuleESolver::ESolver* p_esolver, UnitCell& uce force, stress, force_step, - stress_step, - p_esolver); // pengfei Li 2018-05-14 + stress_step); // pengfei Li 2018-05-14 } // print structure // changelog 20240509 diff --git a/source/module_relax/relax_driver.h b/source/module_relax/relax_driver.h index 4f0be861f0..bbbf11808c 100644 --- a/source/module_relax/relax_driver.h +++ b/source/module_relax/relax_driver.h @@ -4,9 +4,9 @@ #include "module_cell/unitcell.h" #include "source_esolver/esolver.h" #include "source_esolver/esolver_ks.h" -#include "relax_new/relax.h" -#include "relax_old/relax_old.h" -#include "relax_old/bfgs.h" +#include "relax_sync.h" +#include "relax_nsync.h" +#include "bfgs.h" class Relax_Driver { diff --git a/source/module_relax/relax_new/test/CMakeLists.txt b/source/module_relax/relax_new/test/CMakeLists.txt deleted file mode 100644 index f4e0ee1fba..0000000000 --- a/source/module_relax/relax_new/test/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -remove_definitions(-D__MPI) -remove_definitions(-D__LCAO) -remove_definitions(-D__MLALGO) -remove_definitions(-D__CUDA) -remove_definitions(-D__ROCM) - -install(DIRECTORY support DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - -AddTest( - TARGET relax_new_line_search - LIBS parameter - SOURCES line_search_test.cpp ../line_search.cpp ../../../module_base/global_variable.cpp ../../../module_base/global_file.cpp ../../../module_base/global_function.cpp ../../../module_base/memory.cpp ../../../module_base/timer.cpp ../../../module_base/tool_quit.cpp -) - -AddTest( - TARGET relax_new_relax - SOURCES relax_test.cpp ../relax.cpp ../line_search.cpp ../../../module_base/tool_quit.cpp ../../../module_base/global_variable.cpp ../../../module_base/global_file.cpp ../../../module_base/memory.cpp ../../../module_base/timer.cpp - ../../../module_base/matrix3.cpp ../../../module_base/intarray.cpp ../../../module_base/tool_title.cpp - ../../../module_base/global_function.cpp ../../../module_base/complexmatrix.cpp ../../../module_base/matrix.cpp - ../../../module_base/complexarray.cpp ../../../module_base/tool_quit.cpp ../../../module_base/realarray.cpp - ../../../module_base/blas_connector_base.cpp ../../../module_base/blas_connector_vector.cpp ../../../module_base/blas_connector_matrix.cpp - ../../../module_cell/update_cell.cpp ../../../module_cell/print_cell.cpp ../../../module_cell/bcast_cell.cpp ../../../module_io/output.cpp - LIBS parameter ${math_libs} -) - diff --git a/source/module_relax/relax_old/relax_old.cpp b/source/module_relax/relax_nsync.cpp similarity index 94% rename from source/module_relax/relax_old/relax_old.cpp rename to source/module_relax/relax_nsync.cpp index 03acac116b..7b401bc9f3 100644 --- a/source/module_relax/relax_old/relax_old.cpp +++ b/source/module_relax/relax_nsync.cpp @@ -1,4 +1,4 @@ -#include "relax_old.h" +#include "relax_nsync.h" #include "module_base/global_function.h" #include "module_base/global_variable.h" @@ -28,8 +28,7 @@ bool Relax_old::relax_step(const int& istep, ModuleBase::matrix force, ModuleBase::matrix stress, int& force_step, - int& stress_step, - ModuleESolver::ESolver* p_esolver) + int& stress_step) { ModuleBase::TITLE("Relax_old", "relax_step"); @@ -50,7 +49,7 @@ bool Relax_old::relax_step(const int& istep, { // do relax calculation and generate next structure bool converged = false; - converged = this->do_relax(istep, force, energy, ucell, force_step,p_esolver); + converged = this->do_relax(istep, force, energy, ucell, force_step); if (!converged) { ucell.ionic_position_updated = true; @@ -130,11 +129,10 @@ bool Relax_old::do_relax(const int& istep, const ModuleBase::matrix& ionic_force, const double& total_energy, UnitCell& ucell, - int& jstep, - ModuleESolver::ESolver* p_esolver) + int& jstep) { ModuleBase::TITLE("Relax_old", "do_relax"); - IMM.cal_movement(istep, jstep, ionic_force, total_energy, ucell,p_esolver); + IMM.cal_movement(istep, jstep, ionic_force, total_energy, ucell); ++jstep; return IMM.get_converged(); } diff --git a/source/module_relax/relax_old/relax_old.h b/source/module_relax/relax_nsync.h similarity index 86% rename from source/module_relax/relax_old/relax_old.h rename to source/module_relax/relax_nsync.h index b7aadce5a5..af75bf782b 100644 --- a/source/module_relax/relax_old/relax_old.h +++ b/source/module_relax/relax_nsync.h @@ -17,8 +17,7 @@ class Relax_old ModuleBase::matrix force, ModuleBase::matrix stress, int& force_step, - int& stress_step, - ModuleESolver::ESolver* p_esolver); + int& stress_step); private: Ions_Move_Methods IMM; @@ -31,8 +30,7 @@ class Relax_old const ModuleBase::matrix& ionic_force, const double& total_energy, UnitCell& ucell, - int& jstep, - ModuleESolver::ESolver* p_esolver); + int& jstep); bool do_cellrelax(const int& istep, const int& stress_step, const ModuleBase::matrix& stress, diff --git a/source/module_relax/relax_new/relax.cpp b/source/module_relax/relax_sync.cpp similarity index 99% rename from source/module_relax/relax_new/relax.cpp rename to source/module_relax/relax_sync.cpp index 5e563322d9..0e42c746c0 100644 --- a/source/module_relax/relax_new/relax.cpp +++ b/source/module_relax/relax_sync.cpp @@ -1,4 +1,4 @@ -#include "relax.h" +#include "relax_sync.h" #include "module_base/matrix3.h" @@ -8,7 +8,7 @@ #include "module_cell/print_cell.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_parameter/parameter.h" -#include "module_relax/relax_old/ions_move_basic.h" +#include "module_relax/ions_move_basic.h" #include diff --git a/source/module_relax/relax_new/relax.h b/source/module_relax/relax_sync.h similarity index 100% rename from source/module_relax/relax_new/relax.h rename to source/module_relax/relax_sync.h diff --git a/source/module_relax/relax_old/test/CMakeLists.txt b/source/module_relax/test/CMakeLists.txt similarity index 52% rename from source/module_relax/relax_old/test/CMakeLists.txt rename to source/module_relax/test/CMakeLists.txt index d502002b5b..8948fe20e8 100644 --- a/source/module_relax/relax_old/test/CMakeLists.txt +++ b/source/module_relax/test/CMakeLists.txt @@ -1,11 +1,33 @@ remove_definitions(-D__MPI) remove_definitions(-D__LCAO) +remove_definitions(-D__MLALGO) +remove_definitions(-D__CUDA) +remove_definitions(-D__ROCM) + +install(DIRECTORY support DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + +AddTest( + TARGET relax_new_line_search + LIBS parameter + SOURCES line_search_test.cpp ../line_search.cpp ../../module_base/global_variable.cpp ../../module_base/global_file.cpp ../../module_base/global_function.cpp ../../module_base/memory.cpp ../../module_base/timer.cpp ../../module_base/tool_quit.cpp +) + +AddTest( + TARGET relax_new_relax + SOURCES relax_test.cpp ../relax_sync.cpp ../line_search.cpp ../../module_base/tool_quit.cpp ../../module_base/global_variable.cpp ../../module_base/global_file.cpp ../../module_base/memory.cpp ../../module_base/timer.cpp + ../../module_base/matrix3.cpp ../../module_base/intarray.cpp ../../module_base/tool_title.cpp + ../../module_base/global_function.cpp ../../module_base/complexmatrix.cpp ../../module_base/matrix.cpp + ../../module_base/complexarray.cpp ../../module_base/tool_quit.cpp ../../module_base/realarray.cpp + ../../module_base/blas_connector_base.cpp ../../module_base/blas_connector_vector.cpp ../../module_base/blas_connector_matrix.cpp + ../../module_cell/update_cell.cpp ../../module_cell/print_cell.cpp ../../module_cell/bcast_cell.cpp ../../module_io/output.cpp + LIBS parameter ${math_libs} +) list(APPEND cell_source_files - ../../../module_cell/update_cell.cpp - ../../../module_cell/bcast_cell.cpp - ../../../module_cell/print_cell.cpp - ../../../module_io/output.cpp + ../../module_cell/update_cell.cpp + ../../module_cell/bcast_cell.cpp + ../../module_cell/print_cell.cpp + ../../module_io/output.cpp ) AddTest( TARGET lattice_change_methods_test @@ -25,7 +47,7 @@ AddTest( SOURCES lattice_change_cg_test.cpp ../lattice_change_cg.cpp ../lattice_change_basic.cpp - ../../../module_io/orb_io.cpp + ../../module_io/orb_io.cpp ) AddTest( @@ -54,7 +76,7 @@ AddTest( ../ions_move_bfgs.cpp ../ions_move_basic.cpp ../bfgs_basic.cpp - ../../../module_io/orb_io.cpp + ../../module_io/orb_io.cpp ${cell_source_files} ) @@ -64,7 +86,7 @@ AddTest( SOURCES ions_move_cg_test.cpp ../ions_move_cg.cpp ../ions_move_basic.cpp - ../../../module_io/orb_io.cpp + ../../module_io/orb_io.cpp ${cell_source_files} ) diff --git a/source/module_relax/relax_old/test/bfgs_basic_test.cpp b/source/module_relax/test/bfgs_basic_test.cpp similarity index 99% rename from source/module_relax/relax_old/test/bfgs_basic_test.cpp rename to source/module_relax/test/bfgs_basic_test.cpp index 7c25af13d8..14516a38c2 100644 --- a/source/module_relax/relax_old/test/bfgs_basic_test.cpp +++ b/source/module_relax/test/bfgs_basic_test.cpp @@ -1,4 +1,4 @@ -#include "module_relax/relax_old/ions_move_basic.h" +#include "module_relax/ions_move_basic.h" #include "gmock/gmock.h" #define private public #include "module_parameter/parameter.h" @@ -6,7 +6,7 @@ #include "gtest/gtest.h" #define private public #define protected public -#include "module_relax/relax_old/bfgs_basic.h" +#include "module_relax/bfgs_basic.h" #undef private #undef protected /************************************************ diff --git a/source/module_relax/relax_old/test/bfgs_test.cpp b/source/module_relax/test/bfgs_test.cpp similarity index 93% rename from source/module_relax/relax_old/test/bfgs_test.cpp rename to source/module_relax/test/bfgs_test.cpp index 397c2daf1d..bc06ed4bdf 100644 --- a/source/module_relax/relax_old/test/bfgs_test.cpp +++ b/source/module_relax/test/bfgs_test.cpp @@ -1,10 +1,10 @@ #include #include "for_test.h" -#include "module_relax/relax_old/bfgs.h" +#include "module_relax/bfgs.h" #include "module_cell/unitcell.h" #include "module_base/matrix.h" -#include "module_relax/relax_old/ions_move_basic.h" -#include "module_relax/relax_old/matrix_methods.h" +#include "module_relax/ions_move_basic.h" +#include "module_relax/matrix_methods.h" class BFGSTest : public ::testing::Test { protected: diff --git a/source/module_relax/relax_old/test/for_test.h b/source/module_relax/test/for_test.h similarity index 100% rename from source/module_relax/relax_old/test/for_test.h rename to source/module_relax/test/for_test.h diff --git a/source/module_relax/relax_old/test/ions_move_basic_test.cpp b/source/module_relax/test/ions_move_basic_test.cpp similarity index 99% rename from source/module_relax/relax_old/test/ions_move_basic_test.cpp rename to source/module_relax/test/ions_move_basic_test.cpp index 9d8edfa16e..193b1592e6 100644 --- a/source/module_relax/relax_old/test/ions_move_basic_test.cpp +++ b/source/module_relax/test/ions_move_basic_test.cpp @@ -3,7 +3,7 @@ #define private public #include "module_parameter/parameter.h" #undef private -#include "module_relax/relax_old/ions_move_basic.h" +#include "module_relax/ions_move_basic.h" #include "for_test.h" /************************************************ diff --git a/source/module_relax/relax_old/test/ions_move_bfgs_test.cpp b/source/module_relax/test/ions_move_bfgs_test.cpp similarity index 99% rename from source/module_relax/relax_old/test/ions_move_bfgs_test.cpp rename to source/module_relax/test/ions_move_bfgs_test.cpp index c5c7b88fb1..edca9df920 100644 --- a/source/module_relax/relax_old/test/ions_move_bfgs_test.cpp +++ b/source/module_relax/test/ions_move_bfgs_test.cpp @@ -4,8 +4,8 @@ #define private public #define protected public #include "module_parameter/parameter.h" -#include "module_relax/relax_old/ions_move_basic.h" -#include "module_relax/relax_old/ions_move_bfgs.h" +#include "module_relax/ions_move_basic.h" +#include "module_relax/ions_move_bfgs.h" #undef private #undef protected /************************************************ diff --git a/source/module_relax/relax_old/test/ions_move_cg_test.cpp b/source/module_relax/test/ions_move_cg_test.cpp similarity index 99% rename from source/module_relax/relax_old/test/ions_move_cg_test.cpp rename to source/module_relax/test/ions_move_cg_test.cpp index 8091a1ff27..40c0370bd6 100644 --- a/source/module_relax/relax_old/test/ions_move_cg_test.cpp +++ b/source/module_relax/test/ions_move_cg_test.cpp @@ -4,8 +4,8 @@ #include "gmock/gmock.h" #define private public #include "module_parameter/parameter.h" -#include "module_relax/relax_old/ions_move_basic.h" -#include "module_relax/relax_old/ions_move_cg.h" +#include "module_relax/ions_move_basic.h" +#include "module_relax/ions_move_cg.h" #undef private /************************************************ * unit tests of class Ions_Move_CG diff --git a/source/module_relax/relax_old/test/ions_move_methods_test.cpp b/source/module_relax/test/ions_move_methods_test.cpp similarity index 98% rename from source/module_relax/relax_old/test/ions_move_methods_test.cpp rename to source/module_relax/test/ions_move_methods_test.cpp index 96e448a4f0..a801412344 100644 --- a/source/module_relax/relax_old/test/ions_move_methods_test.cpp +++ b/source/module_relax/test/ions_move_methods_test.cpp @@ -2,7 +2,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #define private public -#include "module_relax/relax_old/ions_move_methods.h" +#include "module_relax/ions_move_methods.h" #undef private /************************************************ * unit tests of class Ions_Move_Methods diff --git a/source/module_relax/relax_old/test/ions_move_sd_test.cpp b/source/module_relax/test/ions_move_sd_test.cpp similarity index 98% rename from source/module_relax/relax_old/test/ions_move_sd_test.cpp rename to source/module_relax/test/ions_move_sd_test.cpp index 992c767921..95bc678055 100644 --- a/source/module_relax/relax_old/test/ions_move_sd_test.cpp +++ b/source/module_relax/test/ions_move_sd_test.cpp @@ -4,8 +4,8 @@ #include "gtest/gtest.h" #define private public #include "module_parameter/parameter.h" -#include "module_relax/relax_old/ions_move_basic.h" -#include "module_relax/relax_old/ions_move_sd.h" +#include "module_relax/ions_move_basic.h" +#include "module_relax/ions_move_sd.h" #undef private /************************************************ * unit tests of class Ions_Move_SD diff --git a/source/module_relax/relax_old/test/lattice_change_basic_test.cpp b/source/module_relax/test/lattice_change_basic_test.cpp similarity index 99% rename from source/module_relax/relax_old/test/lattice_change_basic_test.cpp rename to source/module_relax/test/lattice_change_basic_test.cpp index 61578ae68f..dc7d0dfca3 100644 --- a/source/module_relax/relax_old/test/lattice_change_basic_test.cpp +++ b/source/module_relax/test/lattice_change_basic_test.cpp @@ -1,4 +1,4 @@ -#include "module_relax/relax_old/lattice_change_basic.h" +#include "module_relax/lattice_change_basic.h" #include "for_test.h" #include "gtest/gtest.h" diff --git a/source/module_relax/relax_old/test/lattice_change_cg_test.cpp b/source/module_relax/test/lattice_change_cg_test.cpp similarity index 99% rename from source/module_relax/relax_old/test/lattice_change_cg_test.cpp rename to source/module_relax/test/lattice_change_cg_test.cpp index 1a11148dd1..db0cc8b45e 100644 --- a/source/module_relax/relax_old/test/lattice_change_cg_test.cpp +++ b/source/module_relax/test/lattice_change_cg_test.cpp @@ -1,8 +1,8 @@ #include "for_test.h" #include "gtest/gtest.h" #define private public -#include "module_relax/relax_old/lattice_change_basic.h" -#include "module_relax/relax_old/lattice_change_cg.h" +#include "module_relax/lattice_change_basic.h" +#include "module_relax/lattice_change_cg.h" #undef private /************************************************ * unit tests of class Lattice_Change_CG diff --git a/source/module_relax/relax_old/test/lattice_change_methods_test.cpp b/source/module_relax/test/lattice_change_methods_test.cpp similarity index 97% rename from source/module_relax/relax_old/test/lattice_change_methods_test.cpp rename to source/module_relax/test/lattice_change_methods_test.cpp index 0eb4739fba..62f417ce20 100644 --- a/source/module_relax/relax_old/test/lattice_change_methods_test.cpp +++ b/source/module_relax/test/lattice_change_methods_test.cpp @@ -1,4 +1,4 @@ -#include "module_relax/relax_old/lattice_change_methods.h" +#include "module_relax/lattice_change_methods.h" #include "for_test.h" #include "gtest/gtest.h" diff --git a/source/module_relax/relax_new/test/line_search_test.cpp b/source/module_relax/test/line_search_test.cpp similarity index 100% rename from source/module_relax/relax_new/test/line_search_test.cpp rename to source/module_relax/test/line_search_test.cpp diff --git a/source/module_relax/relax_new/test/relax_test.cpp b/source/module_relax/test/relax_test.cpp similarity index 99% rename from source/module_relax/relax_new/test/relax_test.cpp rename to source/module_relax/test/relax_test.cpp index 35e6763402..6be4bda257 100644 --- a/source/module_relax/relax_new/test/relax_test.cpp +++ b/source/module_relax/test/relax_test.cpp @@ -3,7 +3,7 @@ #define private public #include "module_parameter/parameter.h" #undef private -#include "../relax.h" +#include "../relax_sync.h" #include "module_cell/unitcell.h" #include "relax_test.h" #include diff --git a/source/module_relax/relax_new/test/relax_test.h b/source/module_relax/test/relax_test.h similarity index 100% rename from source/module_relax/relax_new/test/relax_test.h rename to source/module_relax/test/relax_test.h diff --git a/source/module_relax/relax_new/test/support/energy.txt b/source/module_relax/test/support/energy.txt similarity index 100% rename from source/module_relax/relax_new/test/support/energy.txt rename to source/module_relax/test/support/energy.txt diff --git a/source/module_relax/relax_new/test/support/force.txt b/source/module_relax/test/support/force.txt similarity index 100% rename from source/module_relax/relax_new/test/support/force.txt rename to source/module_relax/test/support/force.txt diff --git a/source/module_relax/relax_new/test/support/stress.txt b/source/module_relax/test/support/stress.txt similarity index 100% rename from source/module_relax/relax_new/test/support/stress.txt rename to source/module_relax/test/support/stress.txt