Skip to content

Commit

Permalink
Change initialization of Wannier90
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yoshimi committed Jan 14, 2020
1 parent 4fd91fe commit bc64bc2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/StdFace/Wannier90.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "setmemory.h"

void _calc_inverse_matrix(double cutoff_Rvec[][3], double inverse_matrix[][3]) {
double NMatrix[3][3] = {{},
{}};
double NMatrix[3][3];
int i, j;
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
Expand Down Expand Up @@ -65,8 +64,9 @@ void _calc_inverse_matrix(double cutoff_Rvec[][3], double inverse_matrix[][3]) {

int _check_in_box(int *rvec, double inverse_matrix[][3])
{
double judge_vec[3]={};
double judge_vec[3];
int i, j;
for (i =0; i<3; i++) judge_vec[i] = 0;
for (i =0; i<3; i++) {
for (j = 0; j < 3; j++) {
judge_vec[i] += rvec[j]*inverse_matrix[j][i] ;
Expand Down Expand Up @@ -148,10 +148,15 @@ static void read_W90(
double dtmp[2], dR[3], length;
char ctmp[256], *ctmp2;
double complex ***Mat_tot;
double inverse_rvec[3][3]={{},{}};
double inverse_rvec[3][3];
double *Weight_tot;
int **indx_tot,*Band_lattice, *Model_lattice;

for (ii=0; ii<3; ii++){
for (jj=0; jj<3; jj++){
inverse_rvec[ii][jj] = 0;
}
}
/*
Header part
*/
Expand Down

0 comments on commit bc64bc2

Please sign in to comment.