Skip to content
Merged
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
6 changes: 3 additions & 3 deletions source/module_io/berryphase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ double berryphase::stringPhase(int index_str,
{
std::complex<double> zeta(1.0, 0.0);
ModuleBase::ComplexMatrix mat(nbands,nbands);
int ik_1;
int ik_2;
int ik_1 = 0;
int ik_2 = 0;
ModuleBase::Vector3<double> G(0.0,0.0,0.0);
ModuleBase::Vector3<double> dk = kv.kvec_c[ k_index[index_str][1] ] - kv.kvec_c[ k_index[index_str][0] ];
//GlobalV::ofs_running << "the std::string index is " << index_str << std::endl;
Expand Down Expand Up @@ -577,7 +577,7 @@ void berryphase::Macroscopic_polarization(const int npwx,
// ion polarization end

// calculate Macroscopic polarization modulus because berry phase
int modulus;
int modulus = 0;
if( (!lodd) && (GlobalV::NSPIN==1) ) modulus = 2;
else modulus = 1;

Expand Down