  We propose a method that morphs high-orger meshes such that their boundaries
and interfaces coincide/align with implicitly defined geometries. Our focus is
particularly on the case when the target surface is prescribed as the zero
isocontour of a smooth discrete function. Common examples of this scenario
include using level set functions to represent material interfaces in
multimaterial configurations, and evolving geometries in shape and topology
optimization. The proposed method formulates the mesh optimization problem as a
variational minimization of the sum of a chosen mesh-quality metric using the
Target-Matrix Optimization Paradigm (TMOP) and a penalty term that weakly
forces the selected faces of the mesh to align with the target surface. The
distinct features of the method are use of a source mesh to represent the level
set function with sufficient accuracy, and adaptive strategies for setting the
penalization weight and selecting the faces of the mesh to be fit to the target
isocontour of the level set field. We demonstrate that the proposed method is
robust for generating boundary- and interface-fitted meshes for curvilinear
domains using different element types in 2D and 3D.
