You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to use MFEM as a drop-in replacement for FreeFem in the magnetohydrodynamics solver I'm developing as part of my PhD thesis. I already have a master student's toy model implementation in MFEM and a rudimentary interface. Now I'd like to know if my approach for further integration is feasible before I continue. I would need a few pointers, either to the relevant part of the code itself or someone familiar with the topic whom I could ask. Tzanio already pointed out that @mlstowell, @psocratis and @dylan-copeland might be able to help.
I use an iterative scheme and need to calculate the magnetic vector potential from the current density as part of every iteration step. Now I'm using lowest-order Nédélec and Raviart-Thomas elements, respectively, but I might need higher orders later. FreeFem uses its own scripting language, which means I can just provide the weak form of Ampère's law in a very succinct syntax. On the other hand, it's not very flexible, so I resorted to calculating the FE DOFs already in Fortran. Given the node ordering and coordinates, I know the mapping for edge DOFs and can write to and read from FreeFem's arrays directly. Can I somehow do the same with MFEM?
Starting from scratch, I'd do things differently, but I already have most other pieces of the puzzle. My master student provided an MFEM implementation for the problem described above, as well as another problem that only needs H1 elements (of second-lowest order for now). For the latter, we have an interface using callbacks e.g. for the linear form integrators. With a good hundred iteration steps, the amount of indirection becomes quite expensive, since I could provide the DOFs directly already. For simple nodal elements, the DOF ordering in MFEM corresponds to the node ordering, as far as I can tell. The question now is, how can I retrieve the ordering of DOFs for (lowest-order) Nédélec and Raviart-Thomas elements?
I hope my request is somewhat clear – I only have a tenuous grasp of FEM, also concerning terminology, but I'm happy to discuss with anyone willing and able to provide support, also if you suggest an alternative approach.
The text was updated successfully, but these errors were encountered:
Lowest-order Nédélec DOFs correspond to the mesh edges, and lowest-order Raviart-Thomas DOFs correspond to the mesh faces.
Note that FiniteElementSpace provides functions GetVertexDofs, GetEdgeDofs, and GetFaceDofs that will give you the DOFs corresponding to the different geometric entities in the mesh.
I'd like to use MFEM as a drop-in replacement for FreeFem in the magnetohydrodynamics solver I'm developing as part of my PhD thesis. I already have a master student's toy model implementation in MFEM and a rudimentary interface. Now I'd like to know if my approach for further integration is feasible before I continue. I would need a few pointers, either to the relevant part of the code itself or someone familiar with the topic whom I could ask. Tzanio already pointed out that @mlstowell, @psocratis and @dylan-copeland might be able to help.
I use an iterative scheme and need to calculate the magnetic vector potential from the current density as part of every iteration step. Now I'm using lowest-order Nédélec and Raviart-Thomas elements, respectively, but I might need higher orders later. FreeFem uses its own scripting language, which means I can just provide the weak form of Ampère's law in a very succinct syntax. On the other hand, it's not very flexible, so I resorted to calculating the FE DOFs already in Fortran. Given the node ordering and coordinates, I know the mapping for edge DOFs and can write to and read from FreeFem's arrays directly. Can I somehow do the same with MFEM?
Starting from scratch, I'd do things differently, but I already have most other pieces of the puzzle. My master student provided an MFEM implementation for the problem described above, as well as another problem that only needs H1 elements (of second-lowest order for now). For the latter, we have an interface using callbacks e.g. for the linear form integrators. With a good hundred iteration steps, the amount of indirection becomes quite expensive, since I could provide the DOFs directly already. For simple nodal elements, the DOF ordering in MFEM corresponds to the node ordering, as far as I can tell. The question now is, how can I retrieve the ordering of DOFs for (lowest-order) Nédélec and Raviart-Thomas elements?
I hope my request is somewhat clear – I only have a tenuous grasp of FEM, also concerning terminology, but I'm happy to discuss with anyone willing and able to provide support, also if you suggest an alternative approach.
The text was updated successfully, but these errors were encountered: