Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: move input and input_conv into module_io #1799

Merged
merged 3 commits into from
Jan 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ add_library(
OBJECT
driver.cpp
driver_run.cpp
input.cpp
input_conv.cpp
)

list(APPEND device_srcs
Expand Down
6 changes: 3 additions & 3 deletions source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ ${OBJS_DFTU}\

OBJS_MAIN=main.o\
driver.o\
input.o \
input_conv.o\
driver_run.o\

OBJS_BASE=abfs-vector3_order.o\
Expand Down Expand Up @@ -330,7 +328,9 @@ OBJS_XC=xc_functional.o\
xc_funct_corr_gga.o\
xc_funct_hcth.o\

OBJS_IO=berryphase.o\
OBJS_IO=input.o\
input_conv.o\
berryphase.o\
bessel_basis.o\
cal_test.o\
energy_dos_pw.o\
Expand Down
4 changes: 2 additions & 2 deletions source/driver.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "driver.h"

#include "input.h"
#include "input_conv.h"
#include "module_io/input.h"
#include "module_io/input_conv.h"
#include "src_pw/global.h"
#ifdef __LCAO
#include "src_lcao/global_fp.h"
Expand Down
2 changes: 1 addition & 1 deletion source/driver_run.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "driver.h"
#include "src_pw/global.h"
#include "input.h"
#include "module_io/input.h"
#include "module_io/winput.h"
#include "module_neighbor/sltk_atom_arrange.h"
#include "module_io/print_info.h"
Expand Down
2 changes: 1 addition & 1 deletion source/module_cell/read_cell_pseudopots.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "unitcell.h"
#include "../src_parallel/parallel_common.h"
#include "../input.h"
#include "module_io/input.h"
#ifdef __LCAO
//#include "../module_orbital/ORB_read.h" // to use 'ORB' -- mohan 2021-01-30
#endif
Expand Down
2 changes: 1 addition & 1 deletion source/module_elecstate/potentials/H_TDDFT_pw.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "H_TDDFT_pw.h"

#include "../../input.h"
#include "module_io/input.h"
#include "module_base/constants.h"
#include "module_base/timer.h"
#include "src_lcao/ELEC_evolve.h"
Expand Down
2 changes: 1 addition & 1 deletion source/module_elecstate/potentials/H_TDDFT_pw.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define H_TDDFT_PW_H

#include "pot_base.h"
#include "../../input.h"
#include "module_io/input.h"

namespace elecstate
{
Expand Down
2 changes: 1 addition & 1 deletion source/module_elecstate/test/updaterhok_pw_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "src_pw/pw_complement.h"
#include "src_pw/structure_factor.h"
#include "src_pw/VNL_in_pw.h"
#include "input.h"
#include "module_io/input.h"
#include "src_pw/energy.h"
#include "module_xc/xc_functional.h"
#include "module_pw/pw_basis_k.h"
Expand Down
2 changes: 1 addition & 1 deletion source/module_esolver/esolver.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef ESOLVER_H
#define ESOLVER_H

#include "../input.h"
#include "module_io/input.h"
#include "../module_cell/unitcell.h"
#include "../src_pw/energy.h"
#include "../module_base/matrix.h"
Expand Down
2 changes: 2 additions & 0 deletions source/module_io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
list(APPEND objects
input.cpp
input_conv.cpp
berryphase.cpp
bessel_basis.cpp
cal_test.cpp
Expand Down
2 changes: 1 addition & 1 deletion source/input.cpp → source/module_io/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// DATE : 2008-11-6
//==========================================================
// #include "global.h"
#include "input.h"
#include "module_io/input.h"

#include "module_base/global_file.h"
#include "module_base/global_function.h"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions source/input_conv.cpp → source/module_io/input_conv.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "input_conv.h"
#include "input.h"
#include "module_io/input_conv.h"
#include "module_io/input.h"
#include "module_base/global_function.h"
#include "module_base/global_variable.h"
#include "module_cell/unitcell.h"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion source/module_io/print_info.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "print_info.h"
#include "../input.h"
#include "module_io/input.h"
#include "../module_base/global_variable.h"

Print_Info::Print_Info(){}
Expand Down
2 changes: 1 addition & 1 deletion source/module_io/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ remove_definitions(-D__ROCM)
AddTest(
TARGET input_test
LIBS ${math_libs} base device
SOURCES input_test.cpp ../../input.cpp ../../src_parallel/parallel_reduce.cpp ../../src_parallel/parallel_global.cpp ../../src_parallel/parallel_common.cpp
SOURCES input_test.cpp ../input.cpp ../../src_parallel/parallel_reduce.cpp ../../src_parallel/parallel_global.cpp ../../src_parallel/parallel_common.cpp
)

install(FILES INPUT STRU DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
Expand Down
2 changes: 1 addition & 1 deletion source/module_io/test/input_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

#define private public
#include "../../input.h"
#include "module_io/input.h"

class InputTest : public testing::Test
{
Expand Down
2 changes: 1 addition & 1 deletion source/module_io/wf_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "rwstream.h"
#include "module_base/tool_title.h"
#include "module_base/global_variable.h"
#include "input.h"
#include "module_io/input.h"
#include "../src_parallel/parallel_global.h"
#ifdef __MPI
#include "mpi.h"
Expand Down
2 changes: 1 addition & 1 deletion source/module_io/write_input.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../input.h"
#include "module_io/input.h"
#include "../module_base/global_function.h"
#include "../module_base/global_variable.h"

Expand Down
2 changes: 1 addition & 1 deletion source/module_md/run_md.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "FIRE.h"
#include "Nose_Hoover.h"
#include "Langevin.h"
#include "../input.h"
#include "module_io/input.h"
#include "../module_io/print_info.h"
#include "../module_base/timer.h"

Expand Down
2 changes: 1 addition & 1 deletion source/module_md/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ add_definitions(-D__CMD -D__NORMAL)

list(APPEND depend_files
../MD_func.cpp
../../input.cpp
../../module_io/input.cpp
../../module_cell/unitcell.cpp
../../module_cell/atom_spec.cpp
../../module_cell/atom_pseudo.cpp
Expand Down
2 changes: 1 addition & 1 deletion source/module_md/test/setcell.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifndef SETCELL_H
#define SETCELL_H

#include "input.h"
#include "module_io/input.h"
#include "module_cell/unitcell.h"
#include "module_neighbor/sltk_atom_arrange.h"
#include "module_neighbor/sltk_grid_driver.h"
Expand Down
2 changes: 1 addition & 1 deletion source/module_orbital/ORB_control.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef ORB_CONTROL_H
#define ORB_CONTROL_H

#include "input.h"
#include "module_io/input.h"
#include "module_cell/unitcell.h"
#include "parallel_orbitals.h"
#include "ORB_gen_tables.h"
Expand Down
2 changes: 1 addition & 1 deletion source/module_relax/relax_old/variable_cell.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "variable_cell.h"
#include "src_pw/global.h"
#include "input.h"
#include "module_io/input.h"

Variable_Cell::Variable_Cell(){}
Variable_Cell::~Variable_Cell(){}
Expand Down
2 changes: 1 addition & 1 deletion source/module_relax/relax_old/variable_cell.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "module_base/global_function.h"
#include "module_base/global_variable.h"
#include "input.h"
#include "module_io/input.h"
#include "module_esolver/esolver.h"

class Variable_Cell
Expand Down
2 changes: 1 addition & 1 deletion source/module_vdw/vdwd2_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define VDWD2_PARAMETERS_H

#include <map>
#include "input.h"
#include "module_io/input.h"
#include "module_cell/unitcell.h"
#include "module_vdw/vdw_parameters.h"

Expand Down
2 changes: 1 addition & 1 deletion source/module_vdw/vdwd3_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef VDWD3_PARAMETERS_H
#define VDWD3_PARAMETERS_H

#include "input.h"
#include "module_io/input.h"
#include "module_vdw/vdw_parameters.h"

namespace vdw
Expand Down
2 changes: 1 addition & 1 deletion source/src_lcao/FORCE_STRESS.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "FORCE_k.h"
//#include "./force_lcao_gamma.h"
#include "../src_pw/stress_func.h"
#include "../input_conv.h"
#include "module_io/input_conv.h"
#include "../src_pw/forces.h"
#include "module_psi/psi.h"

Expand Down
2 changes: 1 addition & 1 deletion source/src_lcao/LCAO_evolve.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "LCAO_evolve.h"

#include "../input.h"
#include "module_io/input.h"
#include "../module_base/scalapack_connector.h"
#include "../module_io/write_HS.h"
#include "../src_pw/global.h"
Expand Down
2 changes: 1 addition & 1 deletion source/src_lcao/dmft.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef DFT_DMFT_INTERFACE
#define DFT_DMFT_INTERFACE

#include "../input.h"
#include "module_io/input.h"
#include "../module_cell/unitcell.h"
#include "../module_base/complexmatrix.h"
#include "src_lcao/LCAO_matrix.h"
Expand Down