I am trying to use a periodic mesh generated with Gmsh. My 2D mesh is
a square. The top and bottom edges are "Physical Line"s respectively
tagged with "plus_y" and "minus_y".
I am then using the following code:
from hedge.mesh.reader.gmsh import read_gmsh
mesh = read_gmsh('PeriodicSquare.msh',
periodicity = [None, ("minus_y", "plus_y")],
allow_internal_boundaries = False,
tag_mapper = lambda tag:tag)
When running the simulation, I get the error:
File [...]/hedge/mesh/__init__.py, line 349, in <genexpr>
mapped_plus_fvi = tuple(minus_to_plus[i] for i in minus_fvi)
I looked at mesh/__init__.py and noticed that the KeyError exception
is taken care of after being caught, by:
# if so, cool. parallel handler will take care of it.
However, _is_rankbdry_face() is defined line 229 by:
if _is_rankbdry_face is None:
So, the exception is always raised.
1) I could find nowhere in Hedge source code where to correctly define
_is_rankbdry_face() as a function of el_face
2) I tried to replace "False" by "True" line 231. In this case, the
simulation runs, but the result seems wrong (ie. the result is the
same as without periodicity).
Can you give me a hand, please?
Thanks in advance
I'm new to Hedge (and Python) and had a few general questions about its
I'm working on solving some dispersive water wave equations in lake
geometries, and have already had a good deal of success solving these
equations by modifying/combining some of the Matlab codes provided with
the NUDG book by Hesthaven and Warburton. The next step seems to be
getting a solver that will run in a compiled language and in parallel.
I've ran "test_parallel.py" on an ubuntu machine, which seems to solve
the advection equation in parallel by randomly distributing elements to
processors. I guess my main question is, are there any other example
codes that perform the decomposition in a smarter way to give
efficiency? I haven't seen much discussion in the wiki about solving
problems in parallel; is there anywhere else I can find more
documentation on the steps needed for an efficient parallel solve?
My problem involves the typical shallow water hyperbolic components, as
well as an elliptic solve that probably won't lend itself well to
parallelism. Has anyone else tackled a similar problem like this with
Department of Applied Mathematics
University of Waterloo
200 University Ave. West
519 888 4567 x32588