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

add self._init_function_space() method

parent 4a1cf68f
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,19 @@ class DomainPatch(df.SubDomain):
## Public Variables
self.isRichards #type bool set by input, see above
self.mesh #type df.Mesh set by input, see above
self.porosity #type float set by input, see above
self.viscosity #type tp.List[float] set by input, see above
self.has_interface #type tp.List[int] set by input, see above
self.L #type tp.List[float] set by input, see above
self.lambda_param #type tp.List[float] set by input, see above
self.function_space #type tp.Dict[str: df.Function] function space
used for wetting
and nonwetting
pressures. This is
set by
self._init_function_space()
## Public Methods
......@@ -100,9 +113,26 @@ class DomainPatch(df.SubDomain):
self.L = L
self.lambda_param = lambda_param
self._init_function_space()
# END constructor
#### PUBLIC METHODS
#### PRIVATE METHODS
def _init_function_space(self) -> None:
""" create function space for solution and trial functions
Note that P1 FEM is hard coded here, as it is assumed in other methods
aswell.
"""
if self.isRichards:
self.function_space = {'wetting': df.FunctionSpace(self.mesh, 'P', 1)}
else:
self.function_space = {#
'wetting' : df.FunctionSpace(self.mesh, 'P', 1),#
'nonwetting' : df.FunctionSpace(self.mesh, 'P', 1)#
}
# END is_Richards
# END OF CLASS DomainPatch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment