Skip to content

Commit 755597e

Browse files
author
Jacob Schroder
committedMar 23, 2023
updating README
1 parent 1bec079 commit 755597e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed
 

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Install any dependencies for your testbed (like PyMFEM or FireDrake)
1414
Call testbed for your example to generate matrices
1515

1616
from pyamg import testbed as tb
17-
args = {'gamma' : 0.1, 'meshfile' : 'pathtomesh/inline-quad.mesh', 'order' : 1}
17+
meshpath = tb.__path__[0] + '/mfem_adv_diff/inline-quad.mesh'
18+
args = {'gamma' : 0.1, 'meshfile' : meshpath, 'order' : 1}
1819
data = tb.get_mat(tb.examples.mfem_adv_diff, 0, **args)
19-
print(data['A'])
20-
print(data['b'])
20+
print(data.keys())
2121
print(data['docstring'])
2222

2323
# add new testbed matrix example

‎pyamg/testbed/matrices.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ def get_mat(example, refinement, **kwargs):
7171
##
7272
# Based on the example, call the appropriate matrix testbed
7373
if example == examples.mfem_adv_diff:
74-
# inside the call here, check for pymfem, and check kwargs...
74+
try:
75+
import mfem.ser as mfem
76+
except:
77+
raise NameError("Install PyMFEM for this example")
78+
7579
data = mfem_adv_diff(0, **kwargs)
7680
return data
7781

0 commit comments

Comments
 (0)
Please sign in to comment.