[petsc-dev] PetscSection

Blaise A Bourdin bourdin at lsu.edu
Sat Nov 10 14:09:20 CST 2012


On Nov 10, 2012, at 1:54 PM, Jed Brown <jedbrown at mcs.anl.gov<mailto:jedbrown at mcs.anl.gov>> wrote:

On Sat, Nov 10, 2012 at 1:44 PM, Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>> wrote:
Yes, I agree that they are different geometrically, and in PyLith we
make Labels to
distinguish, which I think is the right way.

Cool. Of course you have to create the labels somehow. Do you currently make labels for all the "sidesets" in the mesh you load (e.g., from exodus)?

For exodus, I don't read side sets. The exodus interface for side set is really crappy, and does not allow an side set _inside_ the domain. Instead, I do not assume that all elements have the same codimension.


Labels in their current form seem to do two things (denote sets and associate values with points in those sets). Don't you frequently want one or the other?

> Fine, I care much more about conceptual simplicity in the interface. I think
> adoption will be higher if 95% of users don't see the word "stratum".

Note that this will have to be set explicitly somehow, since you cannot "tell"
from the DAG that something has a given dimension/co-dim.

Are your points not sorted by dimension? (Most of the code I've seen in the examples assumes homogeneous strata.)

Nope... and please, don't break that...

Here is an example of a mesh with 4 element blocks. In an analysis code, for each block , I would specify the element type, type of physics, coefficients etc in a petscBag. That said, I may be doing it wrong...

block 10 is made of tri
block 22 is made of quad
blocks 100 and 102 are made of bars
iMac:Exodus blaise$ ./test1 -i Square-mixed2.gen

dm:
Mesh in 2 dimensions:
  0-cells: 9
  2-cells: 12
[0]: Number of vertices in mesh: 9
[0]: Number of cells in mesh: 12
viewing Mesh 'mesh'
Max sizes cone: 4 support: 5
viewing IFSieve 'mesh sieve'
cap --> base:
[0]: 12 ----> 0
[0]: 12 ----> 1
[0]: 12 ----> 4
[0]: 12 ----> 3
[0]: 12 ----> 5
[0]: 13 ----> 6
[0]: 13 ----> 0
[0]: 13 ----> 7
[0]: 13 ----> 5
[0]: 14 ----> 1
[0]: 14 ----> 6
[0]: 14 ----> 0
[0]: 15 ----> 2
[0]: 15 ----> 3
[0]: 15 ----> 1
[0]: 16 ----> 11
[0]: 16 ----> 2
[0]: 17 ----> 10
[0]: 17 ----> 3
[0]: 17 ----> 4
[0]: 17 ----> 11
[0]: 17 ----> 2
[0]: 18 ----> 8
[0]: 18 ----> 10
[0]: 18 ----> 4
[0]: 19 ----> 5
[0]: 19 ----> 9
[0]: 19 ----> 8
[0]: 19 ----> 4
[0]: 20 ----> 7
[0]: 20 ----> 5
[0]: 20 ----> 9
base <-- cap:
[0]: 0<----12
[0]: 0<----13
[0]: 0<----14
[0]: 1<----12
[0]: 1<----14
[0]: 1<----15
[0]: 2<----15
[0]: 2<----16
[0]: 2<----17
[0]: 3<----15
[0]: 3<----17
[0]: 3<----12
[0]: 4<----12
[0]: 4<----17
[0]: 4<----18
[0]: 4<----19
[0]: 5<----19
[0]: 5<----20
[0]: 5<----13
[0]: 5<----12
[0]: 6<----13
[0]: 6<----14
[0]: 7<----20
[0]: 7<----13
[0]: 8<----18
[0]: 8<----19
[0]: 9<----19
[0]: 9<----20
[0]: 10<----17
[0]: 10<----18
[0]: 11<----16
[0]: 11<----17
Orientation:
[0]: 0<----12: 0
[0]: 0<----13: 0
[0]: 0<----14: 0
[0]: 1<----12: 0
[0]: 1<----14: 0
[0]: 1<----15: 0
[0]: 2<----15: 0
[0]: 2<----16: 0
[0]: 2<----17: 0
[0]: 3<----15: 0
[0]: 3<----17: 0
[0]: 3<----12: 0
[0]: 4<----12: 0
[0]: 4<----17: 0
[0]: 4<----18: 0
[0]: 4<----19: 0
[0]: 5<----19: 0
[0]: 5<----20: 0
[0]: 5<----13: 0
[0]: 5<----12: 0
[0]: 6<----13: 0
[0]: 6<----14: 0
[0]: 7<----20: 0
[0]: 7<----13: 0
[0]: 8<----18: 0
[0]: 8<----19: 0
[0]: 9<----19: 0
[0]: 9<----20: 0
[0]: 10<----17: 0
[0]: 10<----18: 0
[0]: 11<----16: 0
[0]: 11<----17: 0
viewing GeneralSection 'coordinates'
  Fields: 0
[0]:   12 dim 2 offset 0   0 0
[0]:   13 dim 2 offset 2   -0.5 0
[0]:   14 dim 2 offset 4   -0.5 -0.5
[0]:   15 dim 2 offset 6   0 -0.5
[0]:   16 dim 2 offset 8   0.5 -0.5
[0]:   17 dim 2 offset 10   0.5 0
[0]:   18 dim 2 offset 12   0.5 0.5
[0]:   19 dim 2 offset 14   0 0.5
[0]:   20 dim 2 offset 16   -0.5 0.5
viewing LabelSifter: 'Cell sets'
cap --> base:
[0]: 10---->0
[0]: 10---->1
[0]: 10---->2
[0]: 10---->3
[0]: 22---->4
[0]: 22---->5
[0]: 100---->6
[0]: 100---->7
[0]: 102---->8
[0]: 102---->9
[0]: 102---->10
[0]: 102---->11
viewing LabelSifter: 'Vertex sets'
cap --> base:
[0]: 1---->16
[0]: 1---->17
[0]: 1---->18


--
Department of Mathematics and Center for Computation & Technology
Louisiana State University, Baton Rouge, LA 70803, USA
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20121110/41b921c0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.c
Type: application/octet-stream
Size: 2711 bytes
Desc: test1.c
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20121110/41b921c0/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Square-mixed2.gen
Type: application/octet-stream
Size: 2572 bytes
Desc: Square-mixed2.gen
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20121110/41b921c0/attachment-0001.obj>


More information about the petsc-dev mailing list