Move c files on a flat directory

This commit is contained in:
Atsushi Togo 2021-01-26 11:10:19 +09:00
parent 6e38395615
commit 9d0f335e38
47 changed files with 134 additions and 137 deletions

View File

@ -36,9 +36,9 @@
#include <stdio.h>
#include <assert.h>
#include <numpy/arrayobject.h>
#include <lapack_wrapper.h>
#include <phonon.h>
#include <phonoc_array.h>
#include "lapack_wrapper.h"
#include "phonon.h"
#include "phonoc_array.h"
static PyObject * py_phonopy_pinv(PyObject *self, PyObject *args);
static PyObject * py_phonopy_zheev(PyObject *self, PyObject *args);

View File

@ -39,19 +39,19 @@
#include <stdlib.h>
#include <math.h>
#include <numpy/arrayobject.h>
#include <lapack_wrapper.h>
#include <phonon.h>
#include <phonoc_array.h>
#include <phonoc_const.h>
#include <phonon3/fc3.h>
#include <phonon3/real_self_energy.h>
#include <phonon3/interaction.h>
#include <phonon3/imag_self_energy_with_g.h>
#include <phonon3/pp_collision.h>
#include <phonon3/collision_matrix.h>
#include <other/isotope.h>
#include <triplet/triplet.h>
#include <tetrahedron_method.h>
#include "lapack_wrapper.h"
#include "phonon.h"
#include "phonoc_array.h"
#include "phonoc_const.h"
#include "fc3.h"
#include "real_self_energy.h"
#include "interaction.h"
#include "imag_self_energy_with_g.h"
#include "pp_collision.h"
#include "collision_matrix.h"
#include "isotope.h"
#include "triplet.h"
#include "tetrahedron_method.h"
static PyObject * py_get_phonons_at_gridpoints(PyObject *self, PyObject *args);
static PyObject * py_get_interaction(PyObject *self, PyObject *args);

View File

