Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Jigyasa Watwani
/
growth-pattern-control
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a50a2406
authored
Oct 27, 2022
by
Jigyasa Watwani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setting up
parent
07959675
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
growing_domain/diffusion_on_growing_domain.py
growing_domain/diffusion_on_growing_domain.py
View file @
a50a2406
...
...
@@ -11,8 +11,18 @@ class GrowthDiffusion(object):
# read in parameters
for
key
in
parameters
:
setattr
(
self
,
key
,
parameters
[
key
])
# create mesh, function space, define function, test function
self
.
mesh
=
df
.
Mesh
(
os
.
path
.
join
(
mDir
,
self
.
meshfile
))
self
.
function_space
=
df
.
FunctionSpace
(
self
.
mesh
,
'P'
,
1
)
self
.
c
,
self
.
tc
=
df
.
Function
(
self
.
function_space
),
df
.
TestFunction
(
self
.
function_space
)
def
setup_initial_conditions
():
def
setup_weak_forms
():
def
solve
():
if
__name__
==
'__main__'
:
import
json
assert
os
.
path
.
isfile
(
'parameters.json'
),
'parameters.json file not found'
...
...
@@ -22,4 +32,5 @@ if __name__ == '__main__':
# parse parameters
assert
params
[
'growth'
]
in
(
'none'
,
'linear'
,
'exponential'
),
'Unknown growth model'
gd
=
GrowthDiffusion
(
params
)
\ No newline at end of file
gd
=
GrowthDiffusion
(
params
)
gd
.
solve
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment