Replies: 3 comments 3 replies
-
The short answer is that we don't store the adjacency information in both directions. I think the main reason for this is that, in the |
Beta Was this translation helpful? Give feedback.
-
If you have an explicitly-constructed quad face, you can call For nodes (including vertices), we have a |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answers! I tried with the following simple snippet to construct explicitly faces from hex elements, and to call Besides, a face which is not at the boundary of the domain must have two adjacent cells. How Thanks for your help! #include <iostream>
#include "libmesh/libmesh.h"
#include "libmesh/mesh_generation.h"
#include "libmesh/parallel_mesh.h"
#include "libmesh/elem.h"
int main(int argc, char **argv)
{
libMesh::LibMeshInit init(argc, argv);
libMesh::DistributedMesh mesh(init.comm());
libMesh::MeshTools::Generation::build_cube(mesh, 2, 2, 2);
for (auto &e : mesh.active_local_element_ptr_range()) {
for (auto i : e->side_index_range()) {
auto s = e->build_side_ptr(i, false);
std::cout << "s->interior_parent(): " << s->interior_parent() << std::endl;
}
}
return 0;
} |
Beta Was this translation helpful? Give feedback.
-
Hello libMesh users,
I am considering using libMesh as a mesh backend handling distributed meshes with AMR functionnalities in the software I am working on for the french Alternative Energies and Atomic Energy Commission.
I started looking and playing with the classes of this module, but at this time I couldn't find a way to get upward adjacencies between mes entities, i.e. topological connections from lower dimentionnal entities to higher ones (vertex->faces, face->cells, vertex->cells, ...). For example, let's say for a 3D mesh composed of hexahedra, considering a quad face I would like to get the two (or one if the face is located at a booundary) cells adjacent to this face.
Is such a query possible with libMesh?
Many thanks!
Olivier Jamond
Beta Was this translation helpful? Give feedback.
All reactions