Topology optimization of metamaterials and applications to RF component design