  We present a method to extend the finite element library FEniCS to solve
problems with domains in dimensions above three by constructing tensor product
finite elements. This methodology only requires that the high dimensional
domain is structured as a Cartesian product of two lower dimensional
subdomains. In this study we consider Dirichlet problems for scalar linear
partial differential equations, though the methodology can be extended to
non-linear problems. The utilization of tensor product finite elements allows
us to construct a global system of linear algebraic equations that only relies
on the finite element infrastructure of the lower dimensional subdomains
contained in FEniCS. We demonstrate the effectiveness of our methodology in
four distinctive test cases. The first test case is a Poisson equation posed in
a four dimensional domain which is a Cartesian product of two unit squares
solved using the classical Galerkin finite element method. The second test case
is the wave equation in space-time, where the computational domain is a
Cartesian product of a two dimensional space grid and a one dimensional time
interval. In this second case we also employ the Galerkin method. The third
test case is an advection dominated advection-diffusion equation where the
global domain is a Cartesian product of two one dimensional intervals in which
the streamline upwind Petrov-Galerkin method is applied to ensure discrete
stability. The final test case uses the Galerkin approach to solve a Poisson
problem on a Cartesian product of two intervals with a spatially varying,
non-separable diffusivity term. In all cases, a p=1 basis is used and optimal
L^2 convergence rates of order h^{p+1} of the errors are achieved with respect
to h refinement
