Skip to content

Commit

Permalink
add setup file for mac os
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuayi committed Feb 8, 2020
1 parent 62a9e4b commit b2a6336
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
15 changes: 11 additions & 4 deletions fealpy/vem/SFCVEMModel2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ def f(x, index):

np.add.at(e0, edge2cell[:, 0], e1)
np.add.at(e0, edge2cell[~isBdEdge, 1], e1[~isBdEdge])
return np.sqrt(e0)
psi0, psi1 = self.high_order_term(celltype=True)
return np.sqrt(e0 + psi0 + psi1)

def high_order_term(self):
def high_order_term(self, celltype=False):
space = self.space
area = self.area

Expand All @@ -135,12 +136,18 @@ def high_order_term(self):
def f0(x):
val = (np.eye(x[1].shape[1]) - x[0]@x[1])@x[2]
return np.sum(val*val)
psi0 = sum(map(f0, zip(DD, PI1, uh)))
if celltype:
psi0 = np.array(list(map(f0, zip(DD, PI1, uh))))
else:
psi0 = sum(map(f0, zip(DD, PI1, uh)))

def f1(x):
val = (np.eye(x[1].shape[1]) - x[0]@x[1])@x[2]
return x[3]*np.sum(val*val)
psi1 = sum(map(f1, zip(DD, PI0, uh, area)))
if celltype:
psi1 = np.array(list(map(f1, zip(DD, PI0, uh, area))))
else:
psi1 = sum(map(f1, zip(DD, PI0, uh, area)))

return psi0, psi1

Expand Down
3 changes: 2 additions & 1 deletion setup_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'boost',
'pytools',
'pyamg',
'meshpy'
'meshpy',
'transplant'
],
zip_safe=False)
23 changes: 23 additions & 0 deletions setup_mac.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from setuptools import setup
setup(name='fealpy',
version='1.0',
description='FEALPy: Finite Element Analysis Library in Python',
url='http://github.com/weihuayi/fealpy',
author='Huayi Wei',
author_email='weihuayi@xtu.edu.cn',
license='GNU',
packages=['fealpy'],
install_requires=[
'numpy',
'scipy',
'matplotlib',
'cython',
'pybind11',
'msgpack',
'PyHamcrest',
'boost',
'pytools',
'pyamg',
'transplant'
],
zip_safe=False)
3 changes: 2 additions & 1 deletion setup_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
'PyHamcrest',
'boost',
'pytools',
'pyamg'
'pyamg',
'transplant'
],
zip_safe=False)

0 comments on commit b2a6336

Please sign in to comment.