Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LDD-for-two-phase-flow-systems
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Seus
LDD-for-two-phase-flow-systems
Commits
b13f64b7
Commit
b13f64b7
authored
Sep 3, 2019
by
David Seus
Browse files
Options
Downloads
Patches
Plain Diff
remove redundantly writing pressures to interfaces in _init_initial_values
parent
47ea421c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
LDDsimulation/LDDsimulation.py
+13
-11
13 additions, 11 deletions
LDDsimulation/LDDsimulation.py
with
13 additions
and
11 deletions
LDDsimulation/LDDsimulation.py
+
13
−
11
View file @
b13f64b7
...
@@ -525,9 +525,8 @@ class LDDsimulation(object):
...
@@ -525,9 +525,8 @@ class LDDsimulation(object):
)
)
# prepare next iteration
# prepare next iteration
# write the newly calculated solution to the inteface dictionaries
# write the newly calculated solution to the inte
r
face dictionaries
# of the subdomain for communication.
# of the subdomain for communication.
if
self
.
interface_def_points
is
not
None
:
subdomain
.
write_pressure_to_interfaces
()
subdomain
.
write_pressure_to_interfaces
()
if
analyse_timestep
:
if
analyse_timestep
:
...
@@ -628,8 +627,8 @@ class LDDsimulation(object):
...
@@ -628,8 +627,8 @@ class LDDsimulation(object):
self
.
update_DirichletBC_dictionary
(
time
=
time
,
#
self
.
update_DirichletBC_dictionary
(
time
=
time
,
#
subdomain_index
=
ind
,
subdomain_index
=
ind
,
)
)
#
#
this is the beginning of the solver, so iteration must be set
# this is the beginning of the solver, so iteration must be set
#
#
to 0.
# to 0.
subdomain
.
iteration_number
=
0
subdomain
.
iteration_number
=
0
for
phase
in
subdomain
.
has_phases
:
for
phase
in
subdomain
.
has_phases
:
# evaluate the sources to the current time.
# evaluate the sources to the current time.
...
@@ -639,9 +638,11 @@ class LDDsimulation(object):
...
@@ -639,9 +638,11 @@ class LDDsimulation(object):
print
(
colored
(
f
"
id(subdomain
{
subdomain
.
subdomain_index
}
.pressure_prev_timestep[
{
phase
}
])
"
,
"
red
"
),
"
=
\n
"
,
f
"
{
id
(
subdomain
.
pressure_prev_timestep
[
phase
])
}
"
)
print
(
colored
(
f
"
id(subdomain
{
subdomain
.
subdomain_index
}
.pressure_prev_timestep[
{
phase
}
])
"
,
"
red
"
),
"
=
\n
"
,
f
"
{
id
(
subdomain
.
pressure_prev_timestep
[
phase
])
}
"
)
print
(
f
"
subdomain
{
subdomain
.
subdomain_index
}
.pressure_prev_timestep[
{
phase
}
].vector()[:]
"
,
"
=
\n
"
,
f
"
{
subdomain
.
pressure_prev_timestep
[
phase
].
vector
()[
:
]
}
"
)
print
(
f
"
subdomain
{
subdomain
.
subdomain_index
}
.pressure_prev_timestep[
{
phase
}
].vector()[:]
"
,
"
=
\n
"
,
f
"
{
subdomain
.
pressure_prev_timestep
[
phase
].
vector
()[
:
]
}
"
)
print
(
f
"
subdomain
{
subdomain
.
subdomain_index
}
.pressure[
{
phase
}
].vector()[:]
"
,
"
=
\n
"
,
f
"
{
subdomain
.
pressure
[
phase
].
vector
()[
:
]
}
"
)
print
(
f
"
subdomain
{
subdomain
.
subdomain_index
}
.pressure[
{
phase
}
].vector()[:]
"
,
"
=
\n
"
,
f
"
{
subdomain
.
pressure
[
phase
].
vector
()[
:
]
}
"
)
subdomain
.
pressure_prev_timestep
[
phase
].
assign
(
subdomain
.
pressure_prev_timestep
[
phase
].
assign
(
subdomain
.
pressure
[
phase
]
subdomain
.
pressure
[
phase
]
)
)
if
debug
:
if
debug
:
print
(
colored
(
f
"
id(subdomain
{
subdomain
.
subdomain_index
}
.pressure[
{
phase
}
])
"
,
"
red
"
),
"
=
\n
"
,
f
"
{
id
(
subdomain
.
pressure
[
phase
])
}
"
)
print
(
colored
(
f
"
id(subdomain
{
subdomain
.
subdomain_index
}
.pressure[
{
phase
}
])
"
,
"
red
"
),
"
=
\n
"
,
f
"
{
id
(
subdomain
.
pressure
[
phase
])
}
"
)
print
(
f
"
subdomain
{
subdomain
.
subdomain_index
}
.pressure_prev_timestep[
{
phase
}
].vector()[:]
"
,
"
=
\n
"
,
f
"
{
subdomain
.
pressure_prev_timestep
[
phase
].
vector
()[
:
]
}
"
)
print
(
f
"
subdomain
{
subdomain
.
subdomain_index
}
.pressure_prev_timestep[
{
phase
}
].vector()[:]
"
,
"
=
\n
"
,
f
"
{
subdomain
.
pressure_prev_timestep
[
phase
].
vector
()[
:
]
}
"
)
...
@@ -1217,12 +1218,13 @@ class LDDsimulation(object):
...
@@ -1217,12 +1218,13 @@ class LDDsimulation(object):
data_set_name
=
data_set_name
data_set_name
=
data_set_name
)
)
# populate interface dictionaries with pressure values. The calc_gli_term
# this is also being done in the self.prepare_LDDsolver method!!!!
# of each subdomain reads from the interface.pressure_values_prev
# # populate interface dictionaries with pressure values. The calc_gli_term
# and from interface.pressure_values dictionary so both need to be populated.
# # of each subdomain reads from the interface.pressure_values_prev
if
self
.
interface_def_points
is
not
None
:
# # and from interface.pressure_values dictionary so both need to be populated.
subdomain
.
write_pressure_to_interfaces
()
# if self.interface_def_points is not None:
subdomain
.
write_pressure_to_interfaces
(
previous_iter
=
True
)
# subdomain.write_pressure_to_interfaces()
# subdomain.write_pressure_to_interfaces(previous_iter = True)
subdomain
.
write_solution_to_xdmf
(
#
subdomain
.
write_solution_to_xdmf
(
#
file
=
self
.
solution_file
[
num
],
#
file
=
self
.
solution_file
[
num
],
#
...
...
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