meshpro / pyfvm Goto Github PK
View Code? Open in Web Editor NEWFinite volume discretization tools for Python.
License: GNU General Public License v3.0
Finite volume discretization tools for Python.
License: GNU General Public License v3.0
I have installed pyfvm
, voropy
, and meshzoo
from github clones. When I run your Poisson example, I get the error:
AttributeError: 'module' object has no attribute 'mesh_tri'
If I instead import voropy
and access mesh_tri
from there, I then get the error:
ValueError: sort array is read-only
regarding the coordinate array m.cells()
from mshr
. Perhaps you want to copy this instead?
Not sure if this is the right place to ask about this since the repo seems to be empty (?) but this is where the PyPI package page links.
I cannot install pyfvm
with pip
.
Steps to reproduce:
conda create -n pyfvm python=3
conda activate pyfvm
pip install pyfvm
Output:
Collecting pyfvm
Using cached pyfvm-0.4.3-py3-none-any.whl (38 kB)
Collecting x21<0.5.0,>=0.4.1
Using cached x21-0.4.10-cp311-cp311-macosx_10_9_x86_64.whl (75 kB)
Collecting pyfvm
Using cached pyfvm-0.4.1-py3-none-any.whl (109 kB)
Collecting x21<0.4.0,>=0.3.3
Using cached x21-0.3.6-cp311-cp311-macosx_10_9_x86_64.whl (61 kB)
ERROR: Cannot install pyfvm==0.4.1 and pyfvm==0.4.3 because these package versions have conflicting dependencies.
The conflict is caused by:
pyfvm 0.4.3 depends on meshplex<0.19.0 and >=0.18.0
pyfvm 0.4.1 depends on meshplex<0.19.0 and >=0.18.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Hi,
I'm trying to install pyfvm via pip, as suggested in the guide, the procedure ends up with the following error:
Collecting pyfvm Using cached https://files.pythonhosted.org/packages/c4/12/d15678b973cfde5e4fad57abba9023400f82091cd62a0ae3daf0fb43534f/PyFVM-0.2.3-py2.py3-none-any.whl Collecting voropy (from pyfvm) Using cached https://files.pythonhosted.org/packages/62/a7/347577497d12329f4ecb0cb5da7dbc606c414683923f2b56d1078de43340/voropy-0.5.3-py2.py3-none-any.whl Requirement not upgraded as not directly required: meshzoo in /usr/local/lib/python2.7/dist-packages (from pyfvm) (0.4.1) Collecting krypy (from pyfvm) Using cached https://files.pythonhosted.org/packages/e2/84/8de0afa3d6a969c170c7bafb91d3bd19b29b67c35e4ba53ccf275440f8be/krypy-2.1.7.tar.gz Requirement not upgraded as not directly required: sympy in /usr/lib/python2.7/dist-packages (from pyfvm) (0.7.6.1) Collecting sphinxcontrib-bibtex (from pyfvm) Using cached https://files.pythonhosted.org/packages/a9/42/54d99325c8d3926a77fec2e898acb60360bff34c31020b0d306c8395b3b9/sphinxcontrib_bibtex-0.4.0-py2.py3-none-any.whl Collecting code-extract (from pyfvm) Could not find a version that satisfies the requirement code-extract (from pyfvm) (from versions: ) No matching distribution found for code-extract (from pyfvm)
on the following machine
Linux ASUS-N551JM 4.4.0-128-generic #154-Ubuntu SMP Fri May 25 14:15:18 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Moreover, I cannot find any repository for the code-extract package on the web.
Thank you very much for your help,
F.D.
Hi,
I think there' s a problem, since running the Poisson 1-d example it gives me an error AttributeError: 'Mesh' object has no attribute 'node_coords'
.
The complete trace is
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [4], in <cell line: 24>()
19 vertices, cells = meshzoo.rectangle_tri(
20 np.linspace(0.0, 2.0, 401), np.linspace(0.0, 1.0, 201)
21 )
22 mesh = meshplex.Mesh(vertices, cells)
---> 24 matrix, rhs = pyfvm.discretize_linear(Poisson(), mesh)
26 u = linalg.spsolve(matrix, rhs)
28 mesh.write("out.vtk", point_data={"u": u})
File ~/.conda/envs/pytorch11/lib/python3.8/site-packages/pyfvm/discretize_linear.py:374, in discretize_linear(obj, mesh)
368 rhs_eval = sympy.lambdify((x), -affine, modules=mods)
370 dirichlet_kernels.add(
371 DirichletLinearKernel(mesh, coeff_eval, rhs_eval, subdomain)
372 )
--> 374 return get_linear_fvm_problem(
375 mesh, edge_kernels, vertex_kernels, face_kernels, dirichlet_kernels
376 )
File ~/.conda/envs/pytorch11/lib/python3.8/site-packages/pyfvm/linear_fvm_problem.py:8, in get_linear_fvm_problem(mesh, edge_kernels, vertex_kernels, face_kernels, dirichlets)
5 def get_linear_fvm_problem(
6 mesh, edge_kernels, vertex_kernels, face_kernels, dirichlets
7 ):
----> 8 V, I, J, rhs = _get_VIJ(mesh, edge_kernels, vertex_kernels, face_kernels)
10 # One unknown per vertex
11 n = len(mesh.node_coords)
File ~/.conda/envs/pytorch11/lib/python3.8/site-packages/pyfvm/linear_fvm_problem.py:38, in _get_VIJ(mesh, edge_kernels, vertex_kernels, face_kernels)
36 I_ = []
37 J = []
---> 38 n = len(mesh.node_coords)
39 # Treating the diagonal explicitly makes tocsr() faster at the cost of a
40 # bunch of numpy.add.at().
41 diag = numpy.zeros(n)
AttributeError: 'Mesh' object has no attribute 'node_coords'
I see that the meshplex
library has been updated in June, while pyfvm
has the last commit 8 months ago. Maybe the problem comes from this ?
Thank you for the wonderful library btw
pip install leave an error:
Collecting pyfvm
Downloading pyfvm-0.1.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-enpfh0_b/pyfvm/setup.py", line 7, in <module>
from pyfvm import __version__, __author__, __author_email__
File "/tmp/pip-build-enpfh0_b/pyfvm/pyfvm/__init__.py", line 4, in <module>
from . import mesh2d
File "/tmp/pip-build-enpfh0_b/pyfvm/pyfvm/mesh2d.py", line 5, in <module>
from pyfvm.base import _base_mesh
File "/tmp/pip-build-enpfh0_b/pyfvm/pyfvm/base.py", line 34, in <module>
import meshio
ModuleNotFoundError: No module named 'meshio'
should be fixed by adding it in setup.py
I have installed pyfvm with pip, but while running a code, I am getting the following license error:
Error: Unable to find valid license for product ID 973948c2-ac9b-4a78-b37b-2adaafcf5523.
Add a license with
slim install <your-license>
(KG_NOT_FOUND)
Can anybody point me to the correct license? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.