An algorithm to construct the discrete cohomology basis functions required for magnetic scalar potential formulations without cuts

Magnetic scalar potential formulations without cuts require the definition of a set of basis functions for the cohomology structure of the magnetic field function space. This paper presents an algorithm to construct such a basis in the general case thanks to a properly chosen spanning tree. The algorithm is based on the topological properties of the discrete Whitney complex. It applies to static and dynamic problems.