Skip to content

Unify numerical type template in PW calculation #2951

@denghuilu

Description

@denghuilu

Background

The usage of template parameters in ABACUS is relatively confusing. Here are a few examples:

  • complex<FPTYPE> is used uniformly in PW code, that is, FPYTPE cannot take complex<double>;

  • There is complex<T> in the DiagoBPCG written by @denghuilu, so T here cannot be complex<double> too;

  • However: T in HamiltonLCAO<T> can be complex<double>;

  • And In the new ESolver_LR module, FPTYPE can also be complex<double>...

Describe the solution you'd like

In the PW calculation, we employ a unified numerical type template represented by 'T' instead of 'FPTYPE' to denote the calculation's numerical type. This 'T' template is designed to accommodate various data types, including 'std::complex' and others.

Additional Context

No response

Task list for Issue attackers

  • Review and understand the proposed feature and its importance.
  • Research on the existing solutions and relevant research articles/resources.
  • Discuss with the team to evaluate the feasibility of implementing the feature.
  • Create a design document outlining the proposed solution and implementation details.
  • Get feedback from the team on the design document.
  • Develop the feature following the agreed design.
  • Write unit tests and integration tests for the feature.
  • Update the documentation to include the new feature.
  • Perform code review and address any issues.
  • Merge the feature into the main branch.
  • Monitor for any issues or bugs reported by users after the feature is released.
  • Address any issues or bugs reported by users and continuously improve the feature.

Metadata

Metadata

Labels

Feature DiscussedThe features will be discussed first but will not be implemented soon

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions