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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Seus
LDD-for-two-phase-flow-systems
Commits
1b8899a9
Commit
1b8899a9
authored
4 years ago
by
David Seus
Browse files
Options
Downloads
Patches
Plain Diff
revert taking parallelistation away
parent
eb9d6c94
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
LDDsimulation/LDDsimulation.py
+7
-7
7 additions, 7 deletions
LDDsimulation/LDDsimulation.py
LDDsimulation/solutionFile.py
+2
-2
2 additions, 2 deletions
LDDsimulation/solutionFile.py
with
9 additions
and
9 deletions
LDDsimulation/LDDsimulation.py
+
7
−
7
View file @
1b8899a9
...
@@ -30,7 +30,7 @@ class LDDsimulation(object):
...
@@ -30,7 +30,7 @@ class LDDsimulation(object):
def
__init__
(
self
,
dimension
:
int
=
2
,
#
def
__init__
(
self
,
dimension
:
int
=
2
,
#
debug
:
bool
=
False
,
#
debug
:
bool
=
False
,
#
tol
:
float
=
None
,
#
tol
:
float
=
1E-14
,
#
LDDsolver_tol
:
float
=
1E-8
,
LDDsolver_tol
:
float
=
1E-8
,
# maximal number of L-iterations that the LDD solver uses.
# maximal number of L-iterations that the LDD solver uses.
max_iter_num
:
int
=
1000
,
max_iter_num
:
int
=
1000
,
...
@@ -88,8 +88,8 @@ class LDDsimulation(object):
...
@@ -88,8 +88,8 @@ class LDDsimulation(object):
# # no sponge zones
# # no sponge zones
# self.sponge = False
# self.sponge = False
# set up mpi for internal parallelisation.
# set up mpi for internal parallelisation.
#
self._mpi_rank = df.MPI.rank(df.MPI.comm_world)
self
.
_mpi_rank
=
df
.
MPI
.
rank
(
df
.
MPI
.
comm_world
)
#
self._mpi_communicator = df.MPI.comm_world
self
.
_mpi_communicator
=
df
.
MPI
.
comm_world
## Public variables.
## Public variables.
...
@@ -606,8 +606,8 @@ class LDDsimulation(object):
...
@@ -606,8 +606,8 @@ class LDDsimulation(object):
filename
=
self
.
output_dir
+
self
.
output_filename_parameter_part
[
ind
]
\
filename
=
self
.
output_dir
+
self
.
output_filename_parameter_part
[
ind
]
\
+
"
solution_iterations_at_timestep
"
\
+
"
solution_iterations_at_timestep
"
\
+
"
{number}
"
.
format
(
number
=
self
.
timestep_num
)
+
"
.xdmf
"
+
"
{number}
"
.
format
(
number
=
self
.
timestep_num
)
+
"
.xdmf
"
solution_over_iteration_within_timestep
.
update
(
#
self._mpi_communicator,
solution_over_iteration_within_timestep
.
update
(
#
{
ind
:
SolutionFile
(
filename
)}
{
ind
:
SolutionFile
(
self
.
_mpi_communicator
,
filename
)}
)
)
# reset all interface[has_interface].current_iteration[ind] = 0, for
# reset all interface[has_interface].current_iteration[ind] = 0, for
...
@@ -881,8 +881,8 @@ class LDDsimulation(object):
...
@@ -881,8 +881,8 @@ class LDDsimulation(object):
self
.
output_filename_parameter_part
.
update
(
self
.
output_filename_parameter_part
.
update
(
{
subdom_ind
:
filename_param_part
}
{
subdom_ind
:
filename_param_part
}
)
)
self
.
solution_file
.
update
(
#
self._mpi_communicator,
self
.
solution_file
.
update
(
#
{
subdom_ind
:
SolutionFile
(
filename
)}
{
subdom_ind
:
SolutionFile
(
self
.
_mpi_communicator
,
filename
)}
)
)
# self.postprocessed_solution_file.update(
# self.postprocessed_solution_file.update(
# {subdom_ind: SolutionFile(self._mpi_communicator, post_filename)}
# {subdom_ind: SolutionFile(self._mpi_communicator, post_filename)}
...
...
This diff is collapsed.
Click to expand it.
LDDsimulation/solutionFile.py
+
2
−
2
View file @
1b8899a9
...
@@ -6,8 +6,8 @@ class SolutionFile(df.XDMFFile):
...
@@ -6,8 +6,8 @@ class SolutionFile(df.XDMFFile):
This class extends `df.XDMFFile` with some minor changes for convenience.
This class extends `df.XDMFFile` with some minor changes for convenience.
"""
"""
def
__init__
(
self
,
mpicomm
,
filepath
):
def
__init__
(
self
,
mpicomm
,
filepath
):
df
.
XDMFFile
.
__init__
(
self
,
filepath
)
df
.
XDMFFile
.
__init__
(
self
,
mpicomm
,
filepath
)
# mpicomm,
self
.
parameters
[
"
functions_share_mesh
"
]
=
True
self
.
parameters
[
"
functions_share_mesh
"
]
=
True
self
.
parameters
[
"
flush_output
"
]
=
True
self
.
parameters
[
"
flush_output
"
]
=
True
self
.
path
=
filepath
# Mimic the file path attribute from a `file` returned by `open`
self
.
path
=
filepath
# Mimic the file path attribute from a `file` returned by `open`
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