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

add domainPatch.write_pressure_to_interface method

parent 488e7054
No related branches found
No related tags found
No related merge requests found
...@@ -166,13 +166,21 @@ class DomainPatch(df.SubDomain): ...@@ -166,13 +166,21 @@ class DomainPatch(df.SubDomain):
""" save the interface values of self.pressure to all neighbouring interfaces""" """ save the interface values of self.pressure to all neighbouring interfaces"""
if self.isRichards: if self.isRichards:
for ind in has_interface: for ind in has_interface:
interface[ind].write_dofs(from_function = self.pressure, # interface[ind].write_dofs(from_function = self.pressure['wetting'], #
interface_dofs = dofs_on_interface1,# interface_dofs = self._dof_indices_of_interface[ind]['wetting'],#
dof_to_vert_map = self.dof2vertex['wetting'],# dof_to_vert_map = self.dof2vertex['wetting'],#
local_to_parent_vertex_map = self.parent_mesh_index,# local_to_parent_vertex_map = self.parent_mesh_index,#
phase = 'wetting',# phase = 'wetting',#
subdomain_ind = self.subdomain_index) subdomain_ind = self.subdomain_index)
else: 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]: def govering_problem(self, phase: str, iter_num: int = 0) -> tp.Dict[str, fl.Form]:
...@@ -300,7 +308,7 @@ class DomainPatch(df.SubDomain): ...@@ -300,7 +308,7 @@ class DomainPatch(df.SubDomain):
self.ds = df.Measure('ds', domain = self.mesh, subdomain_data = self.boundary_marker) self.ds = df.Measure('ds', domain = self.mesh, subdomain_data = self.boundary_marker)
def _calc_dof_indices_of_interfaces(self): def _calc_dof_indices_of_interfaces(self):
""" calculate dof indices """ """ calculate dof indices of each interface """
V = self.function_space V = self.function_space
marker = self.boundary_marker marker = self.boundary_marker
for ind in has_interface: for ind in has_interface:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment