Skip to content

Refactor: spilt Charge_Mixing::set_mixing() into set_mixing() and init_mixing()  #3599

@WHUweiqingzhou

Description

@WHUweiqingzhou

Describe the Code Quality Issue

Currently, Charge_Mixing::set_mixing() does three things:

  1. pass the mixing parameters.
  2. construct a mixing item.
  3. allocate the memory for mixing_data.

Usually, we need to restart the mixing without updating the mixing parameters.
It is better to define a new function init_mixing() to do 2&3.

This is a step for refactor of Charge_Mixing class #3363.

Additional Context

No response

Task list for Issue attackers (only for developers)

  • Identify the specific code file or section with the code quality issue.
  • Investigate the issue and determine the root cause.
  • Research best practices and potential solutions for the identified issue.
  • Refactor the code to improve code quality, following the suggested solution.
  • Ensure the refactored code adheres to the project's coding standards.
  • Test the refactored code to ensure it functions as expected.
  • Update any relevant documentation, if necessary.
  • Submit a pull request with the refactored code and a description of the changes made.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions