From 2386aa1c19f76cda8132ec1783e1a8f898054654 Mon Sep 17 00:00:00 2001 From: David Seus <david.seus@ians.uni-stuttgart.de> Date: Sat, 5 Oct 2019 18:45:44 +0200 Subject: [PATCH] get new gravity term to work --- LDDsimulation/domainPatch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LDDsimulation/domainPatch.py b/LDDsimulation/domainPatch.py index dc8be6a..621bc46 100644 --- a/LDDsimulation/domainPatch.py +++ b/LDDsimulation/domainPatch.py @@ -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 -- GitLab