From e0289916b602489dbb665687325c9f6492768ddb Mon Sep 17 00:00:00 2001
From: David Seus <david.seus@ians.uni-stuttgart.de>
Date: Wed, 20 Mar 2019 17:34:22 +0100
Subject: [PATCH] add domainPatch.write_pressure_to_interface method
---
domainPatch.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/domainPatch.py b/domainPatch.py
index 0a5b016..ad563c4 100644
--- a/domainPatch.py
+++ b/domainPatch.py
@@ -166,13 +166,21 @@ class DomainPatch(df.SubDomain):
""" save the interface values of self.pressure to all neighbouring interfaces"""
if self.isRichards:
for ind in has_interface:
- interface[ind].write_dofs(from_function = self.pressure, #
- interface_dofs = dofs_on_interface1,#
+ interface[ind].write_dofs(from_function = self.pressure['wetting'], #
+ interface_dofs = self._dof_indices_of_interface[ind]['wetting'],#
dof_to_vert_map = self.dof2vertex['wetting'],#
local_to_parent_vertex_map = self.parent_mesh_index,#
phase = 'wetting',#
subdomain_ind = self.subdomain_index)
else:
+ for ind in has_interface:
+ for phase in ['wetting', 'nonwetting']:
+ interface[ind].write_dofs(from_function = self.pressure[phase], #
+ interface_dofs = self._dof_indices_of_interface[ind][phase],#
+ dof_to_vert_map = self.dof2vertex[phase],#
+ local_to_parent_vertex_map = self.parent_mesh_index,#
+ phase = phase,#
+ subdomain_ind = self.subdomain_index)
def govering_problem(self, phase: str, iter_num: int = 0) -> tp.Dict[str, fl.Form]:
@@ -300,7 +308,7 @@ class DomainPatch(df.SubDomain):
self.ds = df.Measure('ds', domain = self.mesh, subdomain_data = self.boundary_marker)
def _calc_dof_indices_of_interfaces(self):
- """ calculate dof indices """
+ """ calculate dof indices of each interface """
V = self.function_space
marker = self.boundary_marker
for ind in has_interface:
--
GitLab