From: Roy S. <roy...@ic...> - 2006-08-07 20:05:20
|
On Mon, 7 Aug 2006, Karl Tomlinson wrote: > On Fri, 4 Aug 2006 16:09:16 -0500 (CDT), Roy Stogner wrote: > >> On Sat, 5 Aug 2006, Karl Tomlinson wrote: >> >>> I'm used to thinking of x,y,z as variables in themselves, like >>> dependent (system) variables in libMesh, each with their own >>> FEType. But I think it is reasonable that x,y,z should all have >>> the same FEType (but not necessarily the same as that of each of >>> the dependent variables). >> >> This makes sense when the domain is transformed from a cartesian grid, >> but what do you do on more general unstructured meshes? > > I now see that libMesh is storing xyz-based derivatives for the > dofs in Hermite meshes, whereas I'm used to thinking of xi-based > derivatives. That's right. Basically I wanted to make it easier to handle selectively refined (whether by libMesh's hierarchical AMR or by a priori mesh grading) meshes. Once you do that, d/dxi is no longer consistent between neighboring elements, but d/dx still is. > When thinking in terms of xyz-derivatives, there needs to be some > way of calculating the scale factors (dx/dxi) for the geometry. > This can be done with edge-lengths or something similar but it may be > iterative and may not be simple. > > When the dofs are xi-derivatives this step is not an issue. Well, if your mesh is topologically equivalent to a subset of a cartesian grid, there's no problem: your "master elements" can all be the same, and then making a distinction between d/dx and d/dxi (for mapping functions) doesn't make sense. Once you do a little hierarchic refinement, then there's a scaling factor that comes into play, but it's still simple. What I still can't wrap my head around is what you do for really unstructured meshes: >> Imagine you've got three Hermite quads meeting at one point, for >> example - what are the mapping variables at that node? If xi and eta >> are different between elements, derivatives with respect to xi and eta >> won't be uniquely defined on element interfaces. > > This situation does make things more complicated for the > xi-derivative implementation. Some linear constraints would be needed > to require C1 continuity. (The scale factor matrix provides this > in the xyz-derivative implementation.) I'm not convinced it's possible to get C1 continuous mapping functions with Hermite elements in this situation, regardless of how you code them. The Hermite elements get away with fewer degrees of freedom than you would expect a C1 quad or hex to need, because they take advantage of the fact that you're using meshes where the mixed derivatives (e.g. d^2/dxideta in 2D) are in the same "direction" on all neighboring elements. I don't see how that can happen unless you have four quads (or 8 hexes) meeting at every node. > A similar issue exists where an element is adjacent on one side to > 2 elements of higher h-refinement level (with a hanging node). This is much easier to handle by comparison; sure there's some scaling involved, but as long as the mapping is consistent (all the mapping values on the hanging node correspond to the correct linear combinations of the values on the neighboring vertices), the result should still be C1 and should still be straightforward to compute. >> Also, it's easy to conceive of situations where the mapping variables >> take up a different amount of data than any solution variable. It >> might be nice to handle NURBS geometries via a two step map: a first >> order Lagrange mapping from master elements to a few unit boxes, then >> a few NURBS points to define a map from those into physical space. >> Per-element NURBS information could work but would waste RAM. > > I'm not familiar enough with NURBS to comment here. Imagine a quadratic mapping, then. Say you want to discretize the domain from -1<x<1 and x^2-1<y<x^2+1. You can describe a mapping into that domain by using triangles which each have 6 nodes and a quadratic map, but you could also do it by mapping a bunch of 3 node master triangles onto a unit square, then using a single 9 node quadratic map to transform the unit square onto the physical domain. In the former case you end up using approximately 1 mapping node per 2 triangles, in the latter you use approximately 3. This isn't a huge memory savings until you get up to high p mappings or complicated NURBS, I know, but I don't want to preclude it unless we have to. > I was thinking that geometric variables should be as similar as > possible to solution (or any other - e.g. material parameter) > variables, but are you saying that geometric variables may be more > complicated than solution variables? It's not so much that they're more or less complicated, it's that they're "differently" complicated. I think that for geometric variables you may often find that the most memory-efficient way to store the mapping is as a composition of many simple (perhaps linear Lagrange) mappings from master elements into "geometric patches" and a few complicated (perhaps NURBS) mappings from those patches into the physical domain. There's no analog to such a process among solution variables. >>> Should the shape functions for the map be tied more closely to an >>> FE for the Mesh (or an Elem) rather than to the FEs for each of >>> the dependent variables in each System on the Mesh? >> >> I'd rather not have a mapping FE associated with each Elem unless we >> can think of a cunning data structure; I felt bad about just adding a >> byte for p_level until I realized most compilers would have turned >> that byte into alignment padding anyway. Adding a per-Elem pointer to >> a mapping FEType object would be a bit much. I'm willing to reconsider this. Looking over elem.h, it's clear that we're going to have something like a dozen pointers per Elem on even 2D meshes; adding another one won't kill us. I'm still not sure what good it would be, though. Generally when we have finite elements that are compatible with each other, we put them in the same FEFamily, even though one is a quad and the other a triangle. I can't imagine situations where I'd want to mix and match mapping FEFamilies; it wouldn't be safe. > (As I understand it, p-refinement essentially changes the FEType > through the order and so it is just having different FEFamilys > that is the issue. Correct me if I'm wrong.) You're correct. Also we currently only support adaptive p refinement of hierarchic-type basis functions, which makes mixing different p levels in the same mesh a little easier. >> I guess more flexibility is better than less, but to simplify code >> elsewhere (the FE caching I just added to CVS, for instance) it would >> be nice if we could assume there was just one per-Mesh mapping FEType. > > For the most part I'm happy with one per-Mesh mapping FEFamily. > The possible exception is Clough-Tocher and Hermite FEFamilies. > > I'm not familiar with Clough-Tocher but they look pretty clever. > Hermites don't provide TRI or TET ElemTypes so having some > Clough-Toucher to provide this may be useful. Is this a feasible > combination (with hanging node constraints perhaps)? I had hoped it would be when I started coding them, but no, that doesn't work. To make the interface C1, you'd need to constrain the flux on the Hermite side to be quadratic instead of cubic - but there's no way to do that without the constraint "spilling over" into neighboring elements, and that can ruin the locality or even the approximation accuracy of your basis functions. There is a quad macroelement which is compatible with the Clough-Tochers and which is likely a little more efficient in a hybrid mesh than dissecting the quads and using CT alone, but I don't think the slight gain is worth the coding time. Also, keep in mind that there's no Clough Tet elements in libMesh, either. C1 tets are ugly; you need something like p=11 to build them without macroelements, and the best macroelements suitable for any Tet mesh require p=5 polynomials and can't be restricted below p=3. My main motivation for writing the Hermite class in the first place was that I wanted to get some C1 3D results without spending a year or two bug hunting through a hundred macroelement terms. > Maybe using only Clough-Tocher elements might be solution here. That would work, but I'd be worried about what Clough-Tocher mappings might do to your quadrature rules. Granted, any kind of non-affine map can mess up your nice exact Gaussian quadrature, but the Clough-Tocher basis functions have internal subelement boundaries which might be even worse. > Are Clough-Tocher and Hermite FEFamilys similar enough to be > different ElemTypes of the same FEFamily? No; even if the code worked, the resulting function space would only be C0 conforming. I guess having a space which was C1 almost everywhere might be good for some applications, but my fourth order problems would start producing bad results. --- Roy |