Skip to content
Snippets Groups Projects
Commit 52c789b4 authored by Fanny CHOPOT's avatar Fanny CHOPOT
Browse files

ajout conditions aux bords dans Gl

parent bd79240e
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ public:
// pas constant
/*
Mesh(const Connectivity& connectivity)
: m_connectivity(connectivity),
m_xr("xr", connectivity.numberOfNodes())
......@@ -60,11 +60,11 @@ public:
m_xr[r][0] = r*delta_x;
});
}
*/
// pas non constant
// pas non constant
/*
Mesh(const Connectivity& connectivity)
: m_connectivity(connectivity),
m_xr("xr", connectivity.numberOfNodes())
......@@ -85,7 +85,7 @@ public:
}
});
}
*/
~Mesh()
{
......
......@@ -109,8 +109,9 @@ private:
//m_Fl(l) = ((sum2/face_nb_cells(l))/Vl(l))*sum;
m_Fl(l) = ((sum2/sum3)/Vl(l))*sum;
// Conditions aux bords
});
// Conditions aux bords
/*
// Essai 1
int cell_here = face_cells(0,0);
......@@ -125,15 +126,15 @@ private:
m_Fl(m_mesh.numberOfFaces()-1) = -(kR(0) + kj(m_mesh.numberOfCells()-1))*0.5*(tensorProduct(uj(m_mesh.numberOfCells()-1), Cjr(m_mesh.numberOfCells()-1,1)));
*/
});
return m_Fl ;
}
// Calcule un Gl
Kokkos::View<Rd*>
computeGl(const Kokkos::View<const Rd*>& uj,
const Kokkos::View<const Rdd*>& Fl) {
const Kokkos::View<const Rdd*>& Fl,
const Kokkos::View<const Rd*>& uL,
const Kokkos::View<const Rd*>& uR) {
const Kokkos::View<const unsigned int**>& face_cells = m_connectivity.faceCells();
......@@ -158,9 +159,9 @@ private:
m_Gl(l) = (1./sum2)*Fl(l)*sum;
});
// Provisoire
m_Gl(0) = 0;
m_Gl(m_mesh.numberOfFaces()-1) = 0;
// Conditions aux bords
m_Gl(0) = Fl(0)*uL(0);
m_Gl(m_mesh.numberOfFaces()-1) = Fl(m_mesh.numberOfFaces()-1)*uR(0);
return m_Gl ;
}
......@@ -196,7 +197,7 @@ private:
Kokkos::View<Rdd*> Fl = m_Fl ;
Fl = computeFl (Cjr, uj, kj, uL, uR, kL, kR);
Kokkos::View<Rd*> Gl = m_Gl ;
Gl = computeGl (uj, Fl );
Gl = computeGl (uj, Fl, uL, uR);
}
Kokkos::View<Rdd*> m_Fl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment