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
661f8bbf
Commit
661f8bbf
authored
7 years ago
by
Fanny CHOPOT
Browse files
Options
Downloads
Patches
Plain Diff
ajout fichier k indicateur zone k non nul
parent
39342952
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.cpp
+40
-1
40 additions, 1 deletion
src/main.cpp
with
40 additions
and
1 deletion
src/main.cpp
+
40
−
1
View file @
661f8bbf
...
@@ -195,6 +195,19 @@ int main(int argc, char *argv[])
...
@@ -195,6 +195,19 @@ int main(int argc, char *argv[])
tempo
<<
std
::
fixed
<<
t
<<
'\n'
;
tempo
<<
std
::
fixed
<<
t
<<
'\n'
;
tempo
.
close
();
tempo
.
close
();
// Fichier k indicateur
std
::
ofstream
diff
(
"diffinter"
);
diff
.
precision
(
5
);
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
//diff << std::fixed << xj[j][0] << ' ' << std::fixed << kj[j] << '\n';
if
(
kj
[
j
]
>
0.
)
{
diff
<<
std
::
fixed
<<
xj
[
j
][
0
]
<<
' '
<<
std
::
fixed
<<
4.
<<
'\n'
;
}
else
{
diff
<<
std
::
fixed
<<
xj
[
j
][
0
]
<<
' '
<<
std
::
fixed
<<
0.
<<
'\n'
;
}
}
diff
.
close
();
while
((
t
<
tmax
)
and
(
iteration
<
itermax
))
{
while
((
t
<
tmax
)
and
(
iteration
<
itermax
))
{
...
@@ -264,7 +277,7 @@ int main(int argc, char *argv[])
...
@@ -264,7 +277,7 @@ int main(int argc, char *argv[])
// ECRITURE DANS UN FICHIER
// ECRITURE DANS UN FICHIER
if
((
std
::
fmod
(
t
,
0.001
)
<
0.0001
)
or
(
t
==
tmax
))
{
//
if ((std::fmod(t,0.001) < 0.0001) or (t == tmax)) {
std
::
string
ligne
;
std
::
string
ligne
;
...
@@ -334,7 +347,33 @@ int main(int argc, char *argv[])
...
@@ -334,7 +347,33 @@ int main(int argc, char *argv[])
tempo
<<
std
::
fixed
<<
t
<<
'\n'
;
tempo
<<
std
::
fixed
<<
t
<<
'\n'
;
tempo
.
close
();
tempo
.
close
();
// k
std
::
ifstream
diffint
(
"diffinter"
);
std
::
ofstream
diffout
(
"k"
,
std
::
ios
::
trunc
);
diffout
.
precision
(
5
);
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
getline
(
diffint
,
ligne
);
//diffout << ligne << ' ' << std::fixed << xj[j][0] << ' ' << std::fixed << kj[j] << '\n';
if
(
kj
[
j
]
>
0.
)
{
diffout
<<
ligne
<<
' '
<<
std
::
fixed
<<
xj
[
j
][
0
]
<<
' '
<<
std
::
fixed
<<
4.
<<
'\n'
;
}
else
{
diffout
<<
ligne
<<
' '
<<
std
::
fixed
<<
xj
[
j
][
0
]
<<
' '
<<
std
::
fixed
<<
0.
<<
'\n'
;
}
}
diffint
.
close
();
diffout
.
close
();
std
::
ifstream
riffint
(
"k"
);
std
::
ofstream
riffout
(
"diffinter"
,
std
::
ios
::
trunc
);
for
(
size_t
j
=
0
;
j
<
mesh
.
numberOfCells
();
++
j
)
{
getline
(
riffint
,
ligne
);
riffout
<<
ligne
<<
'\n'
;
}
}
riffint
.
close
();
riffout
.
close
();
//}
// ENTROPY TEST
// ENTROPY TEST
//finite_volumes_diffusion.entropie(unknowns);
//finite_volumes_diffusion.entropie(unknowns);
...
...
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