Encapsulate `lxyz` and `lxyz_inv`
Description
Replace access to lxyz
and lxyz_inv
arrays by using the functions index_to_coords
and index_from_coords
in most parts of the code. This encapsulates the details of lxyz and makes it easier to adapt.
Checklist
-
I have checked that my code follows the Octopus coding standards
Merge request reports
Activity
changed milestone to %11.0
added Refactoring label
Codecov Report
Merging #1138 (df84e6ef) into develop (88019f8a) will decrease coverage by
0.00%
. The diff coverage is80.00%
.@@ Coverage Diff @@ ## develop #1138 +/- ## =========================================== - Coverage 70.13% 70.13% -0.01% =========================================== Files 515 515 Lines 102769 102783 +14 =========================================== + Hits 72081 72088 +7 - Misses 30688 30695 +7
Impacted Files Coverage Δ src/grid/boundaries.F90 90.07% <ø> (ø)
src/grid/mesh_interpolation.F90 90.90% <ø> (ø)
src/grid/nl_operator.F90 65.74% <0.00%> (-0.34%)
src/hamiltonian/scdm_inc.F90 0.00% <0.00%> (ø)
src/grid/io_function_inc.F90 60.88% <33.33%> (ø)
src/grid/boundaries_inc.F90 78.77% <55.55%> (-0.17%)
src/grid/symmetrizer.F90 94.44% <71.42%> (-3.60%)
src/grid/double_grid.F90 81.48% <100.00%> (+0.23%)
src/grid/mesh.F90 73.15% <100.00%> (+0.14%)
src/grid/mesh_interpolation_inc.F90 97.41% <100.00%> (ø)
... and 9 more
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 88019f8...df84e6e. Read the comment docs.Edited by Codecovassigned to @micael.oliveira
@sohlmann Are there more places in the code where we are accessing
lxyz
andlxyz_inv
? If not, shall we make them private?- Resolved by Micael Oliveira
We use
lxyz_inv
innl_operator
for the GPU part. We would need to port this first, but I haven't looked at the details there.Moreover, we would need to merge the mesh initialization into the main mesh module to make it private. But I would be in favor!
As I just saw,
lxyz_inv
is only used forOperateAccel = nomap
in the NL operator which is not default and marked as experimental.Edited by Sebastian Ohlmannmentioned in commit f72dff49