Skip to content

Commit

Permalink
move ./sht to core
Browse files Browse the repository at this point in the history
  • Loading branch information
toxa81 committed Oct 18, 2023
1 parent cdaef65 commit 2266765
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ set(_SOURCES
"gpu/acc_blas.cpp"
"gpu/cusolver.cpp"
"gpu/rocsolver.cpp"
"sht/sht.cpp"
"sirius_version.cpp"
"mixer/mixer_functions.cpp"
"linalg/eigensolver.cpp"
Expand All @@ -85,6 +84,7 @@ set(_SOURCES
"nlcglib/adaptor.cpp"
"context/simulation_context.cpp"
"context/simulation_parameters.cpp"
"core/sht/sht.cpp"
"core/fft/gvec.cpp"
"core/mpi/communicator.cpp"
)
Expand Down
4 changes: 2 additions & 2 deletions src/context/input_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,13 @@
"std_evp_solver_name" : {
"type" : "string",
"default" : "auto",
"enum" : ["auto", "lapack", "scalapack", "elpa1", "elpa2", "magma", "magma_gpu", "plasma", "cusolver"],
"enum" : ["auto", "lapack", "scalapack", "elpa1", "elpa2", "magma", "magma_gpu", "cusolver"],
"title" : "Standard eigen-value solver to use."
},
"gen_evp_solver_name" : {
"type" : "string",
"default" : "auto",
"enum" : ["auto", "lapack", "scalapack", "elpa1", "elpa2", "magma", "magma_gpu", "plasma", "cusolver"],
"enum" : ["auto", "lapack", "scalapack", "elpa1", "elpa2", "magma", "magma_gpu", "cusolver"],
"title" : "Generalized eigen-value solver to use."
},
"fft_mode" : {
Expand Down
2 changes: 1 addition & 1 deletion src/core/fft/gvec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "symmetry/lattice.hpp"
#include "gvec.hpp"
#include "SDDK/serializer.hpp"
#include "core/serializer.hpp"

namespace sirius {

Expand Down
4 changes: 2 additions & 2 deletions src/core/fft/gvec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
#include "core/fft/fft3d_grid.hpp"
#include "core/r3/r3.hpp"
#include "core/splindex.hpp"
#include "core/serializer.hpp"
#include "core/mpi/pstdout.hpp"
#include "SDDK/memory.hpp"
#include "SDDK/serializer.hpp"
#include "utils/profiler.hpp"
#include "utils/rte.hpp"
#include "core/mpi/pstdout.hpp"

namespace sirius {

Expand Down
1 change: 1 addition & 0 deletions src/core/serializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <limits>
#include "core/mpi/communicator.hpp"
#include "SDDK/memory.hpp"

namespace sirius {

Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions src/sht/sht.cpp → src/core/sht/sht.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "sht/sht.hpp"
#include "core/sht/sht.hpp"
#include "utils/math_tools.hpp"

namespace sirius {
Expand Down Expand Up @@ -159,15 +159,15 @@ ClebschGordan(const int l, const double j, const double mj, const int spin)
RTE_THROW("Error : unknown spin direction");
}

const double denom = sqrt(1.0 / (2.0 * l + 1.0));
const double denom = std::sqrt(1.0 / (2.0 * l + 1.0));

if (std::abs(j - l - 0.5) < 1e-8) { // check for j = l + 1/2
int m = static_cast<int>(mj - 0.5); // if mj is integer (2 * m), then int m = (mj-1) >> 1;
if (spin == 0) {
CG = sqrt(l + m + 1.0);
CG = std::sqrt(l + m + 1.0);
}
if (spin == 1) {
CG = sqrt((l - m));
CG = std::sqrt((l - m));
}
} else {
if (std::abs(j - l + 0.5) < 1e-8) { // check for j = l - 1/2
Expand All @@ -176,10 +176,10 @@ ClebschGordan(const int l, const double j, const double mj, const int spin)
CG = 0.0;
} else {
if (spin == 0) {
CG = sqrt(l - m + 1);
CG = std::sqrt(l - m + 1);
}
if (spin == 1) {
CG = -sqrt(l + m);
CG = -std::sqrt(l + m);
}
}
} else {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/function3d/spheric_function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <array>
#include <typeinfo>
#include "radial/spline.hpp"
#include "sht/sht.hpp"
#include "core/sht/sht.hpp"
#include "SDDK/memory.hpp"
#include "utils/math_tools.hpp"

Expand Down
11 changes: 2 additions & 9 deletions src/sirius.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,13 @@ using json = nlohmann::json;
#include "context/simulation_context.hpp"
#include "hamiltonian/local_operator.hpp"
#include "radial/radial_solver.hpp"
#include "sht/sht.hpp"
#include "sht/gaunt.hpp"
#include "core/sht/sht.hpp"
#include "core/sht/gaunt.hpp"
#include "core/hdf5_tree.hpp"
#include "dft/dft_ground_state.hpp"
#include "linalg/eigenproblem.hpp"
#include "sirius_version.hpp"

#if defined(__PLASMA)
extern "C" void plasma_init(int num_cores);
#endif

/// Namespace of the SIRIUS library.
namespace sirius {

Expand Down Expand Up @@ -130,9 +126,6 @@ inline void initialize(bool call_mpi_init__ = true)
#if defined(SIRIUS_MAGMA)
magma::init();
#endif
#if defined(__PLASMA)
plasma_init(omp_get_max_threads());
#endif
#if defined(SIRIUS_ELPA)
la::Eigensolver_elpa::initialize();
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/unit_cell/atom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef __ATOM_HPP__
#define __ATOM_HPP__

#include "sht/gaunt.hpp"
#include "core/sht/gaunt.hpp"
#include "atom_symmetry_class.hpp"
#include "function3d/spheric_function.hpp"
#include "utils/profiler.hpp"
Expand Down
6 changes: 3 additions & 3 deletions src/unit_cell/atom_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
#define __ATOM_TYPE_HPP__

#include "atomic_data.hpp"
#include "core/r3/r3.hpp"
#include "radial/radial_solver.hpp"
#include "context/simulation_parameters.hpp"
#include "radial_functions_index.hpp"
#include "basis_functions_index.hpp"
#include "hubbard_orbitals_descriptor.hpp"
#include "sht/sht.hpp"
#include "sht/gaunt.hpp"
#include "core/sht/sht.hpp"
#include "core/sht/gaunt.hpp"
#include "core/r3/r3.hpp"
#include "utils/profiler.hpp"
#include "utils/packed_index.hpp"

Expand Down
2 changes: 1 addition & 1 deletion src/unit_cell/hubbard_orbitals_descriptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef __HUBBARD_ORBITALS_DESCRIPTOR_HPP__
#define __HUBBARD_ORBITALS_DESCRIPTOR_HPP__

#include "sht/sht.hpp"
#include "core/sht/sht.hpp"

namespace sirius {

Expand Down

0 comments on commit 2266765

Please sign in to comment.