[petsc-dev] PetscSection
Tim Tautges
tautges at mcs.anl.gov
Mon Nov 12 10:13:27 CST 2012
On 11/10/2012 06:33 PM, Matthew Knepley wrote:
> 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
>
This is a classic compute vs. store problem. I solve that with the CN (Canonical Numbering) class in MOAB,
http://trac.mcs.anl.gov/projects/ITAPS/browser/MOAB/trunk/src/moab/CN.hpp.
- tim
> --
> 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
>
--
================================================================
"You will keep in perfect peace him whose mind is
steadfast, because he trusts in you." Isaiah 26:3
Tim Tautges Adjunct Professor, Engr. Physics
(tautges at engr.wisc.edu) University of Wisconsin-Madison
phone: (608) 263-8485 1500 Engineering Dr.
fax: (608) 263-4499 Madison, WI 53706
--
================================================================
"You will keep in perfect peace him whose mind is
steadfast, because he trusts in you." Isaiah 26:3
Tim Tautges Argonne National Laboratory
(tautges at mcs.anl.gov) (telecommuting from UW-Madison)
phone (gvoice): (608) 354-1459 1500 Engineering Dr.
fax: (608) 263-4499 Madison, WI 53706
More information about the petsc-dev
mailing list