DecqedMesher.jl
is a Julia package for constructing primal and dual mesh objects present in the discrete exterior calculus formulation of quantum electrodynamics (DEC-QED). Eventually, DecqedMesher.jl
will be integrated fully into the larger computational toolbox for DEC-QED
. Both DecqedMesher.jl
and the computational toolbox for DEC-QED
are under active development.
A detailed presentation of DEC-QED, its applications for modeling electromagnetic systems, and some results using the mesher within the computational toolbox are contained in the following references:
- Flux-based three-dimensional electrodynamic modeling approach to superconducting circuits and materials
- Spectral Theory for Non-linear Superconducting Microwave Systems: Extracting Relaxation Rates and Mode Hybridization
DecqedMesher.jl
is not currently registered in the official Julia package registry, but installing it is simple and follows the directions listed here.
In the command prompt, navigate to the desired directory (via cd
), and then clone the package via:
(shell) git clone https://github.com/richarddengli/DecqedMesher.jl.git
Start the Julia REPL, and then enter into Pkg REPL (by typing ]
). Then call:
(@v1.9) pkg> activate DecqedMesher.jl
and also call:
(DecqedMesher) pkg> instantiate
to activate the package and prepare the project environment.
The 2 user-facing functions in DecqedMesher.jl
are complete_dualmesh()
and complete_dualmesh_2D()
. They take a .msh
file representing 3D and 2D primal mesh as input, respectively, and return a length 4 tuple of structs containing the information corresponding to the .msh
file in the following order:
- dual mesh information
- primal mesh information (parsed mainly unchanged from
.msh
but updated with some information) - physical group names (parsed unchanged from
.msh
) - elementary entities (parsed unchanged from
.msh
)
In a .jl
file, import DecqedMesher.jl
:
using DecqedMesher
To construct the dual mesh of a 3D mesh, use complete_dualmesh("[/path/to/mesh]")
. For example, for a mesh file named 3D_testmesh.msh
in the same directory as the .jl
file, use:
dualmesh_3D, primalmesh_3D, physicalnames_dict_3D, all_entities_struct_3D = complete_dualmesh("/3D_testmesh.msh")
Similarly, to construct the dual mesh of a 2D mesh, use complete_dualmesh_2D("[/path/to/mesh]")
. For example, for a mesh file named 2D_testmesh.msh
, use:
dualmesh_2D, primalmesh_2D, physicalnames_dict_2D, all_entities_struct_2D = complete_dualmesh_2D("/2D_testmesh.msh")
All other functions are not intended to be user-facing, and thus must be executed via a qualified call; for example, DecqedMesher.Mesher3D_Dualmesh.get_supportvolume()
.
To retrieve the desired information, start from the results generated by complete_dualmesh()
or complete_dualmesh_2D()
, and then successively access struct fields or index into dictionaries. There are some demonstrations following the above examples:
# For the 3D mesh, get the coordinates of the primal node whose id is 1
primalmesh_3D.nodedict[1].coords
# For the 2D mesh, get the boundary dual edges beloging to the dual face whose id is 5
# (i.e. the dual face is dual to the primal node whose id is 5)
dualmesh_2D.dualfacedict_2D[5].boundary_dualedges
To determine the precise form of the call, inspect the hierarchy of data types defined in mesher3D_types.jl
and mesher2D_types.jl
. Please note that there are slight differences in somes definitions between the two files. For instance, mesher2D_types.jl
defines some fields with the additional suffix _2D
compared to the 3D definitions, as shown by the above example.
Richard Li, Dzung Pham, Nick Bronn, Thomas McConkey, Olivia Lanes, Hakan Türeci
The development for DecqedMesher.jl
started during the 2022 Undergraduate Research Internship at IBM and Princeton (QURIP), as part of a collaboration between the following groups:
- Türeci Group, Department of Electrical & Computer Engineering, Princeton University
- Qiskit Community Team, IBM Quantum
We also thank Abeer Vaishnav, Nathalie de Leon, Hwajung Kang, and the rest of the 2022 QURIP cohort for their support.