-
Notifications
You must be signed in to change notification settings - Fork 230
Feature: DeltaSpin for LCAO and PW base and DFTU for PW, both collinear and noncollinear spin (code change and UTs) #7384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 7 commits
c582c1a
1ebccc9
694f6fb
f0a892a
ac27932
4ef2f30
cfc3141
c82536b
a114228
8461df1
790c690
8338520
99c0439
e60c174
dca95e5
f293daf
0921d0b
7cc2e49
b4655a5
85e87b0
bc79dba
137793e
cc84b99
c83cd91
8677840
aa6cf60
7176bf6
2f82006
178724c
ebdbc79
5539972
3f9e326
61bbc64
1610147
2c00c86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -453,6 +453,9 @@ bool parse_atom_properties(std::ifstream& ifpos, | |
| atom.lambda[ia].x /= ModuleBase::Ry_to_eV; | ||
| atom.lambda[ia].y /= ModuleBase::Ry_to_eV; | ||
| atom.lambda[ia].z /= ModuleBase::Ry_to_eV; | ||
| std::cout << "[DS-DIAG] STRU parse: lambda[" << ia << "]=(" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Blocker] Stray diagnostic |
||
| << atom.lambda[ia].x << ", " << atom.lambda[ia].y << ", " | ||
| << atom.lambda[ia].z << ") Ry/uB (converted from eV/uB)" << std::endl; | ||
| } | ||
| else if ( tmpid == "sc") | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -257,3 +257,34 @@ bool Charge_Mixing::if_scf_oscillate(const int iteration, const double drho, con | |
|
|
||
| return false; | ||
| } | ||
|
|
||
| void Charge_Mixing::allocate_mixing_uom(int uom_size) | ||
| { | ||
| ModuleBase::TITLE("Charge_Mixing", "allocate_mixing_uom"); | ||
| ModuleBase::timer::start("Charge_Mixing", "allocate_mixing_uom"); | ||
| ModuleBase::timer::end("Charge_Mixing", "allocate_mixing_uom"); | ||
| // For nspin=2, uom_size already includes both spin channels | ||
| // (eff_pot_pw.size() = pot_index * 2 for nspin=2) | ||
| // So uom_fold should always be 1 | ||
| this->mixing->init_mixing_data(this->uom_mdata, uom_size, sizeof(double)); | ||
| this->uom_mdata.reset(); | ||
| ModuleBase::timer::start("Charge_Mixing", "allocate_mixing_uom"); | ||
| ModuleBase::timer::end("Charge_Mixing", "allocate_mixing_uom"); | ||
| return; | ||
| } | ||
|
|
||
| void Charge_Mixing::mix_uom(std::vector<double>& uom_in, std::vector<double>& uom_save_in) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Blocker] Two problems with
|
||
| { | ||
| ModuleBase::TITLE("Charge_Mixing", "mix_uom"); | ||
| ModuleBase::timer::start("Charge_Mixing", "mix_uom"); | ||
| ModuleBase::timer::end("Charge_Mixing", "mix_uom"); | ||
| double* uom_value_out = uom_in.data(); | ||
| double* uom_value_in = uom_save_in.data(); | ||
| // For all nspin cases, uom_array layout is already fully sized | ||
| // and mixing operates on the entire array | ||
| this->mixing->push_data(this->uom_mdata, uom_value_in, uom_value_out, nullptr, false); | ||
| this->mixing->mix_data(this->uom_mdata, uom_value_out); | ||
| ModuleBase::timer::start("Charge_Mixing", "mix_uom"); | ||
| ModuleBase::timer::end("Charge_Mixing", "mix_uom"); | ||
| return; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.