Skip to content
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

Refactor ModuleIO::read/write_cube() #5150

Merged
merged 6 commits into from
Sep 29, 2024
Merged

Conversation

PeizeLin
Copy link
Collaborator

Move some codes in ModuleIO::read_cube() and ModuleIO::write_cube() to new functions ModuleIO::read_cube_core_match(), ModuleIO::read_cube_core_mismatch() and ModuleIO::write_cube_core().
Refactor these functions.

For users, there is no change in input or output.

@kirk0830
Copy link
Collaborator

@mohanchen this PR is ready for review, except precommit cannnot push format changes.

source/module_io/cube_io.h Outdated Show resolved Hide resolved
source/module_io/cube_io.h Outdated Show resolved Hide resolved
source/module_io/write_cube.cpp Show resolved Hide resolved
Copy link
Collaborator

@kirk0830 kirk0830 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR refactors partially the cube io functions, separating the trilinear interpolation from the kernel function of read and write cube file. Additionally, the parameters lists are slightly modified, mainly in two aspects, drop the "&" behind "const int" and add const to pointers to array.
There should still be further refactor because there is still not a pure, clean function to do the only one thing that read or write cube file, hope some developer will so this later.
The PR seems to be the prerequisite of DFPT development for outputting Vxc on realspace grid.

@mohanchen mohanchen enabled auto-merge (squash) September 29, 2024 02:19
@mohanchen mohanchen added the Refactor Refactor ABACUS codes label Sep 29, 2024
Copy link
Collaborator

@kirk0830 kirk0830 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR can be merged with an issue submitted #5191.

@mohanchen mohanchen merged commit cc2032b into deepmodeling:develop Sep 29, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Refactor ABACUS codes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants