1. A method for simulating a conductivity measured by a resistivity tool disposed in a borehole penetrating an earth formation, the method comprising: constructing with a microprocessor a main grid extending from the borehole into the formation; constructing with the microprocessor an auxiliary grid that is local to the main grid and fitted to a boundary between a first region having a first conductivity and a second region having a second conductivity; discretizing with the microprocessor a problem operator denoted as A i+1/2 h on the auxiliary grid wherein the problem operator applies Maxwell's Equations to a volume represented by the auxiliary grid and the Maxwell's Equations include a term representing the conductivity of a material in the volume; calculating with the microprocessor one-dimensional functions V i (r) and V i+1 (r) for points r on the auxiliary grid such that 
 A i+1/2 h V i ( r )=0, V i ( r i )=1 , V i ( r i+1 )=0; 
 A i+1/2 h V i+1 ( r )=0, V i+1 ( r i )=0, V i+1 ( r i+1 )=1; discretizing with the microprocessor by basic functions F i,j φ =V i (r)L j (z) for points r and z on the main grid, where L j (z) is a one dimensional continuous and piecewise linear function such that L j (z)=1 at a grid node z j and L j (z)=0 at all other grid nodes; solving with the microprocessor the resulting set of equations to obtain the simulated measured conductivity for the resistivity tool; and providing the simulated measured conductivity as output from the microprocessor.