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

remove if condition with gravity in calculation of gl0

parent 278cee2e
No related branches found
No related tags found
No related merge requests found
......@@ -504,6 +504,7 @@ class DomainPatch(df.SubDomain):
flux_function = df.project(flux, self.function_space["flux"][phase])
flux_x, flux_y = flux_function.split()
# functions get initialised with values zero.
gl0 = df.Function(self.function_space["gli"][phase])
# # get dictionaries of global dof indices and coordinates along
# # the interface. These dictionaries have the facet indices of
......@@ -528,7 +529,9 @@ class DomainPatch(df.SubDomain):
flux_x_dof_index = corresponding_dof_index[local_facet_ind][gli_dof_index]["flux_x"]
flux_y_dof_index = corresponding_dof_index[local_facet_ind][gli_dof_index]["flux_y"]
if self.isRichards and interface_has_TP_neighbour and phase is "nonwetting" and self.include_gravity:
if self.isRichards and interface_has_TP_neighbour and phase is "nonwetting":
# note that even if we include gravity, the correct
# flux has been set above (flux=0 without gravity).
gl0.vector()[gli_dof_index] = flux_x.vector()[flux_x_dof_index]*normal[0] \
+ flux_y.vector()[flux_y_dof_index]*normal[1]
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment