Hi David,
On Wed, 18 Aug 2010 16:52:11 +1000, David Powell <dap124(a)physics.anu.edu.au> wrote:
> Sorry, I am not very expert at using git, so I just did what seemed
> most logical to me. I cloned the branch which you created
> "inhom-as-received-from-david" and worked with this. I then merged
> the "staging" branch into it, as I needed some of the fixes which you
> implemented. The diffs I sent you were the changes I made after this
> point. If you can suggest a better way I should do this then please
> let me know.
I have (finally!) reviewed your patch and think it's pretty much in good
shape to land in staging. I made two changes: First, I've revived the
L-F flux, and second, since all BCs need to pass boundarized epsilon and
mu, I've centralized this functionality in the operator template. (This
also made eps_mu_field_placeholder() unnecessary.) My changes seem to
work fine with your examples and with the 3D 'cavities' example.
My changes are on the branch 'inhom-maxwell-from-david'.
Would be cool if you could give this a quick look to see if it works for
you before I land it.
Andreas
Hello list,
I'm trying to set my first steps with Hedge on Ubuntu 10.04
(Lucid) but I'm running into trouble. I have more then 10 years
experience with Linux and am quite comfortable with
C/C++/Fortran95/Octave, but have no knowledge of Python nor
setuptools/distribute (yet).
I am following the instructions on
http://webapp.dam.brown.edu/wiki/SciComp/Hedge/HowTo/InstallingFromGit/Ubun…
but once i get to step 9 I get:
bartv@sonic:~/src$ ./repotool start-over
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2655, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 648, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: virtualenv==1.4.9
and this is where I'm stuck. From the comments, my guess is that
this is a problem with my setuptools/distribute installation, but
since I am not familiar (yet) with setuptools/distribute, I
haven't found a way to solve this problem.
My first question is actually if I need to follow the
manual instructions on
http://webapp.dam.brown.edu/wiki/SciComp/Hedge/HowTo/InstallingFromGit/Ubun…
to replace setuptools with distribute if I'm using Ubuntu 10.04
(Lucid). Doesn't distribute-0.6.8 come with a .deb package?
I have found
http://packages.ubuntu.com/lucid/python-setuptools
which looks likd distribute-0.6.10, so isn't this what I need and
can't I skip the manual installation step as described on your
page?
Regards,
Bart
--
"Share what you know. Learn what you don't."
Hi...
I have been trying to run my Euler code using MPI, but cannot get this to
work. Other operators work fine, for example I am able to do 'mpirun -np 2
python wave.py -f mpi'.
However 'mpirun -np 2 python vortex.py -f mpi' fails using code from either
the staging or master branches. I looked back in the Hedge archives and saw
on 3/6/2010
" Limitations of MPI support for now:
- compressible Navier-Stokes, because they require flux exchange numbering
-nonlinear examples using quadrature, because they require a small change to
the semantics of flux exchange"
Is this still the case, or should I expect vortex.py to run with mpi but
something is wrong? Doing 'mpirun -np 2 python vortex.py -f mpi' generates
the following long error message:
Traceback (most recent call last):
File "vortex.py", line 246, in <module>
main()
File "vortex.py", line 120, in main
euler_ex = op.bind(discr)
File
"/home/balzani57/pool/src/hedge/hedge/models/gas_dynamics/__init__.py", line
683, in bind
sensor_scaling=sensor_scaling))
File "/home/balzani57/pool/src/hedge/hedge/backends/mpi/__init__.py", line
628, in compile
post_bind_mapper=lambda x: fci(post_bind_mapper(x)))
File "/home/balzani57/pool/src/hedge/hedge/discretization/__init__.py",
line 1131, in compile
ex = self.executor_class(self, optemplate, post_bind_mapper)
File "/home/balzani57/pool/src/hedge/hedge/backends/jit/__init__.py", line
339, in __init__
self.code = self.compile_optemplate(discr, optemplate, post_bind_mapper)
File "/home/balzani57/pool/src/hedge/hedge/backends/jit/__init__.py", line
403, in compile_optemplate
mesh=discr.mesh)
File "/home/balzani57/pool/src/hedge/hedge/optemplate/tools.py", line 262,
in process_optemplate
TypeInferrer()(optemplate)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 368, in __call__
with_object_array_or_scalar(infer_for_expr, expr)
File "/home/balzani57/pool/src/pytools/pytools/obj_array.py", line 136, in
with_object_array_or_scalar
result[i] = f(field[i])
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 362, in infer_for_expr
tp = pymbolic.mapper.RecursiveMapper.__call__(self, expr, typedict)
File "/home/balzani57/pool/src/pymbolic/pymbolic/mapper/__init__.py", line
38, in __call__
return method(expr, *args)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 479, in map_operator_binding
self.rec(expr.field, typedict)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 384, in rec
tp = pymbolic.mapper.RecursiveMapper.rec(self, expr, typedict)
File "/home/balzani57/pool/src/pymbolic/pymbolic/mapper/__init__.py", line
83, in rec
return method(expr, *args)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 422, in map_sum
return self.infer_for_children(expr, typedict, expr.children)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 408, in infer_for_children
other_tp = self.rec(child, typedict)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 384, in rec
tp = pymbolic.mapper.RecursiveMapper.rec(self, expr, typedict)
File "/home/balzani57/pool/src/pymbolic/pymbolic/mapper/__init__.py", line
83, in rec
return method(expr, *args)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 425, in map_product
return self.infer_for_children(expr, typedict, expr.children)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 402, in infer_for_children
tp = self.rec(child, typedict)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 384, in rec
tp = pymbolic.mapper.RecursiveMapper.rec(self, expr, typedict)
File "/home/balzani57/pool/src/pymbolic/pymbolic/mapper/__init__.py", line
83, in rec
return method(expr, *args)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 422, in map_sum
return self.infer_for_children(expr, typedict, expr.children)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 408, in infer_for_children
other_tp = self.rec(child, typedict)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 384, in rec
tp = pymbolic.mapper.RecursiveMapper.rec(self, expr, typedict)
File "/home/balzani57/pool/src/pymbolic/pymbolic/mapper/__init__.py", line
83, in rec
return method(expr, *args)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 523, in map_operator_binding
with_object_array_or_scalar(process_bdry_flux_arg, bpair.bfield)
File "/home/balzani57/pool/src/pytools/pytools/obj_array.py", line 136, in
with_object_array_or_scalar
result[i] = f(field[i])
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 519, in process_bdry_flux_arg
self.rec(flux_arg, typedict))
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 384, in rec
tp = pymbolic.mapper.RecursiveMapper.rec(self, expr, typedict)
File "/home/balzani57/pool/src/pymbolic/pymbolic/mapper/__init__.py", line
83, in rec
return method(expr, *args)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 590, in map_flux_exchange
typedict[arg] = type_info.VolumeVector(NodalRepresentation())
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 339, in __setitem__
tp = old_tp.unify(new_tp, expr)
File
"/home/balzani57/pool/src/hedge/hedge/optemplate/mappers/type_inference.py",
line 96, in unify
pretty_print_optemplate(expr)))
TypeError: types 'InteriorFaces(Quadrature('gasdyn_face'))' and
'Volume(Nodal)' for 'face_quad_state0 : <ToIntFQuad[gasdyn_face]>(q[0])
===========================================================================
face_quad_state0' cannot be unified
Thanks for your help, Scott
Hi Andreas and fellow users,
I have modified the Maxwell operator to work with epsilon and mu which
vary through space (attached em.py). The code is still a little rough
and ready, but I've cleaned it up a bit and re-integrated the code for
fixed epsilon and mu as well. I have attached a couple of files which
give some very limited tests of the functionality - there are still
great swathes of code which are essentially untested. I have also
added PMC boundary conditions, and tried to improve the documentation.
Unfortunately the PML and logging functionality won't work with this
operator at this stage. I'd be interested to hear any feedback.
In the 2D cavity example I have instrumented one point in space and
dumped it to a text file, with the idea of passing it to harminv to
check the resonant frequency. However harminv seems to choke on this
file, but a simple FFT reveals that the frequency is of the right
order of magnitude!
Since I am mostly interested in scattering problems, my next step will
be to look into implementing the total-field/scattered-field approach
for incident fields.
On 20 June 2010 09:58, Andreas Kloeckner <lists(a)informa.tiker.net> wrote:
> Not sure if that'll be much help, but here's a link to a snippet of code
> that I wrote against the hedge.partition interface--it might need a few
> fixes to get it to go:
>
> http://git.tiker.net/thesis-experiments.git/blob/HEAD:/local-timestep/pytho…
>
> Observe that right now it's a bit cumbersome to use because you have to
> construct and invoke the inter-domain fluxes by hand. This could use
> some automation.
I'll try to have a closer look some time, at the moment I'm having
trouble connecting to git.tiker.net
>> > What you suggest doesn't cover smoothly varying epsilon and mu. This
>> > might not happen very often in practice, but I don't want to preclude
>> > it through a misguided interface choice.
>>
>> I see what you mean - I can think of a few examples where this might
>> crop up. However, doesn't this also require the operator to be
>> modified to take into account the spatial derivatives of epsilon and
>> mu? Possibly a way to cover all cases would be
I just realised that I was confusing first order and second order
formulations of Maxwell's equations. So as far as I can see the code
I have written should work for smoothly varying materials without any
further modification, so your suggestion sounds like the best way to
go. Currently it tests whether epsilon and mu are numbers, or
TimeConstantGivenFunctions
>> The error always occurs during time stepping, but seems to be somewhat
>> random as to how many time steps it takes to occur. I just installed
>> unbuntu 10.04 server on the same computer, which has openmpi 1.4.1-2,
>> and did a fresh clone of the git repository. Now I don't have this
>> problem any more, though I've left my unbutu 9.10 installation intact
>> so I could go back and try to reproduce it if necessary.
>
> For now, it seems a bit too obscure to dedicate time to hunt it down,
> but if it ever becomes an issue, let me know, and I'll try to see what's
> going on.
This seem quite reasonable. For some reason I always seem to bump
into errors like this that nobody else can reproduce!
>
>> Also, I just noticed that for some reason visit 2.0 doesn't seem to
>> like the VTK files which hedge is producing.
>
> I just sent an email to the visit folks (with you cc'd)--let's see what
> they reply.
Again, not a major issue, I'll just stick with paraview, I like its
GUI better anyway. I just remember that somewhere (on the wiki?) you
recommended visit.
regards
David