Skip to content

Commit f32101b

Browse files
Update notebooks
1 parent 7da0d02 commit f32101b

File tree

5 files changed

+951
-342
lines changed

5 files changed

+951
-342
lines changed

demo/Graphnics demo.ipynb

Lines changed: 24 additions & 7 deletions
Large diffs are not rendered by default.

demo/Pulsatile flow on a real vascular network.ipynb

Lines changed: 834 additions & 42 deletions
Large diffs are not rendered by default.

demo/Vasomotion in arterial trees.ipynb

Lines changed: 84 additions & 291 deletions
Large diffs are not rendered by default.

graphnics/fenics_graph.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ def __init__(self, G, qs, **kwargs):
274274
def eval_cell(self, values, x, cell):
275275
edge = self.G.mf[cell.index]
276276
values[0] = self.qs[edge](x)
277+
278+
def value_shape(self):
279+
return ()
277280

278281

279282
class TangentFunction(UserExpression):

graphnics/flowmodels/time_stepping.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def time_stepping_stokes(
4141

4242
# We discretize the time derivative term as rho/A d/dt q = rho/A (qn1 - qn)/Delta t
4343
cn, cn1 = time_stepping_schemes[t_step_scheme].values()
44-
44+
45+
print('Setting up problem...')
4546
Dn1 = model.init_a_form()
4647
Dn = model.init_L_form()
4748

@@ -77,6 +78,7 @@ def time_stepping_stokes(
7778

7879
An1, Ln1, DDn1 = [ii_convert(ii_assemble(term)) for term in [a_diag, L, Dn1]]
7980

81+
print('Time stepping')
8082
for t_val in tqdm(np.linspace(dt, T, t_steps - 1)):
8183

8284
A = ii_convert(DDn1 + cn1 * dt * An1 + cn1 * dt * B + cn1 * dt * C)
@@ -151,6 +153,8 @@ def time_stepping_stokes_IE_simplified(
151153

152154
# We discretize the time derivative term as rho/A d/dt q = rho/A (qn1 - qn)/Delta t
153155
cn, cn1 = time_stepping_schemes[t_step_scheme].values()
156+
157+
print('Setting up problem...')
154158

155159
Dn1 = model.init_a_form()
156160
Dn = model.init_L_form()
@@ -191,7 +195,7 @@ def time_stepping_stokes_IE_simplified(
191195

192196
A = ii_convert(DDn1 + dt * An + dt * B + dt * C)
193197

194-
198+
print('Time stepping')
195199
for t in tqdm(np.linspace(dt, T, t_steps - 1)):
196200

197201
b = ii_convert( DDn + dt * Ln1)

0 commit comments

Comments
 (0)