From 9c8b64b9f1c2fd3b5b02a0a44770604d16ae5f36 Mon Sep 17 00:00:00 2001 From: seogi Date: Wed, 19 Feb 2014 14:25:55 -0800 Subject: [PATCH] Testing BC for cell-centered system - inhomogenous neumann BC - Mixed BC were tested Fixing bug in the function "projNeumannIn" --- SimPEG/Mesh/DiffOperators.py | 2 +- SimPEG/Tests/test_boundaryPoisson.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/SimPEG/Mesh/DiffOperators.py b/SimPEG/Mesh/DiffOperators.py index 8ca498d7..70a7e657 100644 --- a/SimPEG/Mesh/DiffOperators.py +++ b/SimPEG/Mesh/DiffOperators.py @@ -499,7 +499,7 @@ class DiffOperators(object): P = sp.identity(n+1).tocsr() if(bc[0] == 'neumann'): P = P[1:,:] - if(bc[0] == 'neumann'): + if(bc[1] == 'neumann'): P = P[:-1,:] return P diff --git a/SimPEG/Tests/test_boundaryPoisson.py b/SimPEG/Tests/test_boundaryPoisson.py index 42a7bc59..a14ab2a9 100644 --- a/SimPEG/Tests/test_boundaryPoisson.py +++ b/SimPEG/Tests/test_boundaryPoisson.py @@ -171,6 +171,5 @@ class Test2D_InhomogeneousDirichlet(OrderTest): - if __name__ == '__main__': unittest.main()