A mesh generator with a grid alignment capacity is proposed for heterogeneous domain. The algorithm can generate a mesh which alignes with any internal boundaries for a given two dimensional domain. Several examples are presented to illustrate the effectiveness of our algorithm.
Some samples of my codes: