Skip to content

Commit

Permalink
Formatting output styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ttadano committed Feb 23, 2016
1 parent be5915b commit 57913a4
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 148 deletions.
15 changes: 11 additions & 4 deletions anphon/dynamical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@ void Dynamical::setup_dynamical(std::string mode)
UPLO = 'U';

if (mympi->my_rank == 0) {
std::cout << std::endl << std::endl;
std::cout << " ------------------------------------------------------------" << std::endl << std::endl;
if (nonanalytic == 1) {
std::cout << std::endl;
std::cout << " Dynamical matrix" << std::endl;
std::cout << " ================" << std::endl;
if (nonanalytic == 0) {
std::cout << std::endl;
std::cout << " NONANALYTIC = 0 : No non-analytic correction. " << std::endl;
std::cout << std::endl;
} else if (nonanalytic == 1) {
std::cout << std::endl;
std::cout << " NONANALYTIC = 1 : Non-analytic part of the dynamical matrix will be included " << std::endl;
std::cout << " by the Parlinski's method." << std::endl;
Expand All @@ -57,6 +62,8 @@ void Dynamical::setup_dynamical(std::string mode)
std::cout << " by the mixed-space approach." << std::endl;
std::cout << std::endl;
}
std::cout << " ------------------------------------------------------------" << std::endl << std::endl;

}

memory->allocate(xshift_s, 27, 3);
Expand Down Expand Up @@ -599,7 +606,7 @@ void Dynamical::diagonalize_dynamical_all()
}

if (mympi->my_rank == 0) {
std::cout << "done !" << std::endl;
std::cout << "done!" << std::endl;
}
}

Expand Down
2 changes: 1 addition & 1 deletion anphon/gruneisen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void Gruneisen::calc_gruneisen()
memory->deallocate(dfc2_reciprocal);

if (mympi->my_rank == 0) {
std::cout << " done !" << std::endl;
std::cout << "done!" << std::endl;
}
}

Expand Down
3 changes: 1 addition & 2 deletions anphon/isotope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ void Isotope::setup_isotope_scattering()


