58 const Domaine_VEF& domaine_VEF = le_dom_VEF.valeur();
68 Cerr <<
"Error in Masse_VEF_P1NC: ";
69 Cerr <<
"number of faces: " << nfa
70 <<
" size of right-hand side: " << tab_sm.
dimension(0) << finl;
76 CDoubleArrView volumes_entrelaces = tab_volumes_entrelaces.view_ro();
77 DoubleTabView sm = tab_sm.
view_rw();
79 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__),
80 Kokkos::MDRangePolicy<Kokkos::Rank<2>>({num_std,0}, {nfa,nbcomp}),
81 KOKKOS_LAMBDA(
int face,
int comp)
83 sm(face, comp) /= (volumes_entrelaces(face) * porosite_face(face));
85 end_gpu_timer(__KERNEL_NAME__);
92 CIntTabView face_voisins = domaine_VEF.
face_voisins().view_ro();
93 CDoubleTabView normales = domaine_VEF.
face_normales().view_ro();
95 for (
int n_bord = 0; n_bord < domaine_VEF.
nb_front_Cl(); n_bord++)
100 int num2 = num1 + le_bord.
nb_faces();
102 if ((sub_type(
Dirichlet,la_cl.valeur())) ||
106 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__),
107 range_1D(num1, num2),
108 KOKKOS_LAMBDA(
const int face)
110 for (
int comp = 0; comp < nbcomp; comp++)
113 end_gpu_timer(__KERNEL_NAME__);
117 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__),
118 range_1D(num1, num2),
119 KOKKOS_LAMBDA(
const int face)
123 for (
int comp = 0; comp < nbcomp; comp++)
125 psc += sm(face,comp) * normales(face,comp);
126 surf += normales(face,comp) * normales(face,comp);
129 for(
int comp = 0; comp < nbcomp; comp++)
131 sm(face,comp) -= psc * normales(face,comp);
132 sm(face,comp) /= (volumes_entrelaces_Cl(face) *
133 porosite_face(face));
136 end_gpu_timer(__KERNEL_NAME__);
140 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__),
141 range_1D(num1, num2),
145 int elem = face_voisins(face, 0);
146 if (elem == -1) elem = face_voisins(face, 1);
147 for (
int comp = 0; comp < nbcomp; comp++)
148 sm(face, comp) /= (volumes_entrelaces_Cl(face) * porosite_face(face));
150 end_gpu_timer(__KERNEL_NAME__);
154 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__),
155 range_2D({num_int,0}, {num_std,nbcomp}),
156 KOKKOS_LAMBDA(
int face,
int comp)
158 sm(face,comp) /= (volumes_entrelaces_Cl(face) * porosite_face(face));
160 end_gpu_timer(__KERNEL_NAME__);
DoubleVect & volumes_entrelaces_Cl()
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
const Cond_lim & les_conditions_limites(int) const
Returns the i-th boundary condition.
int premiere_face_std() const
int nb_faces() const
Returns the total number of faces.
DoubleVect & volumes_entrelaces()
virtual double face_normales(int face, int comp) const
int premiere_face_int() const
A face is internal if and only if it separates two elements.
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.