Abstract. A homology and cohomology solver for finite element meshes is represented. It is an integrated part of the finite element mesh generator Gmsh. We demonstrate the exploitation of the cohomology computation results in a finite element solver, and use an induction heating problem as a working example. The homology and cohomology solver makes the use of a vectorscalar potential formulation straightforward. This gives better overall performance than a vector potential formulation. Cohomology computation also clarifies the lumped parameter coupling of the problem and enables the user to obtain useful post-processing data as a part of the finite element solution.Key words. homology computation, cohomology computation, finite element method, lumped parameter coupling, electromagnetics AMS subject classifications. 57R19, 58Z05, 65M60, 78M101. Introduction. We present a tool for the homology and cohomology computation of domains tessellated with finite element meshes. The tool is an integrated part of the finite element mesh generator Gmsh [17]. Homology and cohomology computation can be exploited to exhaustively fix the so-called cohomology class of the solution of a boundary value problem that is solved with the finite element method. As a concrete application, we demonstrate how such computations greatly benefit the modeling of an induction heating machine.In boundary value problems that involve the Hodge-Laplace operator, one often needs to choose the cohomology class of the solution. Such problems are usual in electromagnetics, which is why our working example is chosen from that field. The cohomology classes of the problem are generated by the choice of the boundary conditions and by the homology of the problem domain. Informally, homology is about the quantity and the quality of holes in an object, whether it has voids or tunnels or both. Relative homology captures whether the object has holes when one "disregards" a part of the model. In the finite element method, the disregarded part is a subdomain where the solution is fixed by a boundary condition. Cohomology can be characterized by saying that it assigns quantities to these holes. In boundary value problems such assignments fix the cohomology class of the solution. For the technical definitions of homology and cohomology spaces, see appendix A.In the finite element method, typically only a bounded portion of the device and the surrounding space is modeled. The modeling domain may contain holes, and boundary conditions are assigned to confine the fields and couple them with external phenomena outside the domain. Further, the domain can be split into many coupled regions where different approximations and potential formulations are being employed. These modeling aspects give rise to homology and cohomology and their relative forms in numerical models, since one is required to assign source quantities to entities that are absent from the model.For electrical engineers, an evident manifestation of homology and cohomology are Maxwell's equations in their ...