if (mympi->my_rank == 0) {
std::cout << std::endl;
std::cout << " ISOTOPE >= 1: Isotope scattering effects will be considered" << std::endl;
std::cout << " with the following scattering factors." << std::endl;
std::cout << " with the following scattering factors." << std::endl;

for (i = 0; i < nkd; ++i) {
std::cout << std::setw(5) << system->symbol_kd[i] << ":";
Expand Down
14 changes: 7 additions & 7 deletions anphon/phonon_dos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void Dos::calc_atom_projected_dos(const unsigned int nk, double **eval, const un
double *weight;
double **proj;

if (mympi->my_rank == 0) std::cout << " PDOS = 1 : Calculating atom-projected phonon DOS ...";
if (mympi->my_rank == 0) std::cout << " PDOS = 1 : Calculating atom-projected phonon DOS ... ";

memory->allocate(kmap_identity, nk);
memory->allocate(proj, neval, nk);
Expand Down Expand Up @@ -255,7 +255,7 @@ void Dos::calc_atom_projected_dos(const unsigned int nk, double **eval, const un
memory->deallocate(proj);
memory->deallocate(kmap_identity);

if (mympi->my_rank == 0) std::cout << " done." << std::endl;
if (mympi->my_rank == 0) std::cout << " done!" << std::endl;
}


Expand Down Expand Up @@ -359,7 +359,7 @@ void Dos::calc_two_phonon_dos(const unsigned int n, double *energy, double ***re
memory->deallocate(k_pair);

if (mympi->my_rank == 0) {
std::cout << "done." << std::endl;
std::cout << "done!" << std::endl;
}
}

Expand All @@ -384,7 +384,7 @@ void Dos::calc_total_scattering_phase_space(double **omega, const int smearing_m
double sps_sum1, sps_sum2;

if (mympi->my_rank == 0) {
std::cout << " SPS = 1 : Calculating three-phonon scattering phase space ..." << std::endl;
std::cout << " SPS = 1 : Calculating three-phonon scattering phase space ... ";
}

memory->allocate(kmap_identity, nk);
Expand Down Expand Up @@ -469,7 +469,7 @@ void Dos::calc_total_scattering_phase_space(double **omega, const int smearing_m
ret = (sps_sum1 + 2.0 * sps_sum2) / (3.0 * static_cast<double>(std::pow(ns, 3.0)));

if (mympi->my_rank == 0) {
std::cout << "done." << std::endl;
std::cout << "done!" << std::endl;
}
}

Expand Down Expand Up @@ -506,7 +506,7 @@ void Dos::calc_scattering_phase_space_with_Bose(double **eval, const int smearin

if (mympi->my_rank == 0) {
std::cout << " SPS = 2 : Calculating three-phonon scattering phase space" << std::endl;
std::cout << " with the Bose distribution function ..." << std::endl;
std::cout << " with the Bose distribution function ...";
}

N = static_cast<int>((Tmax - Tmin) / dT) + 1;
Expand Down Expand Up @@ -621,7 +621,7 @@ void Dos::calc_scattering_phase_space_with_Bose(double **eval, const int smearin
memory->deallocate(temperature);

if (mympi->my_rank == 0) {
std::cout << " done." << std::endl;
std::cout << " done!" << std::endl;
}
}

Expand Down
2 changes: 1 addition & 1 deletion anphon/phonon_velocity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void Phonon_velocity::calc_phonon_vel_mesh(double **phvel_out, double ***phvel3_
double **vel;

if (mympi->my_rank == 0) {
std::cout << " Calculating group velocities of phonons at uniform grid ... ";
std::cout << " Calculating group velocities of phonons on uniform grid ... ";
}

memory->allocate(vel, ns, 3);
Expand Down
19 changes: 6 additions & 13 deletions anphon/phonons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ void PHON::setup_base()
kpoint->kpoint_setups(mode);
fcs_phonon->setup(mode);
dynamical->setup_dynamical(mode);
dos->setup();
std::cout << " Now, move on to phonon calculations." << std::endl;
}

void PHON::execute_phonons()
Expand All @@ -161,9 +163,7 @@ void PHON::execute_phonons()

setup_base();

dos->setup();
dynamical->diagonalize_dynamical_all();

phonon_velocity->calc_group_velocity(kpoint->kpoint_mode);

if (dos->flag_dos) {
Expand All @@ -172,14 +172,12 @@ void PHON::execute_phonons()
}

gruneisen->setup();

if (gruneisen->print_gruneisen) {
gruneisen->calc_gruneisen();
}

if (mympi->my_rank == 0) {
writes->print_phonon_energy();

writes->write_phonon_info();

if (gruneisen->print_newfcs) {
Expand Down Expand Up @@ -217,29 +215,24 @@ void PHON::execute_RTA()
}

setup_base();
dos->setup();

if (kpoint->kpoint_mode < 3) {
dynamical->diagonalize_dynamical_all();
}
relaxation->setup_mode_analysis();

if (!relaxation->ks_analyze_mode) {
writes->setup_result_io();
}

if (kpoint->kpoint_mode == 2) {
integration->setup_integration();
}
isotope->setup_isotope_scattering();
isotope->calc_isotope_selfenergy_all();

// relaxation->setup_mode_analysis();
relaxation->setup_relaxation();
selfenergy->setup_selfenergy();
isotope->setup_isotope_scattering();
isotope->calc_isotope_selfenergy_all();

if (relaxation->ks_analyze_mode) {
relaxation->perform_mode_analysis();
} else {
writes->setup_result_io();
conductivity->setup_kappa();
conductivity->prepare_restart();
conductivity->calc_anharmonic_imagself();
Expand Down

0 comments on commit 57913a4

Please sign in to comment.