Added functions to PrimaryField to apply initial conditions and boundary conditions.