Commit a50a2406 by Jigyasa Watwani

setting up

parent 07959675
Showing with 12 additions and 0 deletions
...@@ -11,7 +11,17 @@ class GrowthDiffusion(object): ...@@ -11,7 +11,17 @@ class GrowthDiffusion(object):
# read in parameters # read in parameters
for key in parameters: for key in parameters:
setattr(self, key, parameters[key]) setattr(self, key, parameters[key])
# create mesh, function space, define function, test function
self.mesh = df.Mesh(os.path.join(mDir, self.meshfile)) 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__': if __name__ == '__main__':
import json import json
...@@ -23,3 +33,4 @@ if __name__ == '__main__': ...@@ -23,3 +33,4 @@ if __name__ == '__main__':
assert params['growth'] in ('none', 'linear', 'exponential'), 'Unknown growth model' assert params['growth'] in ('none', 'linear', 'exponential'), 'Unknown growth model'
gd = GrowthDiffusion(params) gd = GrowthDiffusion(params)
gd.solve()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment