wang yunbo | 9 Feb 22:56
Picon
Favicon
Gravatar

Curvature calculation revised

Hi,

I think I didn't make myself clear in the last email. Apologize. 

I have a circle in my model ( center at (50,50), radius=25) as attached which represents the zero level set.
Then I built a field with circular level sets which values vary smoothly from the center of the circle
representing the zero level set, outwards along the radius ( the field has a zero value on the surface of circle).

Then I calculated the curvature of the field everywhere in the mesh and output the values to a file called
'data', and also plot the contours of curvature. My expectation is the curvature should equal to (1/r) and
I will have many concentric circles in my plot. Meanwhile, every point on the circle representing zero
level set should have a curvature of around 0.04 ( since r = 25, 1/r=0.04)  

I have two problems now.

 1. when I look at the 'data' file and checked some point which suppose to be at the surface e.g (50, 25),  (62,
71), the results are like 0.0 or 0.7 (not 0.04 as expected).   That's where I get confused. How can I reach my expectation?

 2. The shape of my plot is quite wavy with many wiggles, not concentric rings as expected.

Thanks very much.

Regards,

Yunbo 

_______________________________________________
fipy mailing list
(Continue reading)

Lucia AvOlocc | 6 Feb 19:11
Picon
Gravatar

fipy installation problems on ubuntu

Hi,
I am having problems when installing fipy in my notebook (ubuntu 11.10)

I got the following errors:

home:~/FiPy-2.1.2$ sudo python setup.py install
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to
support .pth files
running bdist_egg
running egg_info
writing FiPy.egg-info/PKG-INFO
writing top-level names to FiPy.egg-info/top_level.txt
writing dependency_links to FiPy.egg-info/dependency_links.txt
writing entry points to FiPy.egg-info/entry_points.txt
writing FiPy.egg-info/PKG-INFO
writing top-level names to FiPy.egg-info/top_level.txt
writing dependency_links to FiPy.egg-info/dependency_links.txt
writing entry points to FiPy.egg-info/entry_points.txt
reading manifest file 'FiPy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.png' found under
directory 'examples'
warning: no previously-included files matching '*.pdf' found under
directory 'examples'
warning: no previously-included files matching '*.png' found under
directory 'fipy'
warning: no previously-included files matching '*.pdf' found under
(Continue reading)

Daniel Wheeler | 3 Feb 16:09
Picon

Fwd: [Pysparse-users] Requesting help with PySparse installation



---------- Forwarded message ----------
From: Daniel Wheeler <daniel.wheeler2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Fri, Feb 3, 2012 at 10:04 AM
Subject: Re: [Pysparse-users] Requesting help with PySparse installation
To: Leland M Barnard <lmbarnard-63mtpxcE9Cs@public.gmane.org>
Cc: pysparse-users-5NWGOfrQmneRv+LV9MX5uuRhgaa4a2kL@public.gmane.orgnet


I am not sure what the issue is, but it might be better to build pysparse against a version of python and numpy that is distributed and installed by the package manager for your system. Is there a numpy rpm available?

If for some reason that doesn't work or isn't available, maybe try installing numpy by hand using the system python. You can try different options in a virtualenv if you use that rather than installing into your system directories. Certainly with enthought, it is better to install in a virtualenv rather than messing with the system directories while prototyping.

Googling the actual issue, this may be a 32 versus 64 bit issue.

   <http://stackoverflow.com/questions/648482/a-trivial-python-swig-error-question>

Maybe using a 32 bit distribution on a 64 bit platform is not the way to go (speculation). Is there not a 64 bit dist? Like it says in the link maybe try passing some of the 32 bit flags to gcc.

Hope this helps in some way.


On Thu, Feb 2, 2012 at 11:12 AM, Leland M Barnard <lmbarnard-63mtpxcE9Cs@public.gmane.org> wrote:
I'm trying to set up pysparse to run on a 64 bit red hat linux machine
(specifically Rocks v5.2).   We have gcc v4.1.2.  We also have the
Enthought python distribution v7.1-2 (32 bit). with python 2.7.

I'm having trouble installing pysparse v1.1.1.  When I use the command

python setup.py install

