From aef96902e9ecae7748728a1d2b5ea289647265ad Mon Sep 17 00:00:00 2001 From: rowanc1 Date: Tue, 25 Feb 2014 09:50:09 -0800 Subject: [PATCH] Minor updates. --- SimPEG/Mesh/DiffOperators.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SimPEG/Mesh/DiffOperators.py b/SimPEG/Mesh/DiffOperators.py index 70a7e657..03536f88 100644 --- a/SimPEG/Mesh/DiffOperators.py +++ b/SimPEG/Mesh/DiffOperators.py @@ -291,8 +291,8 @@ class DiffOperators(object): """ if(type(BC) is str): - BC = [BC for _ in self.vnC] # Repeat the str self.dim times - elif(type(BC) is list): + BC = [BC]*self.dim + if(type(BC) is list): assert len(BC) == self.dim, 'BC list must be the size of your mesh' else: raise Exception("BC must be a str or a list.") @@ -473,6 +473,10 @@ class DiffOperators(object): # Dirichlet else """ + + if discretization is not 'CC': + raise NotImplementedError('Boundary conditions only implemented for CC discretization.') + if(type(BC) is str): BC = [BC for _ in self.vnC] # Repeat the str self.dim times elif(type(BC) is list):