Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LDD-for-two-phase-flow-systems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Seus
LDD-for-two-phase-flow-systems
Commits
01ca2870
Commit
01ca2870
authored
6 years ago
by
David Seus
Browse files
Options
Downloads
Patches
Plain Diff
add self._init_function_space() method
parent
4a1cf68f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
domainPatch.py
+30
-0
30 additions, 0 deletions
domainPatch.py
with
30 additions
and
0 deletions
domainPatch.py
+
30
−
0
View file @
01ca2870
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment