Finite element solver using Spectral Fourier Method on One and Two dimensional Domain