I receive this error message:

running install
running build
running build_py
running build_ext
building 'pysparse.spmatrix' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -fPIC -DNUMPY=1
-DLENFUNC_OK=1 -IInclude
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/lib/python2.7/site-packages/numpy/core/include
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7 -c
Src/spmatrixmodule.c -o build/temp.linux-x86_64-2.7/Src/spmatrixmodule.o
In file included from
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/Python.h:58,
                 from Src/spmatrixmodule.c:1:
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/pyport.h:849:2: error:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?)."
error: command 'gcc' failed with exit status 1

I was hoping there might be someone else on the mailing list that
encountered this and might have a solution.  Please let me know if there
is any more information I can supply that might be helpful in diagnosing
the trouble.  Thanks!

VTY,
Leland Barnard

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Pysparse-users mailing list
Pysparse-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/pysparse-users



--
Daniel Wheeler



--
Daniel Wheeler
_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Leland M Barnard | 1 Feb 22:40
Picon
Favicon
Gravatar

Requesting help with a problem installing PySparse

I'm trying to set up fipy to run on a 64 bit red hat linux machine 
(specifically Rocks v5.2).   We have gcc v4.1.2  We also have the 
Enthought python distribution with python 2.7.

I'm having trouble installing pysparse v1.1.1.  When I use the command

python setup.py install

I receive this error message:

running install
running build
running build_py
running build_ext
building 'pysparse.spmatrix' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -fPIC -DNUMPY=1 
-DLENFUNC_OK=1 -IInclude 
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/lib/python2.7/site-packages/numpy/core/include 
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7 -c 
Src/spmatrixmodule.c -o build/temp.linux-x86_64-2.7/Src/spmatrixmodule.o
In file included from 
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/Python.h:58,
                  from Src/spmatrixmodule.c:1:
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/pyport.h:849:2: error: 
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc 
config?)."
error: command 'gcc' failed with exit status 1

