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

fix wrong order of loops in write_exact_solution_to_xdmf

parent 51e66ebc
No related branches found
No related tags found
No related merge requests found
...@@ -672,9 +672,9 @@ class LDDsimulation(object): ...@@ -672,9 +672,9 @@ class LDDsimulation(object):
all timesteps and write it to the solution file. all timesteps and write it to the solution file.
""" """
t = copy.copy(self.starttime) t = copy.copy(self.starttime)
for timestep in range(0,self.number_of_timesteps+1):
for subdom_ind, subdomain in self.subdomain.items(): for subdom_ind, subdomain in self.subdomain.items():
file = self.solution_file[subdom_ind] file = self.solution_file[subdom_ind]
for timestep in range(0,self.number_of_timesteps+1):
for phase in subdomain.has_phases: for phase in subdomain.has_phases:
pa_exact = subdomain.pressure_exact[phase] pa_exact = subdomain.pressure_exact[phase]
pa_exact.t = t pa_exact.t = t
...@@ -682,8 +682,8 @@ class LDDsimulation(object): ...@@ -682,8 +682,8 @@ class LDDsimulation(object):
tmp_exact_pressure.rename("exact_pressure_"+"{}".format(phase), "exactpressure_"+"{}".format(phase)) tmp_exact_pressure.rename("exact_pressure_"+"{}".format(phase), "exactpressure_"+"{}".format(phase))
file.write(tmp_exact_pressure, t) file.write(tmp_exact_pressure, t)
file.close()
t += self.timestep_size t += self.timestep_size
file.close()
def write_subsequent_errors_to_csv(self,# def write_subsequent_errors_to_csv(self,#
filename: str, # filename: str, #
...@@ -1017,7 +1017,7 @@ class LDDsimulation(object): ...@@ -1017,7 +1017,7 @@ class LDDsimulation(object):
subdomain.pressure_prev_iter[phase].assign(pa0_interpolated) subdomain.pressure_prev_iter[phase].assign(pa0_interpolated)
subdomain.pressure_prev_timestep[phase].assign(pa0_interpolated) subdomain.pressure_prev_timestep[phase].assign(pa0_interpolated)
# populate interface dictionaries with pressure values. The calc_gli_method # populate interface dictionaries with pressure values. The calc_gli_term
# of each subdomain reads from the interface.pressure_values_prev # of each subdomain reads from the interface.pressure_values_prev
# and from interface.pressure_values dictionary so both need to be populated. # and from interface.pressure_values dictionary so both need to be populated.
subdomain.write_pressure_to_interfaces() subdomain.write_pressure_to_interfaces()
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment