Research Article

A Numerical Method for Solving Elliptic Interface Problems Using Petrov-Galerkin Formulation with Adaptive Refinement

Algorithm 1

Adaptive mesh refinement.
Input: Triangulation set , interior point set
Output: New triangulation set , new interior point set
1: Let be the length of triangulation
2: for   to   do
3:if  ’s refine sign is equal to 1  then
4:,
5:while  s=1  do
6:Let be the right angle point of
7:Let be the middle point of the hypotenuse of
8:Let be the triangle next to and share the hypotenuse with
9:
10:if   is on the boundary  then
11: (see cell in Figure 3)
12:else if    then
13: (see cell in Figure 3)
14:else
15:, , , add into a triangle set (see cell in Figure 3)
16:end if
17:end while
18:for   down to 1  do
19:
20:Let be the right angle point of
21:Let be the middle point of the hypotenuse of
22:
23:if   is on the boundary  then
24:Connect and , separate the original cell into two new cells,
delete the original cell from and add two new cells into
25:else if    then
26:Connect and , separate the two cells into four new cells,
delete the two cells from , add four new cells into ,
and add the new point into
27:end if
28:end for
29:end if
30: end for