This work is concerned with the determination of the diffusion coefficient
from distributed data of the state. This problem is related to homogenization
theory on the one hand and to regularization theory on the other hand. An
approach is proposed which involves total variation regularization combined
with a suitably chosen cost functional that promotes the diffusion coefficient
assuming prespecified values at each point of the domain. The main difficulty
lies in the delicate functional-analytic structure of the resulting
nondifferentiable optimization problem with pointwise constraints for functions
of bounded variation, which makes the derivation of useful pointwise optimality
conditions challenging. To cope with this difficulty, a novel reparametrization
technique is introduced. Numerical examples using a regularized semismooth
Newton method illustrate the structure of the obtained diffusion coefficient.