51 auto const &box_geo = *system.box_geo;
52 auto const &cell_structure = *system.cell_structure;
57 for (
auto const &p : cell_structure.local_particles()) {
58 auto const pos = box_geo.folded_position(p.pos());
59 positions.push_back(pos[0]);
60 positions.push_back(pos[1]);
61 positions.push_back(pos[2]);
62 auto const dip = p.calc_dip();
63 dipoles.push_back(dip[0]);
64 dipoles.push_back(dip[1]);
65 dipoles.push_back(dip[2]);
70 if (positions.empty())
73 auto const &cell_structure = *
get_system().cell_structure;
75 auto it_potentials = potentials.begin();
76 auto index = std::size_t{0ul};
77 for (
auto &p : cell_structure.local_particles()) {
80 auto const dip = p.calc_dip();
90 {fields[index + 0ul], fields[index + 1ul], fields[index + 2ul]},
91 {fields[index + 1ul], fields[index + 3ul], fields[index + 4ul]},
92 {fields[index + 2ul], fields[index + 4ul], fields[index + 5ul]}};
93 auto const f = G * dip;
99 std::advance(it_potentials, 3);
103 assert(it_potentials == potentials.end());