I also tried pysparse v1.2 with the same result (in addition to some 
library linking errors that I'll also probably have to fix).

I was hoping there might be someone else on the mailing list that 
encountered this and might have a solution.  Please let me know if there 
is any more information I can supply that might be helpful in diagnosing 
the trouble.  Thanks!

VTY,
Leland Barnard

_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Yun Tao | 30 Jan 02:08
Picon

Solving coupled system of PDEs

Dear all,

I've been leaning FiPy in hope to solve a coupled system of stochastic pde's that are representations of animal migration mechanisms. So far I've found just one recent thread related to the topic:
http://comments.gmane.org/gmane.comp.python.fipy/2329
Regarding the response by Jonathan Guyer, I'm hoping to know whether the major release mentioned therein, or at least its simultaneous solutions solver, is currently available.

On a similar note, I found a wonderful script for coupled system written by Jonathan: http://matforge.org/fipy/browser/trunk/examples/cahnHilliard/mesh2D-coupled.py
Since it is the only example I can find of this class of problems, I've been trying to understand it to the fullest extent. However, I've been having trouble running through the program myself and wonder whether the link above refers to the finalized, working version.

Minor hiccup wise, on ln 81, the ".value" after the GaussianNoiseVariable seems to unnecessarily reduce the variable "noise" to an array of zeros.

A more serious complication is when executing the program through ln 145 repeatedly yields the following error message:
TypeError: __init__() got an unexpected keyword argument 'var'

Is the latter a hurdle that can be troubleshot or is the fix in the upcoming release?

Thank you all for having been so incredibly helpful. Long live FiPy!

Cheers, Yun 
 
--
Yun Tao

Graduate Group of Ecology Doctoral Candidate
Department of Environmental Science and Policy
Center for Population Biology
University of California, Davis


_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Iseli Markus | 28 Jan 19:05
Favicon

RE: fipy: Could not import any solver package

Have problems installing fipy on windows XP. I got the following error message "Could not import any solver
package" (detail see below). 
On the net I found that this is a problem with pysparse but no solution is mentioned.
I used python-2.7.2.msi with pysparse-1.1.1.win32-py2.7.exe.

Any suggestion?

Thank you and best regards

Markus

Error message:
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import fipy
  File "C:\Python27\lib\site-packages\fipy\__init__.py", line 41, in <module>
    from solvers import *
  File "C:\Python27\lib\site-packages\fipy\solvers\__init__.py", line 68, in <module>
    raise ImportError, "Could not import any solver package. If you are using Trilinos, make sure you have all
of the necessary Trilinos packages installed - Epetra, EpetraExt, AztecOO, Amesos, ML, and IFPACK."
ImportError: Could not import any solver package. If you are using Trilinos, make sure you have all of the
necessary Trilinos packages installed - Epetra, EpetraExt, AztecOO, Amesos, ML, and IFPACK.

_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Picon
Favicon
Gravatar

2.1.3


Hi,

FiPy 2.1.3 is out, or so FiPy's site says, but it's nowhere to be downloaded
-- or at least not from http://matforge.org/fipy/downloader

What should one then do?

F.


_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
John Newman | 25 Jan 14:10
Picon
Favicon
Gravatar

Lax algorithm

Hello,

for a PDE of this type du/dt + (A-B*x)*du/dx = 0 , where variable u(x) describes
some probability distribution (i.e. must be > 0) what is the proper numerical
scheme to integrate it? When I set u to normal distribution and let the system
evolve, soon I get u(x) < 0 for some x. I need Lax-like method
(http://www.cmth.ph.ic.ac.uk/people/a.mackinnon/Lectures/cp3/node29.html). Is
this available in FiPy? 

Thank you. 

_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Rafael Calsaverini | 21 Jan 19:22
Picon
Gravatar

Understanding the terms.

Hi, 

I just found out about fipy so I was giving it a try. I found out the
nomenclature of the terms in the equations quite an obstacle though. Not being
originally from the fluid dynamics community, some terminology is obscure to me,
and the manual didn't quite illuminate for me how to write of a simulation for a
arbitrary PDE.

For example, I was interested, for example, in simulating the following equation:

du/dt = d/dx(v(u) u)

with Neumann boundary conditions at u(0), for example, and 

(interpret d/dt and d/dx as partial derivatives)

How do I translate this into the terms classes? 

I understand that du/dt is equivalent to TransientTerm() and that d( v du/dx) is
equivalent to DiffusionTerm(coeff = v).

My questions are:

1) how to insert a term like d( v u)/dx
2) how to make v to be a function of u(x,t)?

Thank you very much. 

_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

wang yunbo | 20 Jan 00:34
Picon
Favicon
Gravatar

Curvature calculation

I'm trying to calculate the curvature of a circle in 2D.  

Firstly I set up a distance variable "var" to represent the circular shape.   To calculate the curvature, I
took the gradient of "var" and then the divergence as shown below:
                                       (var.getFaceGrad()).getDivergence() 

My trouble is :

My expectation is to obtain a matrix of curvature and 
Attachment (latex-image-1.pdf): application/pdf, 10 KiB
 at the boundary of circle (where var=0). However,  the obtained result from my program showed 
Attachment (latex-image-1.pdf): application/pdf, 9 KiB
 at the boundary.

Maybe the method I used focused on the local curvature instead of a global curvature. 

How can I my original goal? Is there any other method to calculate the curvature in fipy?

Thanks,

Yunbo

_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Seufzer, William J. | 18 Jan 19:58
Picon
Favicon

Building Trilinos

I'm trying to build trilinos-10.8.5 on SUSE Linux Enterprise Server 10 (x86_64)

Before I dump details (which are probably more appropriate for Sandia to look at) I'd like to know if anyone
else has had success with this version of trilinos, or if maybe I need to step back to a different
known-to-work version. The web pages for FIPy has recommendations for building version 9.? of trilinos.
The advice is based on using .configure while now trilinos is built with cmake.

In general terms: I'm having trouble with linking libteuchos.so. liblapack.a seems to be the problem.
Googling "libteuchos.so error" took me to a page talking about how cmake is not aware of a Fortran lib being
linked and the issue is around "mangling" of names.(?)

I'll get more specific as necessary, but I'm wondering if I just need to step back to version 9 and use the
.configure advice from the FiPy pages.

Thanks,

Bill

_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]


Gmane