  In this paper, we perform a numerical analysis in frequency domain for
various electromagnetic problems based on discrete exterior calculus (DEC) with
an arbitrary 2-D triangular or 3-D tetrahedral mesh. We formulate the governing
equations in terms of DEC for 3D and 2D inhomogeneous structures, and also show
that the charge continuity relation is naturally satisfied. Then we introduce
effective signed dual volume to incorporate material information into Hodge
star operators and take into account the case when circumcenters fall outside
triangles or tetrahedrons, which may lead to negative dual volume without
Delaunay triangulation. Then we demonstrate the implementation of various
boundary conditions, including perfect magnetic conductor (PMC), perfect
electric conductor (PEC), Dirichlet, periodic, and absorbing boundary
conditions (ABC) within this method. An excellent agreement is achieved through
the numerical calculation of several problems, including homogeneous
waveguides, microstructured fibers, photonic crystals, scattering by a 2-D PEC,
and resonant cavities.
