[petsc-dev] Best DM For Structured Atom Layers

Vijay S. Mahadevan vijay.m at gmail.com
Tue Jan 28 22:45:38 CST 2020


>> 1. General setup looks like this (https://www.iconfinder.com/icons/3417099/carbon_structure_geometric_pattern_graphene_technology_hexagonal_lattice_molecular_structure_icon), initially in 2D, however it should be extensible to 3D in the Z direction by layering these configurations on top of one another. They are not necessarily layered nicely, i.e. having one layer directly above the other, but should be able to handle offsets in the X or Y directions.

The way the problem is described, this lattice is not really a
hexagonal "mesh" in the traditional sense. Even with a twisted
extrusion, if only nearest neighbors truly interact with each other,
then even though the 3D lattice structure has polyhedra, you may only
need the vertex adjacency to traverse the entire high dimensional
space. So using something like MOAB to represent the actual lattice
(with atoms as vertices here), may be a bit of an overkill, but
certainly doable.

> It seems a combination of DMNetwork + DMPlex seems the most fitting here then, since it seems that DMNetwork is built on plex.

That would make the most sense if I understood your explanation correctly.

> The wrinkle with this however, is that I need to extend this beyond nearest-neighbor where I can set an interaction radius, where any cell connected to the current cell (not necessarily directly, can be through multiple jumps) within that radius also interacts with my current cell.

If you are talking about querying adjacencies for polygonal/polyhedral
cells directly, MOAB can handle this natively. There isn't explicitly
an API to query cells within a given radius (from current vertex or
cell center ?!), but should be easy to write this to get the right
adjacencies. DMMoab was not written particularly with any sort of
support for polygonal meshes (at least from a discretization
standpoint), even if the underlying MOAB data-structure supports it.
If you do decide to go this route, I can update the overall DMMoab
interface to handle arbitrary polygons/polyhedral cells, and add some
examples/tests etc as well.

Best,
Vijay

On Tue, Jan 28, 2020 at 4:34 PM Jacob Faibussowitsch
<jacob.fai at gmail.com> wrote:
>
>  I think the real question is, how do layers interact.
>
> The main source of interaction between cells is the energy between directly connected nearest-neighbor atom pairs, so crudely stiffness in some form. The layers are set up such each atom in one layer is linked to a unique atom in the layer above or below (basically one layer sits directly on top of the other, except for a possible xy shift, communication-wise it is identical to in-plane connections though).
>
> The wrinkle with this however, is that I need to extend this beyond nearest-neighbor where I can set an interaction radius, where any cell connected to the current cell (not necessarily directly, can be through multiple jumps) within that radius also interacts with my current cell.
>
> It seems a combination of DMNetwork + DMPlex seems the most fitting here then, since it seems that DMNetwork is built on plex.
>
> Best regards,
>
> Jacob Faibussowitsch
> (Jacob Fai - booss - oh - vitch)
> Cell: (312) 694-3391
>
> On Jan 28, 2020, at 3:07 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
> On Tue, Jan 28, 2020 at 2:32 PM Jacob Faibussowitsch <jacob.fai at gmail.com> wrote:
>>
>> Hello All,
>>
>> I am currently working on rewriting an existing code into PETSc. This particular code performs tight binding and works on a tiled hexagonal carbon lattice as a mesh. I am wondering what the best DM format is to represent this? Some potentially relevant info:
>>
>> 1. General setup looks like this (https://www.iconfinder.com/icons/3417099/carbon_structure_geometric_pattern_graphene_technology_hexagonal_lattice_molecular_structure_icon), initially in 2D, however it should be extensible to 3D in the Z direction by layering these configurations on top of one another. They are not necessarily layered nicely, i.e. having one layer directly above the other, but should be able to handle offsets in the X or Y directions.
>> 2. A “Cell” is a pair of atoms, so in the above link 2 connected circles represents 1 cell.
>> 3. Connectivity between cells is always structured.
>> 4. The mesh should only be interpolated (in the DMPlex sense) once, i.e. I need the 2 atom “cell" to store some geometric information about its internal bond.
>> 5. Computational stencil should always be pointing “outwards”, i.e. it should not loop back on itself.
>> 6. The computational kernel is a band-diagonal Hamiltonian matrix generated from the tight binding wave function (function of vectors between atoms, some known constants, and stencil size)
>>
>> Granted some of these are not necessarily things that PETSc should facilitate on its own (most likely point #4 and #5) but there may be DM implementations that make writing this by hand easier than others. From looking into this some potential contenders I identified were DMNetwork, (a modified) DMDA, DMStag, DMPlex, or DMMOAB, but I welcome any and all input here!
>
>
> I don't think you can do this with DMDA/DMStag since they are based on tensor-product meshes, and I don't
> see how to phrase this in that way. You can do this in DMPlex (and probably MOAB, I don't know) but since you
> only really use 1D information, DMNetwork might be easier. I think the real question is, how do layers interact. One
> layer is probably best as a Network. Multiple layers might still be better, or might need something more general.
>
>   Thanks,
>
>      Matt
>
>>
>> Best regards,
>>
>> Jacob Faibussowitsch
>> (Jacob Fai - booss - oh - vitch)
>> Cell: (312) 694-3391
>>
>
>
> --
> 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
>
> https://www.cse.buffalo.edu/~knepley/
>
>


More information about the petsc-dev mailing list