Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg.solver.solveFiniteElements(mesh, a=1.0, b=0...) does not work if b is set as a field #181

Closed
gockolori opened this issue May 20, 2019 · 1 comment
Assignees
Labels

Comments

@gockolori
Copy link

gockolori commented May 20, 2019

Problem description

pg.solver.solveFiniteElements(mesh, a=1.0, b=0...) does not work if b is set as a field (just like a)

because "if b!=0" does not work any more in python 3.7.3

Your environment

Operating system: e.g. Windows, Linux
Python version: 3.7.3
pyGIMLi version: Output of print(pg.__version__)
Way of installation: conda forge

Expected behavior

I should be able to set a parameter field

Actual behavior

File "", line 17, in
bc=bc, times=None, userData=None, verbose=True)# **kwargs
File "/home/veronika/miniconda3/lib/python3.7/site-packages/pygimli/solver/solver.py", line 1593, in solveFiniteElements
if b != 0:

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

@gockolori gockolori changed the title pg.solver.solveFiniteElements(mesh, a=1.0, b=0...) pg.solver.solveFiniteElements(mesh, a=1.0, b=0...) does not work if b is set as a field May 20, 2019
@gockolori gockolori changed the title pg.solver.solveFiniteElements(mesh, a=1.0, b=0...) does not work if b is set as a field pg.solver.solveFiniteElements(mesh, a=1.0, b=0...) does not work if b is set as a field #bug May 20, 2019
@gockolori gockolori changed the title pg.solver.solveFiniteElements(mesh, a=1.0, b=0...) does not work if b is set as a field #bug pg.solver.solveFiniteElements(mesh, a=1.0, b=0...) does not work if b is set as a field May 20, 2019
@florian-wagner florian-wagner self-assigned this May 20, 2019
@carsten-forty2 carsten-forty2 self-assigned this May 20, 2019
carsten-forty2 added a commit that referenced this issue May 20, 2019
carsten-forty2 added a commit that referenced this issue May 22, 2019
@carsten-forty2
Copy link
Contributor

Thanks for reporting fixed in 8fa4964

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants