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

get new gravity term to work

parent c6c02747
No related branches found
No related tags found
No related merge requests found
......@@ -183,7 +183,7 @@ class DomainPatch(df.SubDomain):
neighbour_assumes_R = self.interface[interf].neighbour_isRichards[self.subdomain_index]
if not neighbour_assumes_R:
self.TPR_occures = True
self.has_interface_with_TP_neighbour.update(interf)
self.has_interface_with_TP_neighbour.append(interf)
else:
self.has_interface_with_TP_neighbour = None
self.has_phases = ['wetting', 'nonwetting'] #['nonwetting', 'wetting']
......@@ -499,7 +499,7 @@ class DomainPatch(df.SubDomain):
flux_function = df.project(flux, self.function_space["flux"][phase])
flux_x, flux_y = flux_function.split()
gravity_neummann_flux = df.Function(self.function_space["gli"][phase])
gravity_neumann_flux = 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
# # facets belonging to the interface as keys (with respect to
......@@ -523,7 +523,7 @@ class DomainPatch(df.SubDomain):
flux_x_dof_index = corresponding_dof_index[local_facet_ind][neumann_flux_dof_index]["flux_x"]
flux_y_dof_index = corresponding_dof_index[local_facet_ind][neumann_flux_dof_index]["flux_y"]
gravity_neummann_flux.vector()[neumann_flux_dof_index] = flux_x.vector()[flux_x_dof_index]*normal[0] \
gravity_neumann_flux.vector()[neumann_flux_dof_index] = flux_x.vector()[flux_x_dof_index]*normal[0] \
+ flux_y.vector()[flux_y_dof_index]*normal[1]
# save this newly calculated dof to the interface
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment