26 using namespace shamrock::patch;
35 return storage.merged_patchdata_ghost.get().get(id).total_elements;
43 MergedPDat &mpdat = storage.merged_patchdata_ghost.get().get(p.id_patch);
49 = storage.face_lists.get().get(p.id_patch);
55 Tscal coord_conv_fact = solver_config.grid_coord_to_pos_fact;
65 auto cell_max = buf_cell_max.get_read_access(depends_list);
68 auto grad_u = buf_grad_u.get_write_access(depends_list);
70 auto faces_xm_ptr = face_xm.neigh_info.get_read_access(depends_list);
72 auto e = q.
submit(depends_list, [&](sycl::handler &cgh) {
75 shambase::parallel_for(cgh, pdat.get_obj_cnt(),
"subsetp1", [=](
u64 id_a) {
76 Tvec cell2_a = (cell_min[id_a] + cell_max[id_a]).template convert<Tscal>()
77 * coord_conv_fact * 0.5f;
79 Tvec sum_grad_ux = {};
83 faces_xm.for_each_object(id_a, [&](
u32 id_b) {
84 Tvec cell2_b = (cell_min[id_b] + cell_max[id_b]).
template convert<Tscal>()
85 * coord_conv_fact * 0.5f;
88 Tscal dr_proj = sycl::dot(cell2_b - cell2_a, n);
90 Tvec drm1_n = n / dr_proj;
99 buf_cell_min.complete_event_state(e);
100 buf_cell_max.complete_event_state(e);
101 buf_vel.complete_event_state(e);
102 buf_grad_u.complete_event_state(e);
106 face_xm.neigh_info.complete_event_state(resulting_events);
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...