Comments (5)
@i3s93
In my environment, both work just fine. See below. Actually, I do recall that I encountered this issue before.
Reading mesh.cpp, this table is created from GetElementToFaceTable. And this method is, generally, called
when dim>2 (3D mesh). How are you creating the mesh object? Maybe there is a specific pattern in which the table
is not create.
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mfem
>>> mfem.__version__
'4.5.0.2rc1'
>>> import mfem.ser as mfem
>>> mesh = mfem.Mesh('beam-tet.mesh')
>>> faces, orientations = mesh.GetElementFaces(2)
>>> faces
[7, 8, 6, 9]
>>> mesh.ElementToFaceTable()
<mfem._ser.table.Table; proxy of <Swig Object of type 'mfem::Table *' at 0x37a88b0> >
from pymfem.
Hi @sshiraiwa, thank you for your response. Actually, the mesh I used in my example is a 2-D Cartesian grid, which I create using mesh = mfem.Mesh(N_x, N_y, elem_type)
. As a workaround, I manually created this lookup table, which works fine, but I was hoping to just use the existing functionality. By any chance, do you recall what caused this issue before?
from pymfem.
@sshiraiwa Just to follow up, the issue only seems to happen when I use a Cartesian mesh. If I read in the mesh, as you have done, the error goes away. It looks like the table is not being generated for Cartesian meshes.
from pymfem.
Mesh::GetElementFaces
is a 3D-only method. In 2D you probably want to call Mesh::GetElementEdges
.
One has to be cautious -- sometimes mfem uses "faces" to refer to (dim-1)-dimensional mesh entities and sometimes to refer specifically to 2-dimensional mesh entities.
from pymfem.
@v-dobrev , Thank you for the clarification. @i3s93, closing this for now. Feel free to open if your issue is not resolved.
from pymfem.
Related Issues (20)
- Is it possible to link to an existing mfem library? HOT 7
- Linking with external requires no-serial option
- Error after PyMFEM install HOT 1
- segment-nurbs.mesh won't run in PyMFEM HOT 1
- Typo in coefficient_common.i HOT 2
- GetMemoryType returns a python integer rather than an mfem MemoryType
- Example of calculating/plot stress or strain on ex2.py/ex17.py? HOT 11
- how to dereference swig double* returned by mfem.Vector().GetData() ? HOT 2
- VectorPyCoefficent invalid size causing crash HOT 5
- Power9 installation Failure HOT 6
- Up-to-date installation for parallel version? HOT 7
- Discrepancy in error calculation for identical meshes and solutions
- Module conflict with c++ mfem in `pyMFEM==4.5.2.1` HOT 2
- `FindPointsGSLIB::GetCode()` does not return `mfem::Array<unsigned int>` HOT 1
- Installation failure with `--with-parallel` and `--with-gslib` on v.4.5.2.1 HOT 4
- How to implement LinearFormIntegrator HOT 1
- MFEM4.6 support HOT 1
- vtk output for solutions HOT 14
- First element read by GF is 0 not the value in the file HOT 4
- can't build with external mfem HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymfem.