Hi Peter,
Sorry for the delay in responding--I was traveling (and had to rush to
prepare a talk).
On Fri, 6 Apr 2012 15:57:55 +0200, Peter17 <peter017(a)gmail.com> wrote:
> I would like to use Hedge to simulate the following case, but I am not
> sure whether it is possible...
>
> What I would like to do is using a particular numerical flux on some
> specific elements interfaces, for example to simulate a crack in a
> material.
>
> I defined an internal boundary (straight line) in my .msh file and
> Hedge is treating it correctly when I use
> read_gmsh(..., allow_internal_boundaries=True,...)
>
> However, I can't figure out how to define a flux *between the two
> edges of the boundary*. I looked at file hedge/mesh/__init__.py to
> understand how Hedge deals with internal boundaries and it seems that
> the adjacency information on the concerned elements is lost, so that
> those elements behave as it there had no neighbor to share fluxes with
> on this interface (hedge/mesh/__init__.py:277+).
>
> I imagined two approaches to implement this feature:
> * restoring the interface information, by adding
> "interfaces.append(els_faces)" between lines 289 and 290 of
> hedge/mesh/__init__.py but I am not sure about the implications of
> this on the rest of the program
> * defining a periodicity condition between the two edges of the
> boundary, but I can't make Gmsh mesh this and I'm afraid this will not
> really help...
>
> Do you think using Hedge for such case is possible? Do you have any
> hint to help me implement this?
Out of the box, hedge doesn't do this well. The 'proper' way to
implement this would IMO to teach hedge.mesh.Mesh about interior face
tags--similarly to boundary tags. Then even interior fluxes would
optionally receive a tag indicating where they're meant to be
executed. This is an invasive change, and it sounds more like something
I should keep in mind for later.
As an interim solution, you should be able to use a scalar 'indicator'
(unfortunately, this would have to be a volume field, so the flag
wouldn't be 100% exact) to decide which flux you want. You should then
be able to use a pymbolic.primitives.If to implement the condition.
(This might need some debugging--the If primitive is fairly new, and
I've never tried it in a flux.)
What is the physical application that leads to this?
Andreas
I am trying to integrate the equations of motion of many many
spacecraft using Python. Do any of the timesteppers involved in Hedge
execute using the GPU? I can find multiple papers referring to
persons who have built stepping methods for a GPU but I cannot find
python code related to doing so. The goal I have is to integrate as
many spacecraft as possible on a GPU. Any thoughts on using Hedge or
another GPU system to accomplish this would be greatly appreciated.
Thank you,
Jason
Dear Andreas,
I would like to use Hedge to simulate the following case, but I am not
sure whether it is possible...
What I would like to do is using a particular numerical flux on some
specific elements interfaces, for example to simulate a crack in a
material.
I defined an internal boundary (straight line) in my .msh file and
Hedge is treating it correctly when I use
read_gmsh(..., allow_internal_boundaries=True,...)
However, I can't figure out how to define a flux *between the two
edges of the boundary*. I looked at file hedge/mesh/__init__.py to
understand how Hedge deals with internal boundaries and it seems that
the adjacency information on the concerned elements is lost, so that
those elements behave as it there had no neighbor to share fluxes with
on this interface (hedge/mesh/__init__.py:277+).
I imagined two approaches to implement this feature:
* restoring the interface information, by adding
"interfaces.append(els_faces)" between lines 289 and 290 of
hedge/mesh/__init__.py but I am not sure about the implications of
this on the rest of the program
* defining a periodicity condition between the two edges of the
boundary, but I can't make Gmsh mesh this and I'm afraid this will not
really help...
Do you think using Hedge for such case is possible? Do you have any
hint to help me implement this?
Thanks in advance
Best regards
--
Peter Potrowl