@ -35,9 +35,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <phonoc_array.h>
#include <phonoc_utils.h>
#include <phonon3/collision_matrix.h>
#include "phonoc_array.h"
#include "phonoc_utils.h"
#include "collision_matrix.h"
static void get_collision_matrix(double *collision_matrix,
const double *fc3_normal_squared,

View File

@ -35,7 +35,7 @@
#ifndef __collision_matrix_H__
#define __collision_matrix_H__
#include <phonoc_array.h>
#include "phonoc_array.h"
void col_get_collision_matrix(double *collision_matrix,
const Darray *fc3_normal_squared,

View File

@ -34,7 +34,7 @@
#include <math.h>
#include <stdlib.h>
#include <dynmat.h>
#include "dynmat.h"
#define PI 3.14159265358979323846
static void get_dynmat_ij(double *dynamical_matrix,

View File

@ -33,8 +33,8 @@
/* POSSIBILITY OF SUCH DAMAGE. */
#include <stdlib.h>
#include <phonoc_const.h>
#include <phonon3/fc3.h>
#include "phonoc_const.h"
#include "fc3.h"
static void rotate_delta_fc2s(double (*rot_delta_fc2s)[3][3],
const size_t i_atom,

View File

@ -35,11 +35,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <phonoc_array.h>
#include <phonoc_utils.h>
#include <phonoc_const.h>
#include <phonon3/imag_self_energy_with_g.h>
#include <triplet/triplet.h>
#include "phonoc_array.h"
#include "phonoc_utils.h"
#include "phonoc_const.h"
#include "imag_self_energy_with_g.h"
#include "triplet.h"
static int ise_set_g_pos_frequency_point(int (*g_pos)[4],
const size_t num_band0,

View File

@ -36,7 +36,7 @@
#define __imag_self_energy_with_g_H__
#include <stddef.h>
#include <phonoc_array.h>
#include "phonoc_array.h"
void ise_get_imag_self_energy_at_bands_with_g(double *imag_self_energy,
const Darray *fc3_normal_squared,

View File

@ -34,13 +34,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <phonoc_array.h>
#include <phonoc_const.h>
#include <phonon3/interaction.h>
#include <phonon3/imag_self_energy_with_g.h>
#include <phonon3/real_to_reciprocal.h>
#include <phonon3/reciprocal_to_normal.h>
#include <lapack_wrapper.h>
#include "phonoc_array.h"
#include "phonoc_const.h"
#include "interaction.h"
#include "imag_self_energy_with_g.h"
#include "real_to_reciprocal.h"
#include "reciprocal_to_normal.h"
#include "lapack_wrapper.h"
static const int index_exchange[6][3] = {{0, 1, 2},
{2, 0, 1},

View File

@ -35,8 +35,8 @@
#ifndef __interaction_H__
#define __interaction_H__
#include <phonoc_array.h>
#include <lapack_wrapper.h>
#include "phonoc_array.h"
#include "lapack_wrapper.h"
void itr_get_interaction(Darray *fc3_normal_squared,
const char *g_zero,

View File

@ -33,10 +33,10 @@
/* POSSIBILITY OF SUCH DAMAGE. */
#include <stdlib.h>
#include <phonoc_const.h>
#include <phonoc_utils.h>
#include <other/isotope.h>
#include <lapack_wrapper.h>
#include "phonoc_const.h"
#include "phonoc_utils.h"
#include "isotope.h"
#include "lapack_wrapper.h"
void
iso_get_isotope_scattering_strength(double *gamma,

View File

@ -35,7 +35,7 @@
#ifndef __isotope_H__
#define __isotope_H__
#include <lapack_wrapper.h>
#include "lapack_wrapper.h"
void
iso_get_isotope_scattering_strength(double *gamma,

View File

@ -32,7 +32,7 @@
/* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
/* POSSIBILITY OF SUCH DAMAGE. */
#include <lapack_wrapper.h>
#include "lapack_wrapper.h"
#define min(a,b) ((a)>(b)?(b):(a))

View File

@ -34,8 +34,8 @@
#include <Python.h>
#include <numpy/arrayobject.h>
#include <phonoc_array.h>
#include <lapack_wrapper.h>
#include "phonoc_array.h"
#include "lapack_wrapper.h"
Iarray* convert_to_iarray(const PyArrayObject* npyary)
{

View File

@ -37,7 +37,7 @@
#include <Python.h>
#include <numpy/arrayobject.h>
#include <lapack_wrapper.h>
#include "lapack_wrapper.h"
#define MAX_NUM_DIM 20

View File

@ -33,11 +33,11 @@
/* POSSIBILITY OF SUCH DAMAGE. */
#include <math.h>
#include <dynmat.h>
#include <phonoc_array.h>
#include <phonoc_const.h>
#include <phonoc_utils.h>
#include <lapack_wrapper.h>
#include "dynmat.h"
#include "phonoc_array.h"
#include "phonoc_const.h"
#include "phonoc_utils.h"
#include "lapack_wrapper.h"
#define THZTOEVPARKB 47.992398658977166
#define INVSQRT2PI 0.3989422804014327

View File

@ -35,8 +35,8 @@
#ifndef __phonoc_utils_H__
#define __phonoc_utils_H__
#include <phonoc_array.h>
#include <lapack_wrapper.h>
#include "phonoc_array.h"
#include "lapack_wrapper.h"
double bose_einstein(const double x, const double t);
double gaussian(const double x, const double sigma);

View File

@ -35,9 +35,9 @@
#include <math.h>
#include <string.h>
#include <stddef.h>
#include <dynmat.h>
#include <phonon.h>
#include <lapack_wrapper.h>
#include "dynmat.h"
#include "phonon.h"
#include "lapack_wrapper.h"
static size_t collect_undone_grid_points(size_t *undone,
char *phonon_done,

View File

@ -35,8 +35,8 @@
#ifndef __phonon_H__
#define __phonon_H__
#include <dynmat.h>
#include <lapack_wrapper.h>
#include "dynmat.h"
#include "lapack_wrapper.h"
void
phn_get_phonons_at_gridpoints(double *frequencies,

View File

@ -34,15 +34,15 @@
#include <stdio.h>
#include <stdlib.h>
#include <phonoc_array.h>
#include <phonoc_const.h>
#include <phonoc_utils.h>
#include <phonon3/imag_self_energy_with_g.h>
#include <phonon3/pp_collision.h>
#include <phonon3/interaction.h>
#include <triplet/triplet.h>
#include <triplet/triplet_iw.h>
#include <lapack_wrapper.h>
#include "phonoc_array.h"
#include "phonoc_const.h"
#include "phonoc_utils.h"
#include "imag_self_energy_with_g.h"
#include "pp_collision.h"
#include "interaction.h"
#include "triplet.h"
#include "triplet_iw.h"
#include "lapack_wrapper.h"
static void get_collision(double *ise,
const size_t num_band0,

View File

@ -35,9 +35,9 @@
#ifndef __pp_collision_H__
#define __pp_collision_H__
#include <phonoc_array.h>
#include <phonoc_const.h>
#include <lapack_wrapper.h>
#include "phonoc_array.h"
#include "phonoc_const.h"
#include "lapack_wrapper.h"
void ppc_get_pp_collision(double *imag_self_energy,
PHPYCONST int relative_grid_address[24][4][3],

View File

@ -34,10 +34,10 @@
#include <stdlib.h>
#include <math.h>
#include <phonoc_array.h>
#include <phonoc_utils.h>
#include <phonon3/real_self_energy.h>
#include <phonon3/real_to_reciprocal.h>
#include "phonoc_array.h"
#include "phonoc_utils.h"
#include "real_self_energy.h"
#include "real_to_reciprocal.h"
static double get_real_self_energy_at_band(const int band_index,
const Darray *fc3_normal_squared,

View File

@ -35,7 +35,7 @@
#ifndef __real_self_energy_H__
#define __real_self_energy_H__
#include <phonoc_array.h>
#include "phonoc_array.h"
#endif

View File

@ -36,11 +36,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <phonoc_array.h>
#include <phonoc_const.h>
#include <phonoc_utils.h>
#include <phonon3/real_to_reciprocal.h>
#include <lapack_wrapper.h>
#include "phonoc_array.h"
#include "phonoc_const.h"
#include "phonoc_utils.h"
#include "real_to_reciprocal.h"
#include "lapack_wrapper.h"
static void
real_to_reciprocal_single_thread(lapack_complex_double *fc3_reciprocal,

View File

@ -35,8 +35,8 @@
#ifndef __real_to_reciprocal_H__
#define __real_to_reciprocal_H__
#include <phonoc_array.h>
#include <lapack_wrapper.h>
#include "phonoc_array.h"
#include "lapack_wrapper.h"
void r2r_real_to_reciprocal(lapack_complex_double *fc3_reciprocal,
const double q[9],

View File

@ -34,11 +34,11 @@
#include <stdlib.h>
#include <math.h>
#include <phonoc_utils.h>
#include <phonoc_const.h>
#include <phonoc_array.h>
#include <phonon3/reciprocal_to_normal.h>
#include <lapack_wrapper.h>
#include "phonoc_utils.h"
#include "phonoc_const.h"
#include "phonoc_array.h"
#include "reciprocal_to_normal.h"
#include "lapack_wrapper.h"
#ifdef MEASURE_R2N
#include <unistd.h>

View File

@ -35,9 +35,9 @@
#ifndef __reciprocal_to_normal_H__
#define __reciprocal_to_normal_H__
#include <phonoc_array.h>
#include <phonoc_const.h>
#include <lapack_wrapper.h>
#include "phonoc_array.h"
#include "phonoc_const.h"
#include "lapack_wrapper.h"
void reciprocal_to_normal_squared
(double *fc3_normal_squared,

View File

@ -35,7 +35,7 @@
/* Copyright (C) 2014 Atsushi Togo */
#include <stddef.h>
#include <kgrid.h>
#include "kgrid.h"
#include "tetrahedron_method.h"
#ifdef THMWARNING

View File

@ -36,9 +36,9 @@
#include <stddef.h>
#include <mathfunc.h>
#include <triplet/triplet.h>
#include <triplet/triplet_iw.h>
#include <triplet/triplet_kpoint.h>
#include "triplet.h"
#include "triplet_iw.h"
#include "triplet_kpoint.h"
static size_t get_triplets_reciprocal_mesh_at_q(size_t *map_triplets,
size_t *map_q,

View File

@ -34,10 +34,10 @@
#include <stddef.h>
#include <math.h>
#include <phonoc_utils.h>
#include <triplet/triplet.h>
#include <triplet/triplet_iw.h>
#include <tetrahedron_method.h>
#include "phonoc_utils.h"
#include "triplet.h"
#include "triplet_iw.h"
#include "tetrahedron_method.h"
static void set_freq_vertices(double freq_vertices[3][24][4],
const double *frequencies1,

View File

@ -36,7 +36,7 @@
#define __triplet_iw_H__
#include <stddef.h>
#include <triplet/triplet.h>
#include "triplet.h"
void
tpi_get_integration_weight(double *iw,

View File

@ -36,11 +36,11 @@
#include <stddef.h>
#include <stdlib.h>
#include <mathfunc.h>
#include <kpoint.h>
#include <kgrid.h>
#include <triplet/triplet.h>
#include <triplet/triplet_kpoint.h>
#include "mathfunc.h"
#include "kpoint.h"
#include "kgrid.h"
#include "triplet.h"
#include "triplet_kpoint.h"
#define KPT_NUM_BZ_SEARCH_SPACE 125
static int bz_search_space[KPT_NUM_BZ_SEARCH_SPACE][3] = {

View File

@ -38,8 +38,8 @@
#define __triplet_kpoint_H__
#include <stddef.h>
#include <mathfunc.h>
#include <triplet/triplet.h>
#include "mathfunc.h"
#include "triplet.h"
size_t tpk_get_ir_triplets_at_q(size_t *map_triplets,
size_t *map_q,

View File

@ -35,33 +35,30 @@ if (config_var is not None and
"-Werror=declaration-after-statement", "")
sources = ['c/_phono3py.c',
'c/harmonic/dynmat.c',
'c/harmonic/phonon.c',
'c/harmonic/lapack_wrapper.c',
'c/harmonic/phonoc_array.c',
'c/harmonic/phonoc_utils.c',
'c/anharmonic/phonon3/fc3.c',
'c/anharmonic/phonon3/real_self_energy.c',
'c/anharmonic/phonon3/interaction.c',
'c/anharmonic/phonon3/real_to_reciprocal.c',
'c/anharmonic/phonon3/reciprocal_to_normal.c',
'c/anharmonic/phonon3/imag_self_energy_with_g.c',
'c/anharmonic/phonon3/pp_collision.c',
'c/anharmonic/phonon3/collision_matrix.c',
'c/anharmonic/other/isotope.c',
'c/anharmonic/triplet/triplet.c',
'c/anharmonic/triplet/triplet_kpoint.c',
'c/anharmonic/triplet/triplet_iw.c',
'c/spglib/mathfunc.c',
'c/spglib/kpoint.c',
'c/kspclib/kgrid.c',
'c/kspclib/tetrahedron_method.c']
'c/dynmat.c',
'c/phonon.c',
'c/lapack_wrapper.c',
'c/phonoc_array.c',
'c/phonoc_utils.c',
'c/fc3.c',
'c/real_self_energy.c',
'c/interaction.c',
'c/real_to_reciprocal.c',
'c/reciprocal_to_normal.c',
'c/imag_self_energy_with_g.c',
'c/pp_collision.c',
'c/collision_matrix.c',
'c/isotope.c',
'c/triplet.c',
'c/triplet_kpoint.c',
'c/triplet_iw.c',
'c/mathfunc.c',
'c/kpoint.c',
'c/kgrid.c',
'c/tetrahedron_method.c']
extra_compile_args = ['-fopenmp', ]
include_dirs = ['c/harmonic',
'c/anharmonic',
'c/spglib',
'c/kspclib'] + include_dirs_numpy
include_dirs = ['c', ] + include_dirs_numpy
define_macros = []
extra_link_args_lapacke = []
@ -259,11 +256,11 @@ scripts_phono3py = ['scripts/phono3py',
include_dirs_lapackepy = (['c/harmonic',] + include_dirs_numpy
+ include_dirs_lapacke)
sources_lapackepy = ['c/_lapackepy.c',
'c/harmonic/dynmat.c',
'c/harmonic/phonon.c',
'c/harmonic/phonoc_array.c',
'c/harmonic/phonoc_utils.c',
'c/harmonic/lapack_wrapper.c']
'c/dynmat.c',
'c/phonon.c',
'c/phonoc_array.c',
'c/phonoc_utils.c',
'c/lapack_wrapper.c']
extension_lapackepy = Extension(
'phono3py._lapackepy',
extra_compile_args=extra_compile_args,