We report a Monte Carlo (MC) method to simulate a lattice superconduct
or in the shape of a slab with two plane interfaces, which are paralle
l to each other and separating the superconductor from the vacuum. Thi
s method is based on the lattice London model introduced by Carneiro,
adapted here to the slab geometry. The energy of a vortex configuratio
n is obtained from the exact solution of this model for uniaxial aniso
tropy when the interfaces are either perpendicular or parallel to the
axis of anisotropy. Besides the usual bulk vortex-vortex interactions,
the energy has surface contributions that are similar to those derive
d in continuum London theory for the same geometry. The MC procedure u
ses vortex loops as the basic building block to generate vortex config
urations, except at the interfaces where open vortex lines are used. T
he latter are responsible for the penetration of vortex lines in the s
lab's interior when an external field is applied parallel to the inter
faces. Results of simulations for an isotropic superconducting slab ar
e reported. It is found that the vortex lines that penetrate the slab,
driven by the external field, form a vortex-line lattice at low tempe
ratures. Melting and freezing of this lattice is studied in some detai
l. The magnetization is studied as a function of the applied field and
temperature. Evidence is found that is changes by a small amount acro
ss the melting and freezing transitions.