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

modification R(t) a la place de x(t) dans Fl et Gl

parent 180a9c36
No related branches found
No related tags found
No related merge requests found
......@@ -80,8 +80,8 @@ public:
m_x0("x0", 1),
m_xmax("xmax", 1)
{
double a = 0.1;
double b = 1.;
double a = 0.;
double b = 10.;
m_x0[0][0] = a;
m_xmax[0][0] = b;
const double delta_x = (b-a)/connectivity.numberOfCells();
......
......@@ -95,6 +95,8 @@ private:
const Kokkos::View<const double*>& Vl = m_mesh_data.Vl();
const Kokkos::View<const double*>& Vj = m_mesh_data.Vj();
const Kokkos::View<const Rd*> xr = m_mesh.xr();
const Kokkos::View<const Rd*> x0 = m_mesh.x0();
const Kokkos::View<const Rd*> xmax = m_mesh.xmax();
Kokkos::parallel_for(m_mesh.numberOfFaces(), KOKKOS_LAMBDA(const int& l) {
Rdd sum = zero;
......@@ -129,8 +131,12 @@ private:
//m_Fl(m_mesh.numberOfFaces()-1,0) = -(t/((50./9.)-t*t))*0.5;
// k = x
m_Fl(0,0) = -(t/((50./9.)-t*t))*xr[0][0];
m_Fl(m_mesh.numberOfFaces()-1,0) = -(t/((50./9.)-t*t))*xr[m_mesh.numberOfFaces()-1][0];
//m_Fl(0,0) = -(t/((50./9.)-t*t))*xr[0][0];
//m_Fl(m_mesh.numberOfFaces()-1,0) = -(t/((50./9.)-t*t))*xr[m_mesh.numberOfFaces()-1][0];
double h = std::sqrt(1. - (t*t)/(50./9.));
m_Fl(0,0) = -(t/((50./9.)-t*t))*h*x0[0][0];
m_Fl(m_mesh.numberOfFaces()-1,0) = -(t/((50./9.)-t*t))*h*xmax[0][0];
return m_Fl ;
}
......@@ -154,6 +160,8 @@ private:
const Kokkos::View<const double*>& Vj = m_mesh_data.Vj();
const Kokkos::View<const Rd*> xr = m_mesh.xr();
const Kokkos::View<const Rd*> x0 = m_mesh.x0();
const Kokkos::View<const Rd*> xmax = m_mesh.xmax();
Kokkos::parallel_for(m_mesh.numberOfFaces(), KOKKOS_LAMBDA(const int& l) {
Rd sum = zero;
......@@ -171,8 +179,12 @@ private:
// m_Gl(0) = Fl(0)*uL(0);
//m_Gl(m_mesh.numberOfFaces()-1) = Fl(m_mesh.numberOfFaces()-1)*uR(0);
m_Gl(0) = -(t/((50./9.)-t*t))*Fl(0,0)*xr(0);
m_Gl(m_mesh.numberOfFaces()-1) = -(t/((50./9.)-t*t))*Fl(m_mesh.numberOfFaces()-1,0)*xr(m_mesh.numberOfFaces()-1);
//m_Gl(0) = -(t/((50./9.)-t*t))*Fl(0,0)*xr(0);
//m_Gl(m_mesh.numberOfFaces()-1) = -(t/((50./9.)-t*t))*Fl(m_mesh.numberOfFaces()-1,0)*xr(m_mesh.numberOfFaces()-1);
double h = std::sqrt(1. - (t*t)/(50./9.));
m_Gl(0) = -(t/((50./9.)-t*t))*h*Fl(0,0)*x0(0);
m_Gl(m_mesh.numberOfFaces()-1) = -(t/((50./9.)-t*t))*h*Fl(m_mesh.numberOfFaces()-1,0)*xmax(0);
return m_Gl ;
......
......@@ -191,7 +191,8 @@ public:
const Kokkos::View<const Rd*> xj = m_mesh_data.xj();
Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){
/*if (xj[j][0]<0.5) {
/*
if (xj[j][0]<0.5) {
m_rhoj[j]=1;
} else {
m_rhoj[j]=0.125;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment