Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
4a8c3da7
Commit
4a8c3da7
authored
6 years ago
by
Fanny CHOPOT
Browse files
Options
Downloads
Patches
Plain Diff
correction CL pour nu, T et flux nu partial_x T
parent
aab22b2b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main.cpp
+3
-3
3 additions, 3 deletions
src/main.cpp
src/scheme/FiniteVolumesDiffusion.hpp
+20
-7
20 additions, 7 deletions
src/scheme/FiniteVolumesDiffusion.hpp
src/scheme/FiniteVolumesEulerUnknowns.hpp
+1
-1
1 addition, 1 deletion
src/scheme/FiniteVolumesEulerUnknowns.hpp
with
24 additions
and
11 deletions
src/main.cpp
+
3
−
3
View file @
4a8c3da7
...
@@ -613,7 +613,7 @@ int main(int argc, char *argv[])
...
@@ -613,7 +613,7 @@ int main(int argc, char *argv[])
const
Kokkos
::
View
<
const
Rd
*>
xj
=
mesh_data
.
xj
();
const
Kokkos
::
View
<
const
Rd
*>
xj
=
mesh_data
.
xj
();
const
Kokkos
::
View
<
const
double
*>
rhoj
=
unknowns
.
rhoj
();
const
Kokkos
::
View
<
const
double
*>
rhoj
=
unknowns
.
rhoj
();
double
h
=
std
::
sqrt
(
1.
-
(
tmax
*
tmax
)
/
(
50.
/
9.
));
double
h
=
std
::
sqrt
(
1.
-
(
tmax
*
tmax
)
/
(
50.
/
9.
));
std
::
ofstream
fout
(
"rho
1600
"
);
std
::
ofstream
fout
(
"rho"
);
fout
.
precision
(
15
);
fout
.
precision
(
15
);
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
fout
<<
xj
[
j
][
0
]
<<
' '
<<
rhoj
[
j
]
<<
' '
<<
std
::
sqrt
((
3.
*
((
xj
[
j
][
0
]
*
xj
[
j
][
0
])
/
(
h
*
h
))
+
100.
)
/
100.
)
/
h
<<
'\n'
;
// kidder
fout
<<
xj
[
j
][
0
]
<<
' '
<<
rhoj
[
j
]
<<
' '
<<
std
::
sqrt
((
3.
*
((
xj
[
j
][
0
]
*
xj
[
j
][
0
])
/
(
h
*
h
))
+
100.
)
/
100.
)
/
h
<<
'\n'
;
// kidder
...
@@ -625,7 +625,7 @@ int main(int argc, char *argv[])
...
@@ -625,7 +625,7 @@ int main(int argc, char *argv[])
const
Kokkos
::
View
<
const
Rd
*>
xj
=
mesh_data
.
xj
();
const
Kokkos
::
View
<
const
Rd
*>
xj
=
mesh_data
.
xj
();
const
Kokkos
::
View
<
const
Rd
*>
uj
=
unknowns
.
uj
();
const
Kokkos
::
View
<
const
Rd
*>
uj
=
unknowns
.
uj
();
double
pi
=
4.
*
std
::
atan
(
1.
);
double
pi
=
4.
*
std
::
atan
(
1.
);
std
::
ofstream
fout
(
"u
1600
"
);
std
::
ofstream
fout
(
"u"
);
fout
.
precision
(
15
);
fout
.
precision
(
15
);
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
...
@@ -642,7 +642,7 @@ int main(int argc, char *argv[])
...
@@ -642,7 +642,7 @@ int main(int argc, char *argv[])
const
Kokkos
::
View
<
const
double
*>
Ej
=
unknowns
.
Ej
();
const
Kokkos
::
View
<
const
double
*>
Ej
=
unknowns
.
Ej
();
//double pi = 4.*std::atan(1.);
//double pi = 4.*std::atan(1.);
double
h
=
std
::
sqrt
(
1.
-
(
tmax
*
tmax
)
/
(
50.
/
9.
));
double
h
=
std
::
sqrt
(
1.
-
(
tmax
*
tmax
)
/
(
50.
/
9.
));
std
::
ofstream
fout
(
"E
1600
"
);
std
::
ofstream
fout
(
"E"
);
fout
.
precision
(
15
);
fout
.
precision
(
15
);
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
...
...
This diff is collapsed.
Click to expand it.
src/scheme/FiniteVolumesDiffusion.hpp
+
20
−
7
View file @
4a8c3da7
...
@@ -192,7 +192,6 @@ private:
...
@@ -192,7 +192,6 @@ private:
m_Gl
(
0
)
=
-
(
t
/
((
50.
/
9.
)
-
t
*
t
))
*
h
*
Fl
(
0
,
0
)
*
x0
(
0
);
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
);
m_Gl
(
m_mesh
.
numberOfFaces
()
-
1
)
=
-
(
t
/
((
50.
/
9.
)
-
t
*
t
))
*
h
*
Fl
(
m_mesh
.
numberOfFaces
()
-
1
,
0
)
*
xmax
(
0
);
return
m_Gl
;
return
m_Gl
;
}
}
...
@@ -239,14 +238,20 @@ private:
...
@@ -239,14 +238,20 @@ private:
});
});
// Conditions aux bords
// Conditions aux bords
/*
int cell_here = face_cells(0,0);
int cell_here = face_cells(0,0);
m_Bl(0) = (nuL(0) + nuj(cell_here))*(1./(2*Vl(0)))*(Tj(cell_here) - TL(0));
m_Bl(0) = (nuL(0) + nuj(cell_here))*(1./(2*Vl(0)))*(Tj(cell_here) - TL(0));
cell_here = face_cells(m_mesh.numberOfFaces()-1,0);
cell_here = face_cells(m_mesh.numberOfFaces()-1,0);
m_Bl(m_mesh.numberOfFaces()-1) = -(nuR(0) + nuj(cell_here))*(1/(2.*Vl(m_mesh.numberOfFaces()-1)))*(Tj(cell_here) - TR(0));
m_Bl(m_mesh.numberOfFaces()-1) = -(nuR(0) + nuj(cell_here))*(1/(2.*Vl(m_mesh.numberOfFaces()-1)))*(Tj(cell_here) - TR(0));
*/
double
h
=
std
::
sqrt
(
1.
-
(
t
*
t
)
/
(
50.
/
9.
));
m_Bl
(
0
)
=
((
1.
+
h
*
x0
[
0
][
0
])
*
3.
*
h
*
x0
[
0
][
0
])
/
(
100.
*
h
*
h
*
h
*
h
);
m_Bl
(
m_mesh
.
numberOfFaces
()
-
1
)
=
((
1.
+
h
*
xmax
[
0
][
0
])
*
3.
*
h
*
xmax
[
0
][
0
])
/
(
100.
*
h
*
h
*
h
*
h
);
return
m_Bl
;
return
m_Bl
;
}
}
...
@@ -413,8 +418,16 @@ public:
...
@@ -413,8 +418,16 @@ public:
//TR(0) = 2-0.5*pi*pi*(std::exp(-2.*t)-1.);
//TR(0) = 2-0.5*pi*pi*(std::exp(-2.*t)-1.);
// Kidder
// Kidder
TL
(
0
)
=
(
1.
/
(
100
*
h
*
h
))
*
((
3.
*
x0
[
0
][
0
]
*
x0
[
0
][
0
])
/
(
h
*
h
)
+
100.
);
/*
TR
(
0
)
=
(
1.
/
(
100
*
h
*
h
))
*
((
3.
*
xmax
[
0
][
0
]
*
xmax
[
0
][
0
])
/
(
h
*
h
)
+
100.
);
TL(0) = (1./(100*h*h))*((3.*h*x0[0][0]*h*x0[0][0])/(h*h) + 100.);
TR(0) = (1./(100*h*h))*((3.*h*xmax[0][0]*h*xmax[0][0])/(h*h) + 100.);
nuL(0) = (h*x0[0][0]+1.)*0.5;
nuR(0) = (h*xmax[0][0]+1.)*0.5;
uL[0] = (-h*x0[0][0]*t)/((50./9.)-t*t);
uR[0] = (-h*xmax[0][0]*t)/((50./9.)-t*t);
kL[0] = h*x0[0][0];
kR[0] = h*xmax[0][0] ;
*/
// Calcule les flux
// Calcule les flux
computeExplicitFluxes
(
uj
,
Cjr
,
kj
,
uL
,
uR
,
kL
,
kR
,
Tj
,
nuj
,
TL
,
TR
,
nuL
,
nuR
,
t
);
computeExplicitFluxes
(
uj
,
Cjr
,
kj
,
uL
,
uR
,
kL
,
kR
,
Tj
,
nuj
,
TL
,
TR
,
nuL
,
nuR
,
t
);
...
@@ -431,8 +444,8 @@ public:
...
@@ -431,8 +444,8 @@ public:
// Mise a jour de la vitesse et de l'energie totale specifique
// Mise a jour de la vitesse et de l'energie totale specifique
const
Kokkos
::
View
<
const
double
*>
inv_mj
=
unknowns
.
invMj
();
const
Kokkos
::
View
<
const
double
*>
inv_mj
=
unknowns
.
invMj
();
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
()
-
2
,
KOKKOS_LAMBDA
(
const
int
&
j
0
)
{
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
)
{
const
int
j
=
j0
+
1
;
//
const int j = j0+1;
Rd
momentum_fluxes
=
zero
;
Rd
momentum_fluxes
=
zero
;
double
energy_fluxes
=
0.
;
double
energy_fluxes
=
0.
;
Rd
trich
=
zero
;
Rd
trich
=
zero
;
...
...
This diff is collapsed.
Click to expand it.
src/scheme/FiniteVolumesEulerUnknowns.hpp
+
1
−
1
View file @
4a8c3da7
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment