[petsc-dev] PetscSection

Matthew Knepley knepley at gmail.com
Sat Nov 10 18:33:56 CST 2012


On Sat, Nov 10, 2012 at 7:14 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Sat, Nov 10, 2012 at 5:31 PM, Matthew Knepley <knepley at gmail.com> wrote:
>>
>> I was being too pessimistic. You can assign an intermediate node to any
>> set
>> of shared vertices, but I am not sure whether you start from the top or
>> bottom,
>> and the hard part is preallocation.
>
>
> Hmm, I'm not sure how to do hanging nodes, but for a conforming mesh
> starting with cell-to-vertex c2v[...]
>
> # build inverse map
> v2c = defaultdict(lambda v:[])
> for c in cells:
>   for v in c2v[c]:
>     v2c[v].append(c)
>
> # find common subsets
> edges = set()
> c2e = defaultdict(lambda c:set())
> for v in vertices:
>   for (v1,c1,v2,c2) in sorted_vertices_appearing_in_exactly_2_cells(v2c[v]);
>     edges.add((v1,v2))
>     c2e[c1].add((v1,v2))
>     c2e[c2].add((v1,v2))
>
> # repeat using edges to bound cell-to-face
> ...
>
>
>
> The problem with this is that you don't automatically get consistent
> orientation. If you need to work with basis functions, you need to orient,
> in which case the ordering produced by the procedure above needs to be
> fixed.
>
> In my opinion, that orientation is critical, such that connectivity without
> topology is of limited value. The topological dimension and number of
> vertices is just not sufficient to identify the topology of an element. For
> example, a hex can be collapsed to 7 vertices via an edge or across the
> middle of a face.

Definitely, that is much harder than the topology, and where I need specific
stuff for non-simplices, but it might be possible to use the initial orientation
of vertices.

    Matt

--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener



More information about the petsc-dev mailing list