Skip to content

Commit 269dadb

Browse files
committed
#704 updated as suggested by rob and tino
1 parent a2df853 commit 269dadb

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

examples/scripts/compare_extrapolations.py

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
x_n = pybamm.standard_spatial_vars.x_n
55
x_s = pybamm.standard_spatial_vars.x_s
66
x_p = pybamm.standard_spatial_vars.x_p
7-
r_n = pybamm.standard_spatial_vars.r_n
8-
r_p = pybamm.standard_spatial_vars.r_p
97

108
var_pts = {x_n: 10, x_s: 3, x_p: 10}
119
model_lin = pybamm.lead_acid.Full()

pybamm/discretisations/discretisation.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ class Discretisation(object):
2828
mesh : pybamm.Mesh
2929
contains all submeshes to be used on each domain
3030
spatial_methods : dict
31-
a dictionary of the spatial method to be used on each
32-
domain. The keys correspond to the keys in a pybamm.Model
31+
a dictionary of the spatial methods to be used on each
32+
domain. The keys correspond to the model domains and the
33+
values to the spatial method.
3334
"""
3435

3536
def __init__(self, mesh=None, spatial_methods=None):

pybamm/spatial_methods/scikit_finite_element.py

-3
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,6 @@ def boundary_value_or_flux(self, symbol, discretised_child, bcs=None):
334334
Overwrites the default :meth:`pybamm.SpatialMethod.boundary_value`
335335
"""
336336

337-
if bcs is None:
338-
bcs = {}
339-
340337
# Return average value on the negative tab for "negative tab" and positive tab
341338
# for "positive tab"
342339
if isinstance(symbol, pybamm.BoundaryValue):

pybamm/spatial_methods/spatial_method.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,10 @@ def boundary_value_or_flux(self, symbol, discretised_child, bcs=None):
305305
The boundary value or flux symbol
306306
discretised_child : :class:`pybamm.StateVector`
307307
The discretised variable from which to calculate the boundary value
308-
bcs : dict
309-
The boundary conditions
308+
bcs : dict (optional)
309+
The boundary conditions. If these are supplied and "use bcs" is True in
310+
the options, then these will be used to improve the accuracy of the
311+
extrapolation.
310312
311313
Returns
312314
-------

0 commit comments

Comments
 (0)