Skip to content

Commit

Permalink
Merge pull request #36 from simpeg/feat/3Dcylmesh
Browse files Browse the repository at this point in the history
3D Cyl Mesh
  • Loading branch information
lheagy authored Jul 11, 2018
2 parents 2965857 + 17f1980 commit e94a1e1
Show file tree
Hide file tree
Showing 26 changed files with 3,495 additions and 686 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[bumpversion]
current_version = 0.1.19
current_version = 0.2.0
files = setup.py discretize/__init__.py docs/conf.py

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ docs/warnings.txt
.DS_Store
docs/auto_examples
docs/modules

# Jupyter
*.ipynb
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ language: python
python:
- 2.7
- 3.6
- 3.7
- "nightly"
matrix:
allow_failures:
- python: 3.7
- python: "nightly"

sudo: false

env:
global:
- MASTER_BRANCH=master
- PYPI_PY=3.6 # deploy to pypi from python 3.6
matrix:
- TEST_DIR=tests/base
- TEST_DIR=tests/cyl
- TEST_DIR=tests/tree
- TEST_DIR=tests/docs

before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then
Expand All @@ -31,9 +36,10 @@ install:
- pip install -r requirements_dev.txt
- python setup.py install
- make build
- export MPLBACKEND="agg"

script:
- nosetests tests/base tests/tree tests/docs --with-cov --cov discretize --cov-config .coveragerc -v -s;
- nosetests $TEST_DIR --with-cov --cov discretize --cov-config .coveragerc -v -s;

after_success:

Expand Down
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ install:
- pip install -r requirements_dev.txt
- python setup.py install

# Use the Agg backend in Matplotlib
- "set MPLBACKEND=Agg"

test_script:
- cd tests
- nosetests base tree -v -s
- nosetests base -v -s
- cd ..

after_test:
Expand Down
15 changes: 12 additions & 3 deletions discretize/CurvilinearMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,18 @@ def normals(self):
if self.dim == 2:
return normalize2D(np.r_[self._normals[0], self._normals[1]])
elif self.dim == 3:
normal1 = (self._normals[0][0] + self._normals[0][1] + self._normals[0][2] + self._normals[0][3])/4
normal2 = (self._normals[1][0] + self._normals[1][1] + self._normals[1][2] + self._normals[1][3])/4
normal3 = (self._normals[2][0] + self._normals[2][1] + self._normals[2][2] + self._normals[2][3])/4
normal1 = (
self._normals[0][0] + self._normals[0][1] +
self._normals[0][2] + self._normals[0][3]
)/4
normal2 = (
self._normals[1][0] + self._normals[1][1] +
self._normals[1][2] + self._normals[1][3]
)/4
normal3 = (
self._normals[2][0] + self._normals[2][1] +
self._normals[2][2] + self._normals[2][3]
)/4
return normalize3D(np.r_[normal1, normal2, normal3])

@property
Expand Down
Loading

0 comments on commit e94a1e1

Please sign in to comment.