Skip to content

Commit 9b1a203

Browse files
authored
Merge branch 'develop' into combine-relax
2 parents e813593 + 415390d commit 9b1a203

44 files changed

Lines changed: 2277 additions & 195 deletions

Some content is hidden

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

.github/workflows/version_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
# Validate version.h matches the release tag
2626
- name: Assert version increment
2727
run: |
28-
CODE_VERSION=$(grep -oP '#define\s+VERSION\s+"\K\d+(\.\d+){2,3}' source/version.h)
28+
CODE_VERSION=$(grep -oP '#define\s+VERSION\s+"\K\d+(\.\d+){2,3}' source/source_main/version.h)
2929
3030
if [[ -z "$CODE_VERSION" ]]; then
31-
echo "::error::Failed to extract version from source/version.h"
31+
echo "::error::Failed to extract version from source/source_main/version.h"
3232
exit 1
3333
fi
3434

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ include_directories(${ABACUS_SOURCE_DIR}/module_base/module_container)
172172
set(CMAKE_CXX_STANDARD 11)
173173
set(CMAKE_CXX_STANDARD_REQUIRED ON)
174174

175-
add_executable(${ABACUS_BIN_NAME} source/main.cpp)
175+
add_executable(${ABACUS_BIN_NAME} source/source_main/main.cpp)
176176
if(ENABLE_COVERAGE)
177177
add_coverage(${ABACUS_BIN_NAME})
178178
endif()

source/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ add_subdirectory(module_rdmft)
2424
add_library(
2525
driver
2626
OBJECT
27-
driver.cpp
28-
driver_run.cpp
27+
source_main/driver.cpp
28+
source_main/driver_run.cpp
2929
)
3030

3131
list(APPEND device_srcs

source/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include Makefile.vars
44
# Compiler information
55
#==========================
66

7-
INCLUDES = -I. -Icommands -I../ -Imodule_base/module_container
7+
INCLUDES = -I. -Isource_main -Isource_main/commands -Icommands -I../ -Imodule_base/module_container
88

99
LIBS = -lm -lpthread
1010
OPTS = -std=c++14 -pedantic -m64 ${INCLUDES}

source/Makefile.Objects

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
#
1010

1111
VERSION = ABACUS
12-
HEADERS = *.h
12+
HEADERS = source_main/*.h
1313

1414
VPATH=./src_global:\
15+
./source_main:\
1516
./module_basis/module_ao:\
1617
./module_basis/module_nao:\
1718
./module_cell/module_neighbor:\
@@ -143,6 +144,7 @@ OBJS_BASE=abfs-vector3_order.o\
143144
math_lebedev_laikov.o\
144145
math_polyint.o\
145146
math_sphbes.o\
147+
math_erf_complex.o\
146148
math_ylmreal.o\
147149
math_bspline.o\
148150
math_chebyshev.o\

source/module_base/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ add_library(
2929
math_lebedev_laikov.cpp
3030
math_polyint.cpp
3131
math_sphbes.cpp
32+
math_erf_complex.cpp
3233
math_ylmreal.cpp
3334
math_bspline.cpp
3435
math_chebyshev.cpp

source/module_base/global_function.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ static inline const T* VECTOR_TO_PTR(const std::valarray<T>& v)
236236
// Peize Lin add 2016-07-18
237237
//==========================================================
238238
template <typename T>
239-
std::string TO_STRING(const T& n)
239+
std::string TO_STRING(const T& t, const int n=20) // n=20 since LDBL_EPSILON is 1E-16 or 1E-19
240240
{
241241
std::stringstream newstr;
242-
newstr << n;
242+
newstr << std::setprecision(n) << t;
243243
return newstr.str();
244244
}
245245

source/module_base/gram_schmidt_orth-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Func_Type Gram_Schmidt_Orth<Func_Type,R_Type>::cal_norm( const std::vector<Func_
9595
}
9696
default:
9797
{
98-
throw std::invalid_argument("coordinate must be Cartesian or Sphere "+ModuleBase::GlobalFunc::TO_STRING(__FILE__)+" line "+ModuleBase::GlobalFunc::TO_STRING(__LINE__));
98+
throw std::invalid_argument("coordinate must be Cartesian or Sphere "+std::string(__FILE__)+" line "+std::to_string(__LINE__));
9999
break;
100100
}
101101
}

0 commit comments

Comments
 (0)