Yes. It is the absolute. You would obviously have to pass in a reference
residual in order for the equation to return a relative residual.
Good luck and let us know how things proceed. Cheers.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.
or reporting this and you were quite right. It's now
fixed on develop (see http://matforge.org/fipy/ticket/648).
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
ar
solvers), but we have resisted this up until now. I think we would go down
this road if we wrapped Trilinos's NOX (non-linear solver package) for fipy
or any other low level non-linear solver. I don't want to get into writing
iterators, st
thanks for the kind words regarding
fipy.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>
Georg, Sorry for the delayed response. The function "_buildAndAddMatrices"
does exactly what is says on the box. It calls lower level functions that
build each term's system matrix and then adds those matrices together.
Notably, it is not doing the
looking into FiPy. I hope we can support your
efforts in the future. I think all the above methods should, hopefully,
give the same outcome. Probably the third method requires the least effort
and should be the first one to try.
--
Daniel Wheeler
___
f
that Trilinos and PySparse are not solving to
the same tolerance (if I remember correctly), they use different noms by
default. Another issues is that there is some Python-C interface overhead
that scales with system size in Trilinos. We'll try and get to the bottom
of some of these issues w
happens? Another possibility is to solve a similar problem with a Cartesian
grid and then compare FiPy and COMSOL. My guess is that COMSOL does a
better job with non-orthogonality than FiPy. We know that non-orthogonal
correction terms is something that needs to b
. You (me or someone) needs to come
up with some nice test cases. Do you know of any papers with test cases for
this?
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
and COMSOL would be a good place to start if that's possible.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
r example gradually?
>
The time step is entirely under your control you can increase it based on
elapsed time or something more sophisticated such as the number of steps to
convergence, but FiPy doesn't have any build in stepper schemes.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
o5.py" before.
BTW You may want to use pastebin.com for this sort of long output. It makes
the email easier to read.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.g
setup.py': [Errno 2] No such file or directory
>
> where's the mistake?
>
You need to be in the unpacked fipy directory. Download the tarball or zip
for version 3.0 and unpack it.
http://www.ctcms.nist.gov/fipy/download/
Change directory into the unpacked directory and you
8) = {4, 1, 5};
Circle(9) = {5, 1, 2};
Line Loop(10) = {6, 7, 8, 9};
Plane Surface(11) = {10};
''' % locals())
print mesh.cellCenters
in a file rather than running at the command line?
Can you also run the full test suite "
On Thu, May 30, 2013 at 11:48 AM, Michelangelo Formisano <
michelangelo.formis...@iaps.inaf.it> wrote:
> Hi Daniel,
> the output has this form:
>
> Info: Running 'gmsh tmp.geo -format msh -2 -nopopup tmp.msh' [1
> node(s), max. 4 thread(s)]
> Info: Started on Thu May 30 17:40:41 2013
>
>
me vertices and elements and not zero vertices and zero
elements as the output showed in your first email. Try this to check for
sure that the Gmsh installation is messed up.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
shException(errStr)
> GmshException: Gmsh hasn't produced any cells! Check your Gmsh code.
>
Hi Michelangelo, Could you try running 'python -c "import fipy;
fipy.test()"' and pasting the output into an email (or on pastebin maybe
better). That might help figu
eler & J. A. Warren, "FiPy: Partial Differential
> Equations with Python," *Computing in Science & Engineering* *11*(3) pp.
> 6—15 (2009), doi:10.1109/MCSE.2009.52<http://dx.doi.org/10.1109/MCSE.2009.52>,
> http://www.ctcms.nist.gov/fipy
>
>
--
Daniel Wheeler
thin layer is
D = Kc * (1 / (epsilon + (1 - epsilon) * D_ratio))
where
D_ratio = Kc / 2 * (1 / K1 + 1 / K2)
and
epsilon = dx / cellSize
I implemented this for a 1D problem and it seems to give the correct jump
(see http://pastebin.com/qB0XgceL). I set K1
rs):
v.setValue(otherV.value)
timeElapsed += otherDt
else:
timeElapsed += dt
There is no magic in FiPy for this sort of thing. It is just basic Python
with loops, conditionals and resetting values. Hope the above helps.
--
Daniel Wheeler
__
hope the above helps some.
Cheers.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Newton steps for this? Then the transient and diffusion
stay the same but the convection becomes
- (2 C \delta C)_x
where \delta C is the correction variable.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST
s for the feedback. I opened another ticket (see
http://matforge.org/fipy/ticket/638) for this issue.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
n let us
know how it goes.
Cheers,
Daniel
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
on (including time,
space or the dependent variable in non-linear ways), but the user has to
make the choice about explicit versus implicit and whether to use fixed
point sweeps or Newton sweeps for the non-linear solutions.
Cheers,
--
Daniel Wheeler
re is an "AztecOO.AZ_condnum" option that isn't included, but which you
could include. You probably need to pass in something telling the solver to
record the condition number using "SetAztecOption" to get it to work.
Hope this helps.
--
Daniel Wheeler
I work through the
> CLAWPACK book, thanks for the info.
>
> Jason
>
> On Thu, Mar 21, 2013 at 11:20 AM, Daniel Wheeler
> wrote:
> >
> >
> >
> > On Thu, Mar 21, 2013 at 8:59 AM, Jonathan Guyer wrote:
> >>
> >>
> >>
> >>
http://pastebin.com/P883d0q4.
>
> Cheers
>
>
>
> ___
> fipy mailing list
> fipy@nist.gov
> http://www.ctcms.nist.gov/fipy
> [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>
>
--
Daniel Wheele
I, I filed a ticket, see http://matforge.org/fipy/ticket/564.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
t;
I'll fix this too and possibly create a common base class so you don't have
to inherit directly from VanLeer.
If you would prefer to take care of these changes then just let me know.
Thanks.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
xample) and in this case it works both in serial and in
> parallel, so it seems that the problem is when saving a Gmsh grid.
>
> Adrian.
>
>
>
>
> ___
> fipy mailing list
> fipy@nist.gov
> http://www.ctcms
tle confused. The variables "X" and "Y" don't appear to be used
after lines 34 and 35 so how can it have any influence on the code
efficiency?
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[
On Tue, Mar 19, 2013 at 4:35 PM, Raymond Smith wrote:
> Oh, that's much cleaner. Thanks for that, Dan.
>
No problem. FYI, there is an open ticket on this issue
http://matforge.org/fipy/ticket/447.
--
Daniel Wheeler
___
fipy mailin
t; Thanks,
>>
>> Serbulent
>>
>>
>> [1]
>>
>> http://bb10.com/python-fipy/2012-12/msg00016.html
>> http://osdir.com/ml/python.fipy/2007-10/msg9.html
>> http://bb10.com/python-fipy/2011-05/msg00030.html
>> _________
y/documentation/USAGE.html#envvar-FIPY_VIEWER.
Set "FIPY_VIEWER" to "matplotlib" or "mayavi" and it should take care of
it. You can also instantiate the viewers directly, see the viewers at
http://matforge.org/fipy/browser/fipy/fipy/viewers.
Cheers
--
Daniel
From process 0 out of 3, Hello World!
From process 2 out of 3, Hello World!
From process 1 out of 3, Hello World!
to check your MPI installation independently from Trilinos. Try and get the
above working by setting the "-I" and "-L" flags if necessa
like this,
newDiffCoeff = oldDiffCoeff * (T < threshold)
You can also use the "newDiffCoeff.harmonicFaceValue" as the diffusion
coefficient if you want to ensure that there is zero flux through the faces
when the cell values on one or both sides of the face exceed the
"threshold" value
order of Ncells by
| Npoints in general, but uses only Ncells when the
| CellVariable's mesh is a UniformGrid object.
If this isn't good enough have a look at Scipy's interpolation tools which
I think has been improved greatly of late.
--
Daniel Wheeler
_
Hi Pierre,
Sorry for taking so long to get back to you on this.
On Fri, Mar 1, 2013 at 9:14 AM, Pierre de Buyl wrote:
> On Fri, Feb 22, 2013 at 12:10:51PM -0500, Daniel Wheeler wrote:
> > On Wed, Feb 20, 2013 at 1:54 PM, Pierre de Buyl
> wrote:
>
> Following my 2D experi
ages the slave machines are using at
http://build.cmi.kent.edu:8010/tgrid?branch=develop
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
you could just use the
Scipy solvers.
>
>
> I tried changing the dtypes of nearestIndices, chunk, and tmp to 'int32'
> like what I did for pysparseMatrix.py, but that didn't work.
>
I wouldn't worry about those too much unless you need them for your work.
Cheers
Try the CylindricalGrid2D just to make sure that the various changes for
the axisymmetric problem are being handled correctly in your code and then
we can go from there.
Also see if things improve as the shift is increased away from zero and
that the solutions are adequately converged. That's th
SE paper is nice, too).
>
Hi Pierre,
Great to have you on board and thanks for the feedback.
> Thanks for any comment on the method.
>
There don't seem to be any glaring issues, it all seems reasonable to me.
Nice work.
Cheers,
Daniel Wheeler
--
Daniel Wheeler
_
se the following to convert
before calling addAt.
if hasattr(id1, 'astype') and id1.dtype.name == 'int64':
id1 = id1.astype('int32')
if hasattr(id2, 'astype') and id2.dtype.name == 'int64':
id2 = id2.as
q.sweep instead of eq.solve?
>
No, they do the same, but sweep calculates and returns the residual.
Cheers
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
or the "2.". You could write
TransientTerm() == DiffusiionTerm() + _ExplicitSourceTerm(2.)
but you don't have to.
Cheers
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
explicit sources, implicit and then coupled and see how the convergence
changes for a very simple system. Try 1D to start with.
Set something up and then I can help you debug it. Cheers.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.
nderstand enough about python yet. Will I need to create a new class to
> accomplish this?
>
No. I assume it is just a couple set of PDEs. There are different ways to
represent couple equations if FiPy, if you write down the equations we can
ile with even less boiler plate, but don't have the
details.
Cheers
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
and I am struggling to find examples.
>
Why do you need either the ".divergence" or ".grad" methods? I am not sure
what you are trying to do.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
;
Sure. I'll need some more details to help though.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Grids don't work at all in parallel. They should really take a
serial comm by default.
>
> Finally, in all cases, the solution to the diffusion equation solved for
> in solve.py appears to be incorrect when run in parallel.
>
It should be correct now, but let me know if it isn
On Fri, Jan 11, 2013 at 10:23 AM, Fausto Arinos de A. Barbuto <
fausto_barb...@yahoo.ca> wrote:
>
> Daniel,
>
> It worked beautifully, thanks!
>
Excellent. Good luck with it all.
--
Daniel Wheeler
___
fipy mailing li
m
Step1 = (X < 2) & (Y == 1)
Step2 = mesh.facesTop
Midface = (X == 2) & (Y > 1)
from fipy import numerix
print numerix.sum(Midface)
print numerix.sum(Step1)
print numerix.sum(Step2)
Seems like the correct number of faces.
Cheers,
--
Daniel Wheeler
___
d debug it as well as the command line commands you
used to run the script. Maybe also the results from
$ python -c "import fipy; fipy.test()"
and
$ mpirun -np 2 python -c "import fipy; fipy.test()"
Thanks!
--
Daniel Wheeler
___
w about "a" or "b".
In [16]: print d
4.0
In [17]: a.setValue(4)
In [18]: print d
4.0
In [19]: print c
8.0
Hope the above helps sort it our for you. In your case you don't need to
explicitly instantiate "D", it can be created via the result of a
calculati
s like a good idea. Thanks. We probably need a better solution to
piecewise dependency than the solution that I provided due to the inherent
inefficiencies with the "<" and "*" method. Not sure what that would be
though.
Cheers
--
Daniel Wheeler
___
ot handle the arrays obtained from CellVariables command. What
>> would be the right way to do this?
>>
>> Thanks!
>>
>> --
>> Salomon Turgman Cohen
>> Postdoctoral Associate
>> Cornell University
>> (919) 341-9650
>>
>
>
>
> --
> Salomon Turgman Cohen
> Postdoctoral Associa
ssing from
CellVariable and using "numpy.where" or fancy indexing to create masks,
rather than using the "*" operators. This would require some more knowledge
of the FiPy internals,.
Cheers
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
ng the simulation, so no
Lagrangian style boundary conditions. However, internal moving boundary
conditions can often be implemented with an Eulerian approach.
Cheers
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ N
On Wed, Jan 2, 2013 at 4:00 PM, Stefan Schwarzer
wrote:
> Hi Daniel,
>
> On 2013-01-02 16:17, Daniel Wheeler wrote:
> > On Mon, Dec 31, 2012 at 10:04 AM, Stefan Schwarzer > .net> wrote:
> >> RuntimeWarning: invalid value encountered in double_scalars if
&g
on -c "import fipy; fipy.test()"
>
> I get a bunch of stuff and then finally:
>
> Ran 352 tests in 57.904s
>
> OK
>
Good. All seems to be working
>
> And I get failures in polyxtal and polyxtalcoupled:
>
Don't worry about these. I think thi
el())
> File "C:\Program
> Files\Python\lib\site-packages\fipy\matrices\pysparseMatrix.py", line 246
> , in addAt
> self.matrix.update_add_at(vector, id1, id2)
> TypeError: array cannot be safely cast to required type
>
Maybe a difference i
mmand tool rather than using
ipython?
> fipy seems to be working OK when running the 1D diffusion example.
>
"fipy.test()" has only recently been implemented so that the tests can be
run on installed versions of FiPy. Generally we use "python setup.py test"
to run the te
://article.gmane.org/gmane.comp.python.fipy/2803
>
> Is this the answer to my question?
This just assigns random values independent of location. It is also
concerned with interpolating between grids that are not necessarily
aligned.
Good luck.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
work and that will give us specifics
to work with.
You might want to use the ipython notebook to implement it and then you can
put the TeX for the equation you are trying to solve above each equation
and it will be a real help for us to help you debug it. Possibly just
implement each equation i
if this is a good
candidate problem for a FV solver.
>
> Thanks for the input.
>
No problem. Hope it works out.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
t; seconds of running the code, very little happens. Then the top left and
>> lower right portions of the grid develop non-zero values and the solution
>> diverges.
>>
>> I'm quite sure that I'm expressing this problem in the right
hat we have the sub
parts working. I'll file a ticket and hopefully do something on this for
the next release.
Sorry about that.
--
Daniel Wheeler
<>___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
urvature.
>
>
> My question is how this anisotropy effect can be eliminated? As I am
> studying the effect of anisotropy at this moment, my results suffer from
> this error anisotropy.
>
You can never completely eliminate it. If you only have first order
accuracy right now, then
ll volume average and using that as the source. This may give a much
better result on a coarse grid. Use
\frac{\int I dV}{\int dV}
as the source rather than simply I.
Just a suggestion, not entirely sure that this is the issue.
--
Daniel Wheeler
<>_
of the standard grid classes and then
use source terms to blank out exterior cells. Seems much easier to me at
least to get something working. Worry about optimizing it later.
Cheers
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.n
quot;) then "var.old =
var". Now, the TransientTerm simply uses "(var - var.old) / dt". If there
are no sweeps then an old value is not required as "var" is implicit.
However, if your problem does have sweeps then you require an old value
otherwise "var.old"
data points happen to be
aligned).
phi = fp.CellVariable(mesh=mesh)
phi[:] = scipy.interpolate.NearestNDInterpolator(points,
values)((mesh.x, mesh.y))
Cheers
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[
et a solution with a
constant diffusion coefficient and then change its dependence on x
gradually. So that it doesn't go to zero, but just to something small. It
might give you a clue.
Cheers
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
h
Sorry, that got mangled. See attached file. You only need the changes
in `fipy/meshes/periodicGrid2D.py`.
Cheers
On Fri, Nov 16, 2012 at 11:59 AM, Daniel Wheeler
wrote:
> On Thu, Nov 15, 2012 at 1:17 PM, dely wrote:
>> FiPy,
>>
>> I am unable to read pickled dump files fr
self._orderedCellVertexIDs_data =
super(_BasePeriodicGrid2D, self)._orderedCellVertexIDs
self._nonPeriodicCellFaceIDs =
numerix.array(super(_BasePeriodicGrid2D, self).cellFaceIDs)
Good luck!
--
Daniel Wheeler
___
fipy mailing list
fipy@nis
if
> so, is there an easy way to do that?
No need. People get into trouble when they have an older version
installed, but have unpacked a newer version and then run from within
the unpacked directory (without installing it) or have packages on
multiple paths. Just don't do that and you should
gt;> np.array([[1, 1, 1] , [0]], 'd')
for example and we are mostly constrained by Numpy casting although in
some places FiPy does its own inferences about what is intended.
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
mmenting out line 18 onwards removes the time
> dependence from the problem and hence eliminates the error.
>
> Thanks,
> Altan
>
> ___
> fipy mailing list
> fipy@nist.gov
> http://www.ctcms.nis
observing that, c goes to zero everywhere!
>
> On Thu, Nov 8, 2012 at 5:02 PM, Daniel Wheeler
> wrote:
>>
>>
>>
>> On Wed, Nov 7, 2012 at 1:43 PM, Julien Derr wrote:
>>>
>>> Hi everyone,
>>>
>>>
>>> I am using
rain" returned a reference to the actual
constraint rather than using the "faceConstraints" attribute to get the
reference, but at least for now it works as described above.
Cheers
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
h
ith an extra source.
Did you give that a go?
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
of
the equation to be
$\left( K \right)_z = K' h_z = \left( K' h \right)_z - h K'' h_z$
Also you might want to construct a problem where C is just a constant
to start with just so that you can test the convection and diffusion
without worrying about the issues with C(h). A
ximport just to
change things up a bit. It could give you some insight into the
cimport errror.
* Use my latest reincarnation of Pylsmlib
<https://github.com/wd15/LSMLIB/tree/fipy/pylsmlib>. This is still
under construction, but it will give you some ideas. I'm using
setup.
On Mon, Oct 1, 2012 at 5:14 PM, Daniel Wheeler
wrote:
> On Mon, Oct 1, 2012 at 5:04 PM, wang yunbo wrote:
>> Here are the entire traceback when I attempted to import pylsmlib.
>>
>> Thank you.
>>
>> Yunbo
>>
>> Python 2.7.2 (default, Nov 29 2011, 14:
On Mon, Oct 1, 2012 at 6:04 AM, Guru Venkat wrote:
> Hi all,
>
> I am a newbie to FiPy and am finding it to be very interesting.
Thanks for your interest in FiPy!
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist
ttivity is making a
> change to the equation.
I thought the script was throwing an error or is this a different
script from the one that throws the error?
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
or each part as much as
> possible.
To be safe, include small transient terms or diffusion terms. The
problem is with upwinding correctly. When the only terms in the
equation are a convection and a source term, it is quite hard to know
which direction to choose for upwinding. I think this is the is
the equation is first order, why is a boundary condition at x=L
> required? I tried taking the condition at x=L out and the code still
> works, but perhaps there is a default Neumann condition implemented
> anyway?
Obviously, it depends on the direction
from libc.stdlib cimport malloc, free
def my_arr():
cdef double *my_array = malloc(10 * sizeof(double))
my_array[0] = 1.
print my_array[0]
free(my_array)
and run it with this
arrpy.py:
import pyximport
pyximport.install()
from arr import my_arr
my_arr()
run
))
>
> eqn = eqn1 & eqn2
>
> phi.setValue(-x*exp(-x**2/2.)) #ansatz satisfies BCs
> psi.setValue(exp(-x**2/2.)) #ansatz satisfies BCs
>
> vi = Viewer(vars=(psi,phi),datamin=-1,datamax=2)
>
> for i in range(25):
> # move forward in time by one time step
- ImplicitSourceTerm(coeff = x, var=numerical))
Cheers
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
uot; file? Why is it
looking for computeDistanceFunction2d.pxd? Clearly that is not what
the syntax means. Is this a really old version of Cython, which
doesn't have the "from ... cimport" syntax or something weird like
that?
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
n term. We might as well have used the sw.faceValue as the
> coefficient of the the convection term, which works but I don't like its
> result.
Great. Thanks for getting back with your experience. I'm glad that it
all seems to be working.
Cheers.
--
Daniel Wheeler
in([0], mesh.facesRight)
>
> steps = 500
> viewer = Viewer(vars = sw)
> for step in range(steps):
> sw.updateOld()
> swres = 1.0e6
> while swres > 1e-6:
> swres = eq.sweep(dt = dt, var = sw)
> print(swres)
> viewer.plot()
&
should prevent zero diagonal, but then other terms are
contributing. Make the change with the convection term and see if you still
have the same error. I suspect it might deal with this issue otherwise I'll
need the entire script to debug.
>
> I note either way I try to do it, I still
On Tue, Aug 28, 2012 at 11:00 AM, Benny Malengier wrote:
>
>
> 2012/8/28 Daniel Wheeler
>
>>
>>
>> On Tue, Aug 28, 2012 at 8:08 AM, Benny Malengier <
>> benny.maleng...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Installed
et to the import eventually. Actually, try
importing Eperta and make a communicator.
>>> from PyTrilinos import Epetra
>>> Epetra.PyComm()
Does that break?
--
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms
e solver. I think the
fipy.test('--scipy') syntax doesn't quite work as intended. Anyway, try
this.
$ set FIPY_SOLVERS=scipy
$ python
>>> import fipy
>>> fipy.test()
That should rid you of the matrix populating
301 - 400 of 965 matches
Mail list logo