|
5 | 5 | #include "source_io/module_output/output_log.h" |
6 | 6 | #include "source_cell/module_neighlist/neighbor_types.h" |
7 | 7 | #include "source_cell/module_neighlist/neighbor_search.h" |
| 8 | +#include "source_cell/md_cell.h" |
8 | 9 | #include "source_base/global_variable.h" |
9 | 10 | #include "source_base/timer.h" |
10 | 11 | #ifdef __MPI |
11 | | -#include "source_cell/module_neighlist/domain_decomposition.h" |
12 | 12 | #include "source_base/parallel_reduce.h" |
13 | 13 | #endif |
14 | 14 |
|
@@ -58,13 +58,8 @@ void ESolver_LJ::runner(BaseCell& cell, const int istep) |
58 | 58 | { |
59 | 59 | ModuleBase::timer::start("ESolverLJ", "mpi_total"); |
60 | 60 | ModuleBase::timer::start("ESolverLJ", "neigh_init"); |
61 | | - DomainDecomposition decomp; |
62 | | - decomp.init(MPI_COMM_WORLD, ucell.latvec, ucell.lat0, search_radius, 0.0); |
63 | | - std::vector<LocalAtom> owned_atoms; |
64 | | - std::vector<LocalAtom> ghost_atoms; |
65 | | - decomp.split_owned_atoms_from_ucell(ucell, owned_atoms); |
66 | | - decomp.exchange_ghost_atoms(owned_atoms, ghost_atoms); |
67 | | - neighbor_search.init_distributed(owned_atoms, ghost_atoms, search_radius, ucell.lat0); |
| 61 | + MDCell mdcell(ucell, MPI_COMM_WORLD, search_radius, 0.0); |
| 62 | + neighbor_search.init(mdcell, search_radius); |
68 | 63 | ModuleBase::timer::end("ESolverLJ", "neigh_init"); |
69 | 64 | ModuleBase::timer::start("ESolverLJ", "neigh_bld"); |
70 | 65 | neighbor_search.build_neighbors(); |
|
0 commit comments