Skip to content

Commit b278f26

Browse files
committed
change type of warning
1 parent e3fdd3e commit b278f26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/source_pw/module_ofdft/evolve_ofdft.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void Evolve_OFDFT::cal_vw_potential_phi(std::vector<std::complex<double>> pphi,
7777
std::vector<std::complex<double>> Hpsi)
7878
{
7979
if (PARAM.inp.nspin <= 0) {
80-
throw std::invalid_argument("nspin must be positive");
80+
ModuleBase::WARNING_QUIT("Evolve_OFDFT","nspin must be positive");
8181
}
8282
std::complex<double>** rLapPhi = new std::complex<double>*[PARAM.inp.nspin];
8383
#ifdef _OPENMP
@@ -131,7 +131,7 @@ void Evolve_OFDFT::cal_CD_potential(std::vector<std::complex<double>> psi_,
131131
std::complex<double> imag(0.0,1.0);
132132

133133
if (PARAM.inp.nspin <= 0) {
134-
throw std::invalid_argument("nspin must be positive");
134+
ModuleBase::WARNING_QUIT("Evolve_OFDFT","nspin must be positive");
135135
}
136136
std::complex<double>** recipPhi = new std::complex<double>*[PARAM.inp.nspin];
137137
std::complex<double>** rPhi = new std::complex<double>*[PARAM.inp.nspin];

0 commit comments

Comments
 (0)