Commit a50a2406 by Jigyasa Watwani

setting up

parent 07959675
Showing with 14 additions and 3 deletions
......@@ -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
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