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
c91d299d
authored
Apr 27, 2022
by
Jigyasa Watwani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
class name change
parent
a6e9def7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
no_c_fixed_bdry_fenics.py
no_c_fixed_bdry_fenics.py
View file @
c91d299d
...
@@ -5,7 +5,7 @@ import progressbar
...
@@ -5,7 +5,7 @@ import progressbar
df
.
set_log_level
(
df
.
LogLevel
.
ERROR
)
df
.
set_log_level
(
df
.
LogLevel
.
ERROR
)
df
.
parameters
[
'form_compiler'
][
'optimize'
]
=
True
df
.
parameters
[
'form_compiler'
][
'optimize'
]
=
True
class
Growth
(
object
):
class
FixedBoundaries
(
object
):
def
__init__
(
self
,
parameters
):
def
__init__
(
self
,
parameters
):
# read in parameters
# read in parameters
for
key
in
parameters
:
for
key
in
parameters
:
...
@@ -122,16 +122,16 @@ if __name__ == '__main__':
...
@@ -122,16 +122,16 @@ if __name__ == '__main__':
with
open
(
'growth_parameters.json'
)
as
jsonFile
:
with
open
(
'growth_parameters.json'
)
as
jsonFile
:
params
=
json
.
load
(
jsonFile
)
params
=
json
.
load
(
jsonFile
)
g
=
Growth
(
params
)
fb
=
FixedBoundaries
(
params
)
u0
=
df
.
Expression
(
'sin(x[0])'
,
degree
=
1
)
u0
=
df
.
Expression
(
'sin(x[0])'
,
degree
=
1
)
rho0
=
df
.
Expression
(
'rho0 + 0.1 * (cos(x[0])+cos(x[0]/2))'
,
rho0
=
g
.
average_rho
,
degree
=
1
)
rho0
=
df
.
Expression
(
'rho0 + 0.1 * (cos(x[0])+cos(x[0]/2))'
,
rho0
=
fb
.
average_rho
,
degree
=
1
)
(
u
,
v
,
rho
)
=
g
.
solve
(
u0
,
rho0
)
(
u
,
v
,
rho
)
=
fb
.
solve
(
u0
,
rho0
)
x
=
g
.
mesh
.
coordinates
()
x
=
fb
.
mesh
.
coordinates
()
times
=
np
.
arange
(
0
,
g
.
maxtime
,
g
.
timestep
)
times
=
np
.
arange
(
0
,
fb
.
maxtime
,
fb
.
timestep
)
fig
,
(
axu
,
axv
,
axrho
)
=
plt
.
subplots
(
3
,
1
,
sharex
=
True
,
figsize
=
(
8
,
6
))
fig
,
(
axu
,
axv
,
axrho
)
=
plt
.
subplots
(
3
,
1
,
sharex
=
True
,
figsize
=
(
8
,
6
))
axu
.
set_xlabel
(
r'$x$'
)
axu
.
set_xlabel
(
r'$x$'
)
axu
.
set_ylabel
(
r'$u(x,t)$'
)
axu
.
set_ylabel
(
r'$u(x,t)$'
)
...
...
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