We consider the problem of the construction of the nanophotonic structures of
arbitrary geometry with prescribed desired properties. We reformulate this
problem as an optimization problem for the Tikhonov functional which is
minimized on adaptively locally refined meshes. These meshes are refined only
in places where the nanophotonic structure should be designed. Our special
symmetric mesh refinement procedure allows the construction of different
nanophotonic structures. We illustrate efficiency of our adaptive optimization
algorithm on the construction of nanophotonic structure in two dimensions