← Back to team overview

dolfin team mailing list archive

Re: [noreply@xxxxxxxxxxxxx: [Branch ~dolfin-core/dolfin/main] Rev 4535: Add support for specifying facet orientation in assembly over interior facets]

 

On 9/1/11 2:09 PM, Anders Logg wrote:
> On Thu, Sep 01, 2011 at 01:49:13PM +0200, Harish Narayanan wrote:
>> On 9/1/11 1:43 PM, Harish Narayanan wrote:
>>> On 2/17/10 3:44 PM, Anders Logg wrote:
>>>> It is now possible to specify the direction of interior facets such
>>>> that one may know which side of a facet is ('+') and which side is
>>>> ('-').
>>>>
>>>> To use this, attach a MeshFunction over the facets that specifies for
>>>> each facet which cell (by the cell index) that is the first ('+') side
>>>> of the cell:
>>>>
>>>>   MeshFunction<uint>* facet_orientation = mesh.data().create_mesh_function("facet orientation");
>>>>
>>>> Then just fill in the appropriate values in facet_orientation.
>>>>
>>>> This is useful for integration over facets where the two sides are not
>>>> treated symmetrically, for example using upwinding or in multiphysics
>>>> problems with an interior boundary cutting through the mesh.
>>>
>>> I am trying to use this (from Python) and it is not clear to me how this
>>> works.
>>>
>>> I do:
>>>
>>> orientation = mesh.data().mesh_function("facet orientation")
>>> # Populate the mesh function orientation
>>>
>>> How is this information used in the assembler?
>>
>> No matter, it works with "facet_orientation" instead.
> 
> Yes. It is used by the assembler to pick the first of the two cells
> forming the macro elements surrounding interior facets.
> 
> Check in Assembler.cpp and search for "facet_orientation" and then
> check the function adjacent_cells() in Facet.cpp.

Thanks, that helps.

Harish


References