Skip to content
Snippets Groups Projects
Commit 1b8899a9 authored by David Seus's avatar David Seus
Browse files

revert taking parallelistation away

parent eb9d6c94
No related branches found
No related tags found
No related merge requests found
...@@ -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)}
......
...@@ -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`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment