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
499eba59
Commit
499eba59
authored
7 years ago
by
Fanny CHOPOT
Browse files
Options
Downloads
Patches
Plain Diff
ajout pas de temps dans fichier sortie
parent
b5d91adb
No related branches found
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
+8
-5
8 additions, 5 deletions
src/main.cpp
src/mesh/Mesh.hpp
+2
-2
2 additions, 2 deletions
src/mesh/Mesh.hpp
src/scheme/FiniteVolumesEulerUnknowns.hpp
+3
-3
3 additions, 3 deletions
src/scheme/FiniteVolumesEulerUnknowns.hpp
with
13 additions
and
10 deletions
src/main.cpp
+
8
−
5
View file @
499eba59
...
@@ -141,8 +141,8 @@ int main(int argc, char *argv[])
...
@@ -141,8 +141,8 @@ int main(int argc, char *argv[])
const
Kokkos
::
View
<
const
double
*>
Vj
=
mesh_data
.
Vj
();
const
Kokkos
::
View
<
const
double
*>
Vj
=
mesh_data
.
Vj
();
const
Kokkos
::
View
<
const
Rd
**>
Cjr
=
mesh_data
.
Cjr
();
const
Kokkos
::
View
<
const
Rd
**>
Cjr
=
mesh_data
.
Cjr
();
const
double
tmax
=
0.5
;
const
double
tmax
=
2.
;
double
t
=
0
;
double
t
=
0
.
;
int
itermax
=
std
::
numeric_limits
<
int
>::
max
();
int
itermax
=
std
::
numeric_limits
<
int
>::
max
();
int
iteration
=
0
;
int
iteration
=
0
;
...
@@ -163,6 +163,7 @@ int main(int argc, char *argv[])
...
@@ -163,6 +163,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
();
std
::
ofstream
fout
(
"inter"
);
std
::
ofstream
fout
(
"inter"
);
fout
.
precision
(
15
);
fout
.
precision
(
15
);
fout
<<
std
::
fixed
<<
0.
<<
' '
<<
std
::
fixed
<<
t
<<
'\n'
;
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
fout
<<
std
::
fixed
<<
xj
[
j
][
0
]
<<
' '
<<
std
::
fixed
<<
rhoj
[
j
]
<<
'\n'
;
fout
<<
std
::
fixed
<<
xj
[
j
][
0
]
<<
' '
<<
std
::
fixed
<<
rhoj
[
j
]
<<
'\n'
;
}
}
...
@@ -223,6 +224,8 @@ int main(int argc, char *argv[])
...
@@ -223,6 +224,8 @@ int main(int argc, char *argv[])
//fout.clear();
//fout.clear();
//fout.seekp(0, std::ios::beg);
//fout.seekp(0, std::ios::beg);
std
::
string
ligne
;
std
::
string
ligne
;
getline
(
fint
,
ligne
);
fout
<<
ligne
<<
' '
<<
std
::
fixed
<<
t
<<
'\n'
;
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
getline
(
fint
,
ligne
);
getline
(
fint
,
ligne
);
fout
<<
ligne
<<
' '
<<
std
::
fixed
<<
rhoj
[
j
]
<<
'\n'
;
fout
<<
ligne
<<
' '
<<
std
::
fixed
<<
rhoj
[
j
]
<<
'\n'
;
...
@@ -233,8 +236,8 @@ int main(int argc, char *argv[])
...
@@ -233,8 +236,8 @@ int main(int argc, char *argv[])
std
::
ifstream
rint
(
"film_rho"
);
std
::
ifstream
rint
(
"film_rho"
);
std
::
ofstream
rout
(
"inter"
,
std
::
ios
::
trunc
);
std
::
ofstream
rout
(
"inter"
,
std
::
ios
::
trunc
);
fout
.
precision
(
15
);
fout
.
precision
(
15
);
//fout.clear(
);
getline
(
rint
,
ligne
);
//fout.seekp(0, std::ios::beg)
;
rout
<<
ligne
<<
'\n'
;
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
getline
(
rint
,
ligne
);
getline
(
rint
,
ligne
);
rout
<<
ligne
<<
'\n'
;
rout
<<
ligne
<<
'\n'
;
...
@@ -290,7 +293,7 @@ int main(int argc, char *argv[])
...
@@ -290,7 +293,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
1.5
"
);
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
]
<<
'\n'
;
fout
<<
xj
[
j
][
0
]
<<
' '
<<
rhoj
[
j
]
<<
'\n'
;
...
...
This diff is collapsed.
Click to expand it.
src/mesh/Mesh.hpp
+
2
−
2
View file @
499eba59
...
@@ -80,8 +80,8 @@ public:
...
@@ -80,8 +80,8 @@ public:
m_x0
(
"x0"
,
1
),
m_x0
(
"x0"
,
1
),
m_xmax
(
"xmax"
,
1
)
m_xmax
(
"xmax"
,
1
)
{
{
double
a
=
0.
1
;
double
a
=
0.
;
double
b
=
1.
;
double
b
=
1
0
.
;
m_x0
[
0
][
0
]
=
a
;
m_x0
[
0
][
0
]
=
a
;
m_xmax
[
0
][
0
]
=
b
;
m_xmax
[
0
][
0
]
=
b
;
const
double
delta_x
=
(
b
-
a
)
/
connectivity
.
numberOfCells
();
const
double
delta_x
=
(
b
-
a
)
/
connectivity
.
numberOfCells
();
...
...
This diff is collapsed.
Click to expand it.
src/scheme/FiniteVolumesEulerUnknowns.hpp
+
3
−
3
View file @
499eba59
...
@@ -241,7 +241,7 @@ public:
...
@@ -241,7 +241,7 @@ public:
if
(
xj
[
j
][
0
]
<
0.7
)
{
if
(
xj
[
j
][
0
]
<
0.7
)
{
m_kj
[
j
]
=
0.
;
m_kj
[
j
]
=
0.
;
}
else
{
}
else
{
if
(
xj
[
j
][
0
]
<
0.
85
){
if
(
xj
[
j
][
0
]
<
0.
9
){
m_kj
[
j
]
=
0.5
;
m_kj
[
j
]
=
0.5
;
}
else
{
}
else
{
m_kj
[
j
]
=
0.
;
m_kj
[
j
]
=
0.
;
...
@@ -253,8 +253,8 @@ public:
...
@@ -253,8 +253,8 @@ public:
m_uL
[
0
]
=
zero
;
m_uL
[
0
]
=
zero
;
m_uR
[
0
]
=
zero
;
m_uR
[
0
]
=
zero
;
m_kL
[
0
]
=
0.
01
;
m_kL
[
0
]
=
0.
;
m_kR
[
0
]
=
0.
5
;
m_kR
[
0
]
=
0.
;
}
}
...
...
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