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
052cbb7d
Commit
052cbb7d
authored
7 years ago
by
Fanny CHOPOT
Browse files
Options
Downloads
Patches
Plain Diff
mise a jour
parent
80c28da0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main.cpp
+4
-3
4 additions, 3 deletions
src/main.cpp
src/scheme/FiniteVolumesEulerUnknowns.hpp
+14
-2
14 additions, 2 deletions
src/scheme/FiniteVolumesEulerUnknowns.hpp
with
18 additions
and
5 deletions
src/main.cpp
+
4
−
3
View file @
052cbb7d
...
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
...
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
// ETAPE 1 DU SPLITTING - EULER
// ETAPE 1 DU SPLITTING - EULER
double
dt_euler
=
0.
1
*
acoustic_solver
.
acoustic_dt
(
Vj
,
cj
);
double
dt_euler
=
0.
4
*
acoustic_solver
.
acoustic_dt
(
Vj
,
cj
);
if
(
t
+
dt_euler
>
tmax
)
{
if
(
t
+
dt_euler
>
tmax
)
{
dt_euler
=
tmax
-
t
;
dt_euler
=
tmax
-
t
;
...
@@ -273,7 +273,7 @@ int main(int argc, char *argv[])
...
@@ -273,7 +273,7 @@ int main(int argc, char *argv[])
*/
*/
// ENTROPY TEST
// ENTROPY TEST
finite_volumes_diffusion
.
entropie
(
unknowns
);
//
finite_volumes_diffusion.entropie(unknowns);
}
}
...
@@ -365,10 +365,11 @@ int main(int argc, char *argv[])
...
@@ -365,10 +365,11 @@ int main(int argc, char *argv[])
const
Kokkos
::
View
<
const
double
*>
rhoj
=
unknowns
.
rhoj
();
const
Kokkos
::
View
<
const
double
*>
rhoj
=
unknowns
.
rhoj
();
const
Kokkos
::
View
<
const
double
*>
pj
=
unknowns
.
pj
();
const
Kokkos
::
View
<
const
double
*>
pj
=
unknowns
.
pj
();
const
Kokkos
::
View
<
const
double
*>
gammaj
=
unknowns
.
gammaj
();
const
Kokkos
::
View
<
const
double
*>
gammaj
=
unknowns
.
gammaj
();
const
Kokkos
::
View
<
const
double
*>
S0
=
unknowns
.
S0
();
std
::
ofstream
fout
(
"S"
);
std
::
ofstream
fout
(
"S"
);
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
]
<<
' '
<<
std
::
log
(
pj
[
j
]
*
std
::
pow
(
rhoj
[
j
],
-
gammaj
[
j
]))
<<
'\n'
;
fout
<<
xj
[
j
][
0
]
<<
' '
<<
std
::
log
(
pj
[
j
]
*
std
::
pow
(
rhoj
[
j
],
-
gammaj
[
j
]))
<<
' '
<<
S0
(
j
)
<<
'\n'
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/scheme/FiniteVolumesEulerUnknowns.hpp
+
14
−
2
View file @
052cbb7d
...
@@ -33,6 +33,7 @@ private:
...
@@ -33,6 +33,7 @@ private:
Kokkos
::
View
<
double
*>
m_kR
;
Kokkos
::
View
<
double
*>
m_kR
;
Kokkos
::
View
<
double
*>
m_entropy
;
Kokkos
::
View
<
double
*>
m_entropy
;
Kokkos
::
View
<
double
*>
m_entropy_new
;
Kokkos
::
View
<
double
*>
m_entropy_new
;
Kokkos
::
View
<
double
*>
m_S0
;
public:
public:
Kokkos
::
View
<
double
*>
rhoj
()
Kokkos
::
View
<
double
*>
rhoj
()
...
@@ -205,6 +206,16 @@ public:
...
@@ -205,6 +206,16 @@ public:
return
m_entropy_new
;
return
m_entropy_new
;
}
}
Kokkos
::
View
<
double
*>
S0
()
{
return
m_S0
;
}
const
Kokkos
::
View
<
const
double
*>
S0
()
const
{
return
m_S0
;
}
// --- Acoustic Solver ---
// --- Acoustic Solver ---
void
initializeSod
()
void
initializeSod
()
...
@@ -285,6 +296,7 @@ public:
...
@@ -285,6 +296,7 @@ public:
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
){
Kokkos
::
parallel_for
(
m_mesh
.
numberOfCells
(),
KOKKOS_LAMBDA
(
const
int
&
j
){
m_entropy
(
j
)
=
std
::
log
(
m_pj
[
j
]
*
std
::
pow
(
m_rhoj
[
j
],
-
m_gammaj
[
j
]));
m_entropy
(
j
)
=
std
::
log
(
m_pj
[
j
]
*
std
::
pow
(
m_rhoj
[
j
],
-
m_gammaj
[
j
]));
m_S0
(
j
)
=
m_entropy
(
j
);
});
});
}
}
...
@@ -371,8 +383,8 @@ public:
...
@@ -371,8 +383,8 @@ public:
m_kL
(
"kL"
,
1
),
m_kL
(
"kL"
,
1
),
m_kR
(
"kR"
,
1
),
m_kR
(
"kR"
,
1
),
m_entropy
(
"entropy"
,
m_mesh
.
numberOfCells
()),
m_entropy
(
"entropy"
,
m_mesh
.
numberOfCells
()),
m_entropy_new
(
"entropy_new"
,
m_mesh
.
numberOfCells
())
m_entropy_new
(
"entropy_new"
,
m_mesh
.
numberOfCells
())
,
m_S0
(
"S0"
,
m_mesh
.
numberOfCells
())
{
{
;
;
}
}
...
...
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