On Thu, 15 Aug 2019, Andrew Parker wrote:

> I appreciate your help and comments, hope I didn’t cause any offense
> with the long list of questions.

No offense, but next time write to libmesh-users; you'll have more
eyes on them and the answers will be archived for future perusal.

I think John's pointer covered question 1 and to a lesser extent 4;
let me see if I can fill in the rest quickly.

>        1. I want to use the libMesh framework for the pure finite volume 
> method, specifically, the cell-centered finite volume method with
>           all variables stored at cell centers, fluxes computed through 
> faces, and face-connected nearest neighbours in the stencil in
>           serial and parallel (so level-1 one nearest face neighbours).  Do 
> you perceive any problems in using libMesh for this?  Is there
>           an example to help me start?

> > I think you should take a close look at both the
> > "miscellaneous_ex5" and the new "vector_fe_ex5" examples, as those
> > both demonstrate using discontinuous Galerkin (DG) formulations,
> > which is going to be the best analog for implementing FVM in
> > libMesh. I think a lot of your questions will probably be answered
> > by looking through those examples, and further investigating some
> > of the APIs which they use. 

>        2. I mention ALE, because out-with the standard fixed grid 
> cell-centered FVM method, mesh velocities stored at nodes will be
>           required.  Can I allocate, in parallel, and move in parallel, the 
> mesh to allow for the ALE aspect of my work?  Again, any
>           examples?

We've had ALE user codes before, but there's no working support in the
library itself or examples; you'll have to handle mesh motion by hand.
We do have a couple sync functions if you just want to move local
nodes and let the library handle updating ghost node positions.

>        3. Starting with a mesh on disk I’d like to be able to do (for the 
> above problem type), ghost cell creation, parallel partitioning,
>           graph reordering, mesh refinement and de-refinement, parallel 
> comms, and parallel IO.  It appears libMesh has all of this, would
>           I be correct in assuming this?  From this point I’d want to define 
> data on that parallel mesh, see next question.

Right.

>        4. I’d like to be able to allocate scalars, vectors, tensors in 
> parallel on vertices, edges, faces, and cells (assuming 3D), or
>           vertices, edges and faces in 2D.  Is data allocation like that 
> across the mesh possible? Do you have a simple example for say a
>           single cell in 2D/3D?  A particular question is with regards to 
> what ghosting is done by libMesh for cells next to a processor
>           boundary (or face in 2D).  Is that “just” dealt with when 
> requesting allocation of cell data?  For the nodes, faces, edges that
>           must be uniquely owned on a given processor, how does the 
> allocation of data work on those entities when you want access to the
>           data allocated, on say, an edge on a processor that is not the 
> owner?

We don't have independent allocation on vertices/edges/faces/cells;
each FE type defined which degrees of freedom go where.  If you're
trying to do something like DPG which defines some variables only on
interfaces between cells then you'll need to create a new FE type to
do so.

Our support for tensor-valued variables is only at the "bare shim"
level.  Unless you wanted to expand that, you'd need to store tensor
data as d^2 scalar variables (which is honestly also the best
supported way to store vector-valued variables, if your space is just
a tensor product of scalar-valued spaces and not an inherently
vector-valued FE type like Nedelec).

All degrees of freedom with support on local elements get ghosted; by
default so do DoFs supported on neighboring cells (which is useful for
e.g. gradient jump calculations) but you can narrow or widen that with
custom GhostingFunctor objects.

>        5. I’d like to be able to define boundary conditions on vertices, 
> edges, and faces, and I’d like to be able to group cells.  I
>           would want to be able to do that from a mesh file (say MED/CGNS as 
> I make extensive use of Salome) and have those groups
>           addressable (say as a collection of faces/cells) within the 
> parallel mesh.  Is that possible?

>        6. Specifically, are subgroups of elements (nodes, edges, faces or 
> cells) not just on the boundary but within the internals of the
>           mesh also a doable thing?

With cells, by subdomain id.  With faces, edges, and vertices, by
boundary id (which can be applied to "interior boundaries" despite the
oxymoron).

>        7. Are mesh metrics (cell centroid, cell volume, face centroid, face 
> normal etc) computed by libMesh or me?  Including being
>           updated after refinement or mesh movement?

LibMesh gives methods for each of those.  They're computed on the fly,
not (except face normals from the FE object) cached within the library.

>        8. For some calculations I need to be able to refine only the edges 
> (not the cells, in 2D), or the edges and then faces (but again
>           not the cells in 3D).  This produces hanging nodes and arbitrary 
> polys, is this possible?

Not if you want us to handle mesh topology and constraint equations,
I'm afraid.  libMesh supports hanging nodes but only through isotropic
refinement, and doesn't support arbitrary polygons or polyhedra.

>        9. Does refinement do anything about the newly created data
>        (scalars/vectors) in the child elements (so refinement of an
>        edge with edge data, refinement of a face with face data,
>        refinement of a cell with cell data)? Same question on
>        de-refinement?

Child elements get data interpolated at nodes, then projected (holding
previously set data fixed) on edges, then faces, then interiors.

>        11. Outside of mesh velocities at nodes, I’d want to write
>        out cell-centered cell data, are those writers supported? 

Yes.

>        I would also want to write out face/edge-based solution data
>        on boundaries such as mass fluxes or shear stress, are those
>        writers supported?

To viz formats?  Only for simple interpretations, e.g. where you could
interpret boundary data as mid-edge+mid-face node values.

>        12. I make extensive use of CGNS, would this be a problem?

Not if you can write your own I/O classes.  ;-)

>        13. Is it possible to build a mesh from my own format?  So,
>        say I’ve read in the vertices, edges, faces, cells.  How
>        would I go about building a libMesh mesh, that is distributed
>        and has data allocated on the vertices, edges, faces, cells. 
>        This indeed may be a place to start as an example, in
>        particular being able to write back out that mesh in parallel
>        albeit for say two cells, in 2D, over two processors.  I’d
>        probably learn quite a bit from being able to do that.

Check out mesh_generation.C, or some of the small manually-constructed
meshes in our unit tests:

tests/base/overlapping_coupling_test.C
tests/mesh/boundary_info.C
tests/mesh/boundary_mesh.C
tests/mesh/boundary_points.C
tests/mesh/extra_integers.C
tests/mesh/mesh_function_dfem.C
tests/mesh/mixed_dim_mesh_test.C
tests/mesh/slit_mesh_test.C
tests/systems/equation_systems_test.C
tests/systems/systems_test.C
---
Roy
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to