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

correction maillage aleatoire

parent 7f1e452a
No related branches found
No related tags found
No related merge requests found
......@@ -143,10 +143,11 @@ public:
m_xr[connectivity.numberOfNodes()-1][0] = b;
std::random_device rd;
std::mt19937 mt(rd());
std::uniform_real_distribution<double> dist(h/1.01,h);
std::uniform_real_distribution<double> dist(-h/2.1,h/2.1);
for (int r=1; r<connectivity.numberOfNodes()-1; ++r){
const double delta_xr = dist(mt);
m_xr[r][0] = m_xr[r-1][0] + std::abs(delta_xr);
// m_xr[r][0] = m_xr[r-1][0] + std::abs(delta_xr);
m_xr[r][0] = r*h + delta_xr;
std::cout << m_xr[r][0] << std::endl;
}
std::exit(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment