Implicit Implementation and Sensitivity Analysis for PDEs with Adaptive Mesh Refinement
A method of lines (MOL) approach was employed to solve the time-dependent PDE on an adaptive mesh. First the PDE system is semi-discretized in space into a DAE system. Then the DAE system is integrated by a variable order variable stepsize backward differention formula (BDF) method. The structured adaptive mesh refinement (SAMR) method was used to achieve the adaptivity when the mesh varies with time. Most implementations of SAMR have used an explicit time integration, and refined time as well as space by taking local smaller time steps for finer grids. The explicit time integration is not efficient when solving some parabolic type PDEs or when solving for the solutions of near steady-state equations. In our implementation, SAMR was combined with an implicit time integration solver DASPK3.0, which also has the sensitivity analysis capability. An efficient transformation between the DASPK3.0 flat structure and AMR hierarchical data structure was designed and applied. To improve the computational efficiency, we used a warm restart technique so that the integration is continued with almost the same step size and order after remeshing as would have been used had the remeshing not taken place. Even with the warm restart, the overhead of the mesh adaptation is relatively high. The most significant cost is evaluation of the Jacobian. To further reduce the overhead of the mesh adaptation, we perform the mesh refinement after a number of time steps instead of at every time step, and replace the old mesh with the new adaptive one only when the variance is big enough. An automatic differentiation tool is also used to reduce the cost of the Jacobian evaluation. We have applied two sensitivity analysis approaches to our adaptive solver: forward and adjoint. The forward approach can be implemented in a straightforward way with the help of the automatic differentiation. However, the adjoint approach cannot be used directly with the adaptive mesh methods due to either inadmissibility or inconsistency problems. We proposed a new adjoint approach to solve